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

# Reserve Compute

> Hold whole GPU nodes and get a bank checkout URL at /api/v1/compute/reservations

## Overview

Holds whole nodes for the key's organization; the write behind `morph compute reserve`. The response carries `checkoutUrl`, the bank payment page for the first invoice. This call charges nothing.

The hold is released if the invoice is not paid in time. On `502` the nodes are held but the payment page was not created: pay the open invoice in the dashboard and do not reserve again.

Send `expectedMonthlyCents` to have the order refused if the price changed since you read the offer. Organization keys require an organization admin.


## OpenAPI

````yaml POST /api/v1/compute/reservations
openapi: 3.1.0
info:
  title: Morph API
  version: 1.2.0
  description: >-
    The Morph public API at api.morphllm.com: OpenAI- and Anthropic-compatible
    inference (chat completions, messages), Fast Apply code editing, Compact
    context compression, System One typed decisions, speech to text (audio
    transcription and translation), model listing, and dedicated endpoint
    management, agentic credit top-ups paid over x402, account usage and billing
    settings, and organization member budgets. Model ids, prices, and context
    windows are served live at https://www.morphllm.com/api/models/json.
  contact:
    name: Morph
    url: https://morphllm.com
    email: info@morphllm.com
  license:
    name: Proprietary
    url: https://morphllm.com/privacy/tos
servers:
  - url: https://api.morphllm.com
    description: Production
security: []
tags:
  - name: chat
    description: >-
      OpenAI- and Anthropic-compatible chat inference, including Fast Apply and
      WarpGrep models.
  - name: compact
    description: Context compression for long agent conversations.
  - name: systemone
    description: 'Typed decisions: a state in, a probability distribution per question out.'
  - name: audio
    description: >-
      Speech to text: transcription and translation of audio files,
      OpenAI-compatible.
  - name: models
    description: Model listing.
  - name: dedicated
    description: Dedicated endpoint discovery, status, and cancellation.
  - name: compute
    description: >-
      Dedicated compute: reserve whole GPU nodes by the month, manage SSH keys,
      give notice. Limited preview.
  - name: credits
    description: Agentic credit top-ups paid in USDC over x402.
  - name: account
    description: >-
      Usage and spend per day; billing settings: extra usage, spend limit and
      alert, auto-reload.
  - name: organization
    description: Organization member budgets.
  - name: telemetry
    description: Usage reporting hooks.
