> ## Documentation Index
> Fetch the complete documentation index at: https://hyperbolic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a rental

> Rent a virtual machine or a bare metal server. `rentalType` decides which machine-type-specific fields apply; sending a field for the other type is a BAD_REQUEST (INVALID_INPUT_FOR_RENTAL_TYPE).



## OpenAPI

````yaml /api-reference/openapi.json post /v2/on-demand/rentals
openapi: 3.1.0
info:
  title: Hyperbolic API
  description: >-
    HTTP API for Hyperbolic's on-demand GPU compute: rent virtual machines and
    bare-metal instances, manage storage volumes, and track usage and billing.
    Authenticate with a Bearer API key (`Authorization: Bearer <api-key>`).
  version: 2.0.0
  contact:
    name: Hyperbolic
    url: https://hyperbolic.ai
    email: support@hyperbolic.ai
servers:
  - url: https://api.hyperbolic.ai
    description: Production
  - url: https://api.hyperbolic.xyz
    description: >-
      Legacy host — the same API on Hyperbolic's original domain, kept for
      existing integrations.
security: []
tags:
  - name: openapi
    description: OpenAPI specification
    x-group: OpenAPI
  - name: rentals
    description: Manage rentals
    x-group: Rentals
  - name: storage-volumes
    description: Manage storage volumes
    x-group: Storage Volumes
  - name: billing
    description: Manage billing
    x-group: Billing
  - name: users
    description: Manage users
    x-group: Users
  - name: balances
    description: Manage balances
    x-group: Balances
  - name: api-keys
    description: Manage API keys
    x-group: API Keys
  - name: ssh-keys
    description: Manage SSH public keys
    x-group: SSH Keys
  - name: virtual-machine-rentals
    description: >-
      **Deprecated.** Manage virtual machine rentals. These endpoints are still
      supported for now but are no longer preferred.
    x-group: Virtual Machine Rentals (Deprecated)
    x-deprecated: true
  - name: bare-metal-rentals
    description: >-
      **Deprecated.** Manage bare metal rentals. These endpoints are still
      supported for now but are no longer preferred.
    x-group: Bare Metal Rentals (Deprecated)
    x-deprecated: true
