> ## 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.

# Give Notice on Compute

> End a reservation at /api/v1/compute/reservations/{id}/cancel

## Overview

Gives notice; the action behind `morph compute cancel`. The reservation ends on `lastDay`: the end of the term or monthly period it is in, or the end of the next month when that month is already invoiced. A month is invoiced 15 days before it starts. The nodes stay yours through that day and are wiped after it.

To see the day before you commit, read `noticeLastDay` from [Get Compute Reservation](https://docs.morphllm.com/api-reference/endpoint/compute-get.md). Notice is not refused for timing, and repeating the call returns the same day. Organization keys require an organization admin.


## OpenAPI

````yaml POST /api/v1/compute/reservations/{id}/cancel
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/{id}/cancel:
    post:
      tags:
        - compute
      summary: Give notice on a compute reservation
      description: >-
        Ends the reservation on its `noticeLastDay`: the last day of the term or
        monthly period it is in, or of the next month when that month is already
        invoiced (a month is invoiced 15 days before it starts). The nodes stay
        through that day, then are wiped. Notice on a reservation made at
        checkout is not refused for timing. Idempotent. Requires an organization
        admin.
      operationId: cancelComputeReservation
      parameters:
        - schema:
            type: string
            format: uuid
            description: Id of a reservation the organization owns.
            example: b81f2c40-7d9e-4a35-9c16-3f5a8e0d2b74
          required: true
          description: Identifies the reservation to end.
          name: id
          in: path
      responses:
        '200':
          description: Notice recorded.
          content:
            application/json:
              example:
                lastDay: '2027-02-03'
              schema:
                $ref: '#/components/schemas/ComputeNotice'
        '401':
          $ref: '#/components/responses/ComputeUnauthorized'
        '403':
          $ref: '#/components/responses/ComputeAdminRequired'
        '404':
          $ref: '#/components/responses/ComputeNotFound'
        '409':
          description: >-
            The reservation has already ended, or it is a cluster Morph set up
            under a contract, where notice goes through that contract. The
            message says which.
          content:
            application/json:
              example:
                error: This reservation has ended.
              schema:
                $ref: '#/components/schemas/ComputeError'
      security:
        - bearerAuth: []
components:
  schemas:
    ComputeNotice:
      type: object
      properties:
        lastDay:
          type: string
          description: >-
            Last day the nodes are yours, as a UTC date: the reservation’s
            `noticeLastDay` at the moment notice was given.
          example: '2027-02-03'
      required:
        - lastDay
      description: The recorded notice. Repeating the call returns the same day.
      example:
        lastDay: '2027-02-03'
    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.
  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.
    ComputeNotFound:
      description: >-
        No reservation with this id belongs to the key’s organization. Another
        organization’s reservation also returns 404, so existence is never
        leaked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ComputeError'
          example:
            error: >-
              Reservation not found. List yours with GET
              /api/v1/compute/reservations.
  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.