paths:
  /api/v1/compute/reservations:
    post:
      tags:
        - compute
      summary: Reserve compute
      description: >-
        Holds whole nodes for the key’s organization and returns the bank
        payment page for the first invoice. Nothing is charged by this call. The
        hold is released if the invoice is not paid in time, and an organization
        holds one unpaid reservation at a time. Requires an organization admin.
      operationId: createComputeReservation
      requestBody:
        description: The offer, size, start date and first term, with the terms accepted.
        content:
          application/json:
            example:
              poolId: 5d0c1e7a-3b62-4f19-a8d4-0e9b7c21f6a3
              nodes: 1
              startsOn: '2027-01-04'
              months: 1
              acceptedTerms: true
              sshKey:
                name: laptop
                publicKey: >-
                  ssh-ed25519
                  AAAAC3NzaC1lZDI1NTE5AAAAIHk0m2pQd6v1ZxW3c8rT5uYbN7aLfJ9sKqE4oVgXhC2D
                  you@laptop
            schema:
              $ref: '#/components/schemas/ComputeReserveBody'
      responses:
        '201':
          description: Nodes held. Pay at `checkoutUrl`.
          content:
            application/json:
              example:
                reservation:
                  id: b81f2c40-7d9e-4a35-9c16-3f5a8e0d2b74
                  label: 8x HGX B300
                  hardware: NVIDIA HGX B300, XDR InfiniBand
                  region: US West
                  gpuCount: 8
                  nodeCount: 1
                  status: awaiting_payment
                  startsOn: '2027-01-04'
                  termEnd: '2027-02-03'
                  renews: monthly
                  login: ubuntu
                  jumpHost: null
                  nodes: []
                  createdAt: '2027-01-04T09:02:00.000Z'
                  holdUntil: '2027-01-04T09:32:00.000Z'
                  sshKeyCount: 1
                  sshKeyError: null
                  monthlyCents: 584000
                  noticeLastDay: null
                  suspensionEndsOn: null
                checkoutUrl: https://checkout.stripe.com/c/pay/cs_live_a1B2c3D4e5F6g7H8i9J0
              schema:
                $ref: '#/components/schemas/ComputeReserved'
        '400':
          description: >-
            A field is missing or invalid, or `acceptedTerms` is not `true`. The
            message names the field.
          content:
            application/json:
              example:
                error: 'Invalid startsOn: must be a date as YYYY-MM-DD'
              schema:
                $ref: '#/components/schemas/ComputeError'
        '401':
          $ref: '#/components/responses/ComputeUnauthorized'
        '403':
          $ref: '#/components/responses/ComputeAdminRequired'
        '404':
          description: No offer with this `poolId` is on sale.
          content:
            application/json:
              example:
                error: >-
                  No hardware "5d0c1e7a-3b62-4f19-a8d4-0e9b7c21f6a3" is on sale.
                  List what is with GET /api/v1/compute/offers.
              schema:
                $ref: '#/components/schemas/ComputeError'
        '409':
          description: >-
            The order cannot be made as sent: not enough free nodes on those
            dates, an unpaid reservation already held, an SSH key that is not a
            public key, or a price that differs from `expectedMonthlyCents`.
            Nothing was reserved.
          content:
            application/json:
              example:
                error: Only 1 node is free from Jan 4 to Feb 3.
              schema:
                $ref: '#/components/schemas/ComputeError'
        '502':
          description: >-
            The nodes were reserved but the bank payment page could not be
            created. The body also carries `reservationId`. Pay the open invoice
            in the dashboard; do not reserve again.
          content:
            application/json:
              example:
                error: >-
                  Your nodes are held as reservation
                  b81f2c40-7d9e-4a35-9c16-3f5a8e0d2b74, but the bank payment
                  page did not open. Pay the open invoice at
                  https://www.morphllm.com/dashboard/dedicated/compute before
                  the hold runs out, or email info@morphllm.com. Do not reserve
                  again.
              schema:
                $ref: '#/components/schemas/ComputeError'
      security:
        - bearerAuth: []
components:
  schemas:
    ComputeReserveBody:
      type: object
      properties:
        poolId:
          type: string
          format: uuid
          description: An offer `id` from `GET /api/v1/compute/offers`.
          example: 5d0c1e7a-3b62-4f19-a8d4-0e9b7c21f6a3
        nodes:
          type: integer
          minimum: 1
          maximum: 1000
          description: Whole nodes, up to the offer’s `maxNodesPerOrder`.
          example: 1
        startsOn:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
          description: First day as `YYYY-MM-DD`, from today (UTC) to 90 days out.
          example: '2027-01-04'
        months:
          type: integer
          minimum: 1
          maximum: 12
          description: >-
            First term in months, from the offer’s `minTermMonths` to 12. The
            reservation then renews monthly.
          example: 1
        acceptedTerms:
          type: boolean
          enum:
            - true
          description: >-
            Must be `true`: acceptance of the terms (1 month minimum, prepaid
            monthly in advance, renews monthly until notice, whole nodes).
            Recorded on the reservation.
          example: true
        billingEmail:
          type: string
          maxLength: 254
          description: Where invoices go. Defaults to the key owner’s email.
          example: billing@example.com
        sshKey:
          allOf:
            - $ref: '#/components/schemas/ComputeSshKeyBody'
            - description: >-
                The first key on the nodes. More are added through the SSH key
                routes.
        expectedMonthlyCents:
          type: integer
          minimum: 1
          description: >-
            The first month you expect to pay, in US cents: the offer’s
            `firstMonthCentsByNodes` entry for this many nodes. When sent, the
            order is refused with 409 if the price differs. The example is
            illustrative.
          example: 584000
      required:
        - poolId
        - nodes
        - startsOn
        - months
        - acceptedTerms
      description: 'A reservation to make. Carries no price: the server prices it.'
      example:
        poolId: 5d0c1e7a-3b62-4f19-a8d4-0e9b7c21f6a3
        nodes: 1
        startsOn: '2027-01-04'
        months: 1
        acceptedTerms: true
        sshKey:
          name: laptop
          publicKey: >-
            ssh-ed25519
            AAAAC3NzaC1lZDI1NTE5AAAAIHk0m2pQd6v1ZxW3c8rT5uYbN7aLfJ9sKqE4oVgXhC2D
            you@laptop
    ComputeReserved:
      type: object
      properties:
        reservation:
          allOf:
            - $ref: '#/components/schemas/ComputeReservation'
            - description: The new reservation, `awaiting_payment`.
              example:
                id: b81f2c40-7d9e-4a35-9c16-3f5a8e0d2b74
                label: 8x HGX B300
                hardware: NVIDIA HGX B300, XDR InfiniBand
                region: US West
                gpuCount: 8
                nodeCount: 1
                status: awaiting_payment
                startsOn: '2027-01-04'
                termEnd: '2027-02-03'
                renews: monthly
                login: ubuntu
                jumpHost: null
                nodes: []
                createdAt: '2027-01-04T09:02:00.000Z'
                holdUntil: '2027-01-04T09:32:00.000Z'
                sshKeyCount: 1
                sshKeyError: null
                monthlyCents: 584000
                noticeLastDay: null
                suspensionEndsOn: null
        checkoutUrl:
          type: string
          format: uri
          description: Bank payment page for the first invoice. Open it in a browser.
          example: https://checkout.stripe.com/c/pay/cs_live_a1B2c3D4e5F6g7H8i9J0
      required:
        - reservation
        - checkoutUrl
      description: A held reservation and where to pay for it.
      example:
        reservation:
          id: b81f2c40-7d9e-4a35-9c16-3f5a8e0d2b74
          label: 8x HGX B300
          hardware: NVIDIA HGX B300, XDR InfiniBand
          region: US West
          gpuCount: 8
          nodeCount: 1
          status: awaiting_payment
          startsOn: '2027-01-04'
          termEnd: '2027-02-03'
          renews: monthly
          login: ubuntu
          jumpHost: null
          nodes: []
          createdAt: '2027-01-04T09:02:00.000Z'
          holdUntil: '2027-01-04T09:32:00.000Z'
          sshKeyCount: 1
          sshKeyError: null
          monthlyCents: 584000
          noticeLastDay: null
          suspensionEndsOn: null
        checkoutUrl: https://checkout.stripe.com/c/pay/cs_live_a1B2c3D4e5F6g7H8i9J0
    ComputeError:
      type: object
      properties:
        error:
          type: string
          description: Why the request failed and what to change, as one or two sentences.
          example: >-
            Reservation not found. List yours with GET
            /api/v1/compute/reservations.
      required:
        - error
      description: Error body returned by the compute routes.
      example:
        error: >-
          Reservation not found. List yours with GET
          /api/v1/compute/reservations.
    ComputeSshKeyBody:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 64
          description: A name for the key, up to 64 characters.
          example: laptop
        publicKey:
          type: string
          minLength: 1
          maxLength: 16384
          description: 'One SSH public key: the contents of a `.pub` file.'
          example: >-
            ssh-ed25519
            AAAAC3NzaC1lZDI1NTE5AAAAIHk0m2pQd6v1ZxW3c8rT5uYbN7aLfJ9sKqE4oVgXhC2D
            you@laptop
      required:
        - name
        - publicKey
      description: An SSH public key and its name.
      example:
        name: laptop
        publicKey: >-
          ssh-ed25519
          AAAAC3NzaC1lZDI1NTE5AAAAIHk0m2pQd6v1ZxW3c8rT5uYbN7aLfJ9sKqE4oVgXhC2D
          you@laptop
    ComputeReservation:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Reservation id. Pass it to the status, cancel and SSH key routes.
          example: b81f2c40-7d9e-4a35-9c16-3f5a8e0d2b74
        label:
          type: string
          description: The whole reservation as a short label.
          example: 8x HGX B300
        hardware:
          type: string
          description: Full hardware description.
          example: NVIDIA HGX B300, XDR InfiniBand
        region:
          type: string
          description: Region of the nodes.
          example: US West
        gpuCount:
          type: integer
          description: GPUs across all nodes.
          example: 8
        nodeCount:
          type: integer
          description: Whole nodes reserved.
          example: 1
        status:
          type: string
          enum:
            - awaiting_payment
            - provisioning
            - running
            - suspended
            - ending
            - ended
          description: >-
            The field to act on. `awaiting_payment`: nodes held, first invoice
            unpaid. `provisioning`: payment started, nodes being prepared.
            `running`: nodes handed over, SSH works. `suspended`: an invoice is
            unpaid 7 days past due, your SSH keys are off the nodes until it is
            paid, and the reservation ends on `suspensionEndsOn`. `ending`:
            notice given, nodes stay through `termEnd`. `ended`: nodes returned
            and wiped.
          example: running
        startsOn:
          type:
            - string
            - 'null'
          description: First day, as a UTC date.
          example: '2027-01-04'
        termEnd:
          type:
            - string
            - 'null'
          description: >-
            Last day of the first term. Once notice is given, the last day of
            the reservation.
          example: '2027-02-03'
        renews:
          type: string
          enum:
            - monthly
            - none
          description: >-
            `monthly` renews on each monthly anniversary of `startsOn` until
            notice. `none` ends on `termEnd`.
          example: monthly
        login:
          type:
            - string
            - 'null'
          description: >-
            SSH login on every node: `ssh <login>@<publicIp>`. Null when the
            nodes are not reached over SSH.
          example: ubuntu
        jumpHost:
          type:
            - string
            - 'null'
          description: >-
            Set when nodes are reached through a jump host: `ssh -J <jumpHost>
            <login>@<publicIp>`. Null means direct.
          example: null
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/ComputeNode'
          description: The nodes. Empty until they are handed over.
          example:
            - name: node-01
              status: running
              state: running
              publicIp: 203.0.113.21
              privateIp: 10.20.0.21
              gpus: 8
              gpusSeen: 8
              checkedAt: '2027-01-04T09:20:00.000Z'
              metrics: true
        createdAt:
          type: string
          format: date-time
          description: ISO 8601 time the reservation was made.
          example: '2027-01-04T09:02:00.000Z'
        holdUntil:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Set only while `status` is `awaiting_payment`: the ISO 8601 time the
            unpaid hold releases its nodes. Pay the first invoice before it.
            Otherwise null.
          example: null
        sshKeyCount:
          type:
            - integer
            - 'null'
          description: >-
            SSH keys on the reservation, counting ones still being applied or
            removed. Null when its keys are not managed here (Morph manages
            access under a contract).
          example: 1
        sshKeyError:
          type:
            - string
            - 'null'
          description: >-
            Why the newest key that failed could not be applied or removed yet.
            Null when none has. The SSH key list says which key.
          example: null
        monthlyCents:
          type:
            - integer
            - 'null'
          description: >-
            What the reservation bills a month in US cents, excluding tax. Null
            unless the key’s owner is an organization admin. The example is
            illustrative.
          example: 584000
        noticeLastDay:
          type:
            - string
            - 'null'
          description: >-
            The last day the reservation would run if notice were given now, as
            a UTC date: the end of the term or monthly period it is in, or the
            end of the next month when that month is already invoiced. Read it
            before giving notice. Set only while notice can be given here: a
            `running` reservation made at checkout with no notice yet. Otherwise
            null.
          example: '2027-02-03'
        suspensionEndsOn:
          type:
            - string
            - 'null'
          description: >-
            Set only while `status` is `suspended`: the UTC date the reservation
            ends and its nodes are wiped unless the unpaid invoice is paid
            first. Otherwise null.
          example: null
      required:
        - id
        - label
        - hardware
        - region
        - gpuCount
        - nodeCount
        - status
        - startsOn
        - termEnd
        - renews
        - login
        - jumpHost
        - nodes
        - createdAt
        - holdUntil
        - sshKeyCount
        - sshKeyError
        - monthlyCents
        - noticeLastDay
        - suspensionEndsOn
      description: One reservation and how to reach its nodes.
      example:
        id: b81f2c40-7d9e-4a35-9c16-3f5a8e0d2b74
        label: 8x HGX B300
        hardware: NVIDIA HGX B300, XDR InfiniBand
        region: US West
        gpuCount: 8
        nodeCount: 1
        status: running
        startsOn: '2027-01-04'
        termEnd: '2027-02-03'
        renews: monthly
        login: ubuntu
        jumpHost: null
        nodes:
          - name: node-01
            status: running
            state: running
            publicIp: 203.0.113.21
            privateIp: 10.20.0.21
            gpus: 8
            gpusSeen: 8
            checkedAt: '2027-01-04T09:20:00.000Z'
            metrics: true
        createdAt: '2027-01-04T09:02:00.000Z'
        holdUntil: null
        sshKeyCount: 1
        sshKeyError: null
        monthlyCents: 584000
        noticeLastDay: '2027-02-03'
        suspensionEndsOn: null
    ComputeNode:
      type: object
      properties:
        name:
          type: string
          description: Hostname of the node.
          example: node-01
        status:
          type: string
          enum:
            - running
            - restarting
            - maintenance
            - down
          description: >-
            The recorded status. `restarting` is set by a restart request and
            cleared when the node is back; the rest are set by Morph operations.
          example: running
        state:
          type: string
          enum:
            - running
            - restarting
            - maintenance
            - down
            - degraded
            - unchecked
          description: >-
            The field to act on: `status` corrected by the health probe, as the
            dashboard shows it. `degraded`: reachable with fewer GPUs than it
            has. `down`: the probe cannot reach it. `unchecked`: no probe
            reading in the last 15 minutes.
          example: running
        publicIp:
          type:
            - string
            - 'null'
          description: Address to SSH to.
          example: 203.0.113.21
        privateIp:
          type:
            - string
            - 'null'
          description: Address on the reservation’s own network, when it has one.
          example: 10.20.0.21
        gpus:
          type:
            - integer
            - 'null'
          description: >-
            GPUs the node has. Null when the reservation’s GPUs do not divide
            evenly across its nodes.
          example: 8
        gpusSeen:
          type:
            - integer
            - 'null'
          description: >-
            GPUs the health probe last saw on the node. Null before the first
            check.
          example: 8
        checkedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            ISO 8601 time of the health probe’s last reading. Null before the
            first check.
          example: '2027-01-04T09:20:00.000Z'
        metrics:
          type: boolean
          description: >-
            Whether the node reports utilisation, so the metrics route has data
            for it.
          example: true
      required:
        - name
        - status
        - state
        - publicIp
        - privateIp
        - gpus
        - gpusSeen
        - checkedAt
        - metrics
      description: One node of a reservation.
      example:
        name: node-01
        status: running
        state: running
        publicIp: 203.0.113.21
        privateIp: 10.20.0.21
        gpus: 8
        gpusSeen: 8
        checkedAt: '2027-01-04T09:20:00.000Z'
        metrics: true
  responses:
    ComputeUnauthorized:
      description: Missing or invalid Morph API key on a compute request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ComputeError'
          example:
            error: >-
              Missing or invalid API key. Send "Authorization: Bearer <key>"
              with a key from https://www.morphllm.com/dashboard/api-keys
    ComputeAdminRequired:
      description: >-
        The account is outside the limited preview, the key is a personal key,
        or the key belongs to an organization member who is not an admin. Writes
        need an organization admin.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ComputeError'
          example:
            error: >-
              An organization admin must reserve compute. Use an API key created
              by an admin of this organization.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: >-
        Morph API key, passed as `Authorization: Bearer sk-...`. Create keys at
        https://www.morphllm.com/dashboard/api-keys.

````

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