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

# Create a virtual machine rental

> Create a virtual machine rental



## OpenAPI

````yaml /api-reference/openapi.json post /v2/on-demand/virtual-machine-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: bare-metal-rentals
    description: Manage bare metal rentals
    x-group: Bare Metal Rentals
  - name: virtual-machine-rentals
    description: Manage virtual machine rentals
    x-group: Virtual Machine 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
paths:
  /v2/on-demand/virtual-machine-rentals:
    post:
      tags:
        - virtual-machine-rentals
      summary: Create a virtual machine rental
      description: Create a virtual machine rental
      operationId: ondemand-createVirtualMachineRental
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                gpuCount:
                  type: number
                networkType:
                  default: ethernet
                  type: string
                  enum:
                    - infiniband
                    - ethernet
                region:
                  default: us-central-1
                  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
                    - 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
                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: number
                discountPercentage:
                  default: 0
                  type: number
                monitoringEnabled:
                  type: boolean
                customPorts:
                  maxItems: 20
                  type: array
                  items:
                    type: integer
                    minimum: 1
                    maximum: 65535
                convertToOnDemandOnExpiry:
                  default: true
                  type: boolean
                sshPublicKeyId:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                sshPublicKeyIds:
                  minItems: 1
                  type: array
                  items:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
              required:
                - 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:
          anyOf:
            - type: string
            - type: 'null'
        label:
          anyOf:
            - type: string
            - type: '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
            - 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
        attachedStorage:
          type: array
          items:
            $ref: '#/components/schemas/AttachedStorage'
        supportsAttachedStorage:
          type: boolean
        monitoringEnabled:
          type: boolean
        convertToOnDemandOnExpiry:
          anyOf:
            - type: boolean
            - type: 'null'
        terminationReason:
          anyOf:
            - type: string
            - type: '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:
          anyOf:
            - type: string
            - type: '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
        - 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:
          anyOf:
            - type: number
            - type: 'null'
        vcpuCount:
          anyOf:
            - type: number
            - type: '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:
          anyOf:
            - type: string
            - type: 'null'
        email:
          type: string
        picture:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - id
        - name
        - email
        - picture
      additionalProperties: false
      description: The user who created a rental.
    PrivateCluster:
      type: object
      properties:
        gpuModel:
          anyOf:
            - type: string
            - type: 'null'
        location:
          anyOf:
            - type: string
            - type: 'null'
        sshUser:
          type: string
        sshPort:
          anyOf:
            - type: number
            - type: '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:
          anyOf:
            - type: string
            - type: '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:
          anyOf:
            - type: string
            - type: 'null'
        publicIp:
          anyOf:
            - type: string
            - type: '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.