paths:
  /v2/on-demand/rentals:
    post:
      tags:
        - rentals
      summary: Create a rental
      description: >-
        Rent a virtual machine or a bare metal server. `rentalType` decides
        which machine-type-specific fields apply; sending a field for the other
        type is a BAD_REQUEST (INVALID_INPUT_FOR_RENTAL_TYPE).
      operationId: ondemand-createRental
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rentalType:
                  type: string
                  enum:
                    - virtual-machine
                    - bare-metal
                  description: >-
                    The machine type to rent. Fields marked for one machine type
                    are rejected for the other.
                gpuCount:
                  type: number
                  description: >-
                    GPUs to rent. Bare metal rents whole nodes, so a multiple of
                    8.
                networkType:
                  description: >-
                    Required for bare metal. Virtual machines default to
                    `ethernet`.
                  type: string
                  enum:
                    - infiniband
                    - ethernet
                region:
                  default: us-central-1
                  description: A region that offers the chosen machine type.
                  anyOf:
                    - type: string
                      enum:
                        - us-central-1
                        - us-central-2
                        - eu-north-2
                        - eu-west-2
                        - eu-north-4
                        - eu-north-5
                        - us-east-1
                        - us-east-2
                        - ca-east-3
                        - eu-north-6
                        - eu-north-7
                        - eu-north-8
                        - eu-north-9
                        - ca-west-1
                        - ca-east-1
                        - us-central-3
                        - us-southeast-1
                        - me-central-1
                        - ca-east-2
                        - eu-west-1
                        - us-southeast-2
                        - jp-east-1
                        - us-southeast-3
                        - eu-west-5
                        - us-east-3
                    - type: string
                      enum:
                        - us-central-1
                        - uk-central-3
                        - uk-southeast-3
                        - eu-southwest-3
                        - eu-southwest-3-1
                        - eu-west-3
                        - eu-west-4
                gpuType:
                  default: h100
                  type: string
                  enum:
                    - h100
                    - h200
                    - b200
                    - rtx-6000-pro
                label:
                  type: string
                termType:
                  default: on-demand
                  type: string
                  enum:
                    - on-demand
                    - reserved
                termPeriodDays:
                  type: integer
                  minimum: 1
                  maximum: 30
                  description: >-
                    Any whole number of days from 1 to 30 where custom
                    reservation lengths are enabled for your account; otherwise
                    one of the standard terms in `options` from `GET
                    /v2/on-demand/reserve-options`.
                discountPercentage:
                  default: 0
                  type: number
                convertToOnDemandOnExpiry:
                  default: true
                  type: boolean
                monitoringEnabled:
                  type: boolean
                sshPublicKeyId:
                  description: >-
                    The saved SSH key to authorize on the rental. Defaults to
                    the most recently added key.
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                sshPublicKeyIds:
                  description: The saved SSH keys to authorize on the rental.
                  minItems: 1
                  type: array
                  items:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                customPorts:
                  description: Virtual machines only.
                  maxItems: 20
                  type: array
                  items:
                    type: integer
                    minimum: 1
                    maximum: 65535
                monitoringOptOut:
                  description: >-
                    Virtual machines only. Opt the rental out of Hyperbolic
                    telemetry: the GPU health and system metrics (CPU, memory,
                    root filesystem, network interfaces) Hyperbolic collects
                    from inside the virtual machine to detect hardware faults.
                    No logs, process lists or file contents are collected.
                    Omitted or `false` leaves collection on. Only standalone
                    virtual machine rentals in supported regions can opt out;
                    elsewhere `true` gets a 400.
                  type: boolean
                cudaVersion:
                  description: Bare metal only.
                  type: string
                  enum:
                    - cuda12.8
                    - cuda12.9
                storageVolume:
                  description: Bare metal only.
                  oneOf:
                    - type: object
                      properties:
                        isNew:
                          type: boolean
                          const: false
                        id:
                          anyOf:
                            - type: integer
                              exclusiveMinimum: 0
                              maximum: 9007199254740991
                            - type: string
                              minLength: 1
                      required:
                        - isNew
                        - id
                    - type: object
                      properties:
                        isNew:
                          type: boolean
                          const: true
                        label:
                          type: string
                          minLength: 4
                          maxLength: 255
                          pattern: ^[a-zA-Z0-9_-]+$
                        sizeInGb:
                          type: integer
                          minimum: 256
                          maximum: 64000
                      required:
                        - isNew
                        - label
                        - sizeInGb
                  type: object
              required:
                - rentalType
                - gpuCount
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rental'
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      security:
        - Authorization: []
components:
  schemas:
    Rental:
      type: object
      properties:
        rentalId:
          type: string
        name:
          type:
            - string
            - 'null'
        label:
          type:
            - string
            - 'null'
        rentalType:
          type: string
          enum:
            - virtual-machine
            - bare-metal
        region:
          type: string
          enum:
            - us-central-1
            - us-central-2
            - eu-north-2
            - eu-west-2
            - eu-north-4
            - eu-north-5
            - us-east-1
            - us-east-2
            - ca-east-3
            - eu-north-6
            - eu-north-7
            - eu-north-8
            - eu-north-9
            - ca-west-1
            - ca-east-1
            - us-central-3
            - us-southeast-1
            - me-central-1
            - ca-east-2
            - eu-west-1
            - us-southeast-2
            - jp-east-1
            - us-southeast-3
            - eu-west-5
            - us-east-3
            - uk-central-3
            - uk-southeast-3
            - eu-southwest-3
            - eu-southwest-3-1
            - eu-west-3
            - eu-west-4
            - private-cloud
        gpuType:
          type: string
          enum:
            - h100
            - h200
            - b200
            - rtx-6000-pro
        gpuCount:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        gpuFormFactor:
          type: string
          enum:
            - sxm5
            - sxm6
            - pcie
        connectionType:
          type: string
          enum:
            - infiniband
            - ethernet
        ethernetVariant:
          anyOf:
            - type: string
              enum:
                - normal
                - rocev2
            - type: 'null'
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/RentalNode'
        sshEndpoints:
          type: array
          items:
            $ref: '#/components/schemas/SshEndpoint'
        networkInterfaces:
          type: array
          items:
            $ref: '#/components/schemas/NetworkInterface'
        portMappings:
          type: array
          items:
            $ref: '#/components/schemas/PortMapping'
        supportsPortForwarding:
          type: boolean
        exposedPorts:
          type: array
          items:
            type: number
        supportsCustomPorts:
          type: boolean
        supportsMultipleSshKeys:
          type: boolean
        supportsSshKeyUpdates:
          type: boolean
        attachedStorage:
          type: array
          items:
            $ref: '#/components/schemas/AttachedStorage'
        supportsAttachedStorage:
          type: boolean
        monitoringEnabled:
          type: boolean
        convertToOnDemandOnExpiry:
          type:
            - boolean
            - 'null'
        terminationReason:
          type:
            - string
            - 'null'
        currentTerm:
          oneOf:
            - type: object
              properties:
                effectiveAt:
                  type: string
                  format: date-time
                  example: '2025-01-31T12:00:00.000Z'
                termType:
                  type: string
                  const: on-demand
                costPerHour:
                  type: number
                reservedUntil:
                  type: 'null'
                reservationEndsAt:
                  type: 'null'
                termPeriodDays:
                  type: 'null'
                discountPercentage:
                  type: 'null'
                originalCostPerHour:
                  type: 'null'
              required:
                - effectiveAt
                - termType
                - costPerHour
                - reservedUntil
                - reservationEndsAt
                - termPeriodDays
                - discountPercentage
                - originalCostPerHour
              additionalProperties: false
            - type: object
              properties:
                effectiveAt:
                  type: string
                  format: date-time
                  example: '2025-01-31T12:00:00.000Z'
                termType:
                  type: string
                  const: reserved
                costPerHour:
                  type: number
                reservedUntil:
                  anyOf:
                    - type: string
                      format: date-time
                      example: '2025-01-31T12:00:00.000Z'
                    - type: 'null'
                reservationEndsAt:
                  anyOf:
                    - type: string
                      format: date-time
                      example: '2025-01-31T12:00:00.000Z'
                    - type: 'null'
                termPeriodDays:
                  type: number
                discountPercentage:
                  type: number
                originalCostPerHour:
                  type: number
              required:
                - effectiveAt
                - termType
                - costPerHour
                - reservedUntil
                - reservationEndsAt
                - termPeriodDays
                - discountPercentage
                - originalCostPerHour
              additionalProperties: false
            - type: object
              properties:
                effectiveAt:
                  type: string
                  format: date-time
                  example: '2025-01-31T12:00:00.000Z'
                termType:
                  type: string
                  const: private-cloud
                costPerHour:
                  type: number
                reservedUntil:
                  type: 'null'
                reservationEndsAt:
                  type: 'null'
                termPeriodDays:
                  type: 'null'
                discountPercentage:
                  type: 'null'
                originalCostPerHour:
                  type: 'null'
              required:
                - effectiveAt
                - termType
                - costPerHour
                - reservedUntil
                - reservationEndsAt
                - termPeriodDays
                - discountPercentage
                - originalCostPerHour
              additionalProperties: false
          type: object
        createdAt:
          type: string
          format: date-time
          example: '2025-01-31T12:00:00.000Z'
        updatedAt:
          anyOf:
            - type: string
              format: date-time
              example: '2025-01-31T12:00:00.000Z'
            - type: 'null'
        startedAt:
          anyOf:
            - type: string
              format: date-time
              example: '2025-01-31T12:00:00.000Z'
            - type: 'null'
        terminatedAt:
          anyOf:
            - type: string
              format: date-time
              example: '2025-01-31T12:00:00.000Z'
            - type: 'null'
        userId:
          type: string
        orgId:
          type:
            - string
            - 'null'
        createdBy:
          $ref: '#/components/schemas/RentalCreator'
        privateCluster:
          anyOf:
            - $ref: '#/components/schemas/PrivateCluster'
            - type: 'null'
        managedCluster:
          anyOf:
            - $ref: '#/components/schemas/ManagedClusterRef'
            - type: 'null'
      required:
        - rentalId
        - name
        - label
        - rentalType
        - region
        - gpuType
        - gpuCount
        - gpuFormFactor
        - connectionType
        - ethernetVariant
        - nodes
        - sshEndpoints
        - networkInterfaces
        - portMappings
        - supportsPortForwarding
        - exposedPorts
        - supportsCustomPorts
        - supportsMultipleSshKeys
        - supportsSshKeyUpdates
        - attachedStorage
        - supportsAttachedStorage
        - monitoringEnabled
        - convertToOnDemandOnExpiry
        - terminationReason
        - currentTerm
        - createdAt
        - updatedAt
        - startedAt
        - terminatedAt
        - userId
        - orgId
        - createdBy
        - privateCluster
        - managedCluster
      additionalProperties: false
      description: A GPU rental.
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Invalid input data error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Authorization not provided
        code:
          type: string
          description: The error code
          example: UNAUTHORIZED
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Authorization not provided error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Authorization not provided
        issues: []
    error.FORBIDDEN:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Insufficient access
        code:
          type: string
          description: The error code
          example: FORBIDDEN
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Insufficient access error (403)
      description: The error information
      example:
        code: FORBIDDEN
        message: Insufficient access
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
    RentalNode:
      type: object
      properties:
        cpuModel:
          type: string
        cpuCount:
          type:
            - number
            - 'null'
        vcpuCount:
          type:
            - number
            - 'null'
        gpuCount:
          type: number
        ramGb:
          type: number
        storageGb:
          type: number
      required:
        - cpuModel
        - cpuCount
        - vcpuCount
        - gpuCount
        - ramGb
        - storageGb
      additionalProperties: false
      description: Hardware of one node of a rental, normalised across machine types.
    SshEndpoint:
      type: object
      properties:
        host:
          type: string
        port:
          type: number
        user:
          type: string
      required:
        - host
        - port
        - user
      additionalProperties: false
      description: Where to connect to a rental over SSH.
    NetworkInterface:
      type: object
      properties:
        publicIp:
          type: string
        privateIp:
          type: string
      required:
        - publicIp
        - privateIp
      additionalProperties: false
      description: The public and private addresses of one node of a rental.
    PortMapping:
      type: object
      properties:
        externalPort:
          type: number
        internalPort:
          type: number
      required:
        - externalPort
        - internalPort
      additionalProperties: false
      description: >-
        A port reachable from outside, and the port it reaches inside the
        machine.
    AttachedStorage:
      type: object
      properties:
        storageVolumeId:
          type: string
        label:
          type: string
        sizeInGb:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        virtualIp:
          type: string
        costPerHourCents:
          type: number
      required:
        - storageVolumeId
        - label
        - sizeInGb
        - virtualIp
        - costPerHourCents
      additionalProperties: false
      description: A storage volume as seen from a rental it is attached to.
    RentalCreator:
      type: object
      properties:
        id:
          type: string
        name:
          type:
            - string
            - 'null'
        email:
          type: string
        picture:
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - email
        - picture
      additionalProperties: false
      description: The user who created a rental.
    PrivateCluster:
      type: object
      properties:
        gpuModel:
          type:
            - string
            - 'null'
        location:
          type:
            - string
            - 'null'
        sshUser:
          type: string
        sshPort:
          type:
            - number
            - 'null'
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/PrivateClusterNode'
        handover:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - gpuModel
        - location
        - sshUser
        - sshPort
        - nodes
        - handover
      additionalProperties: false
      description: The topology of a dedicated private cluster.
    ManagedClusterRef:
      type: object
      properties:
        name:
          type: string
        label:
          type:
            - string
            - 'null'
      required:
        - name
        - label
      additionalProperties: false
      description: The managed Kubernetes cluster a rental is a node pool of.
    PrivateClusterNode:
      type: object
      properties:
        role:
          type: string
          enum:
            - login
            - head
            - compute
        hostname:
          type:
            - string
            - 'null'
        publicIp:
          type:
            - string
            - 'null'
        privateIp:
          type: string
      required:
        - role
        - hostname
        - publicIp
        - privateIp
      additionalProperties: false
      description: One machine of a dedicated private cluster.
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.