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

# Cancel Dedicated Endpoint

> Cancel service at /api/v1/dedicated/endpoints/{id}/cancel

## Overview

Cancels an endpoint; the action behind `morph dedicated stop`. Before activation, it takes effect immediately and the endpoint moves to `refunding`. A `ready` or `suspended` endpoint keeps serving and billing until `cancelEffectiveAt`, then moves to `canceled`.

Repeating the call returns the same date. Organization keys require an organization admin.


## OpenAPI

````yaml POST /api/v1/dedicated/endpoints/{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, Reflex classification, Singleshot typed decisions,
    fine-tuning, and dedicated endpoint management. 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: reflex
    description: 'Per-turn classifiers: realtime prediction and batches.'
  - name: singleshot
    description: 'Typed decisions: a state in, a calibrated distribution per question out.'
  - name: fine-tuning
    description: Reflex fine-tuning job lifecycle.
  - name: models
    description: Model listing and management.
  - name: dedicated
    description: Dedicated endpoint discovery, status, and cancellation.
  - name: telemetry
    description: Usage reporting hooks.
paths:
  /api/v1/dedicated/endpoints/{id}/cancel:
    post:
      tags:
        - dedicated
      summary: Cancel a dedicated endpoint
      description: >-
        Before activation, cancels immediately and refunds collected payment. A
        `ready` or `suspended` endpoint keeps serving and billing until its
        contractual end date. Idempotent. Organization keys require an
        organization admin.
      operationId: cancelDedicatedEndpoint
      parameters:
        - schema:
            type: string
            format: uuid
            description: Id of an endpoint the key owns.
            example: 7f3c9a12-4b8e-4d21-9c6a-2e5f8b1d0a47
          required: true
          description: Identifies the endpoint to cancel.
          name: id
          in: path
      responses:
        '200':
          description: Cancellation scheduled.
          content:
            application/json:
              example:
                cancelEffectiveAt: '2026-12-30T09:14:00.000Z'
              schema:
                $ref: '#/components/schemas/DedicatedCancelResponse'
        '401':
          $ref: '#/components/responses/DedicatedUnauthorized'
        '403':
          description: The key belongs to an organization member who is not an admin.
          content:
            application/json:
              example:
                error: An organization admin must cancel service
              schema:
                $ref: '#/components/schemas/DedicatedError'
        '404':
          $ref: '#/components/responses/DedicatedNotFound'
        '409':
          description: The endpoint has already ended or failed and cannot be canceled.
          content:
            application/json:
              example:
                error: This order cannot be canceled in its current state
              schema:
                $ref: '#/components/schemas/DedicatedError'
      security:
        - bearerAuth: []
components:
  schemas:
    DedicatedCancelResponse:
      type: object
      properties:
        cancelEffectiveAt:
          type: string
          format: date-time
          description: >-
            When service ends. Now for an endpoint that was not yet `ready` (it
            moves to `refunding`); the contractual end date for a `ready` or
            `suspended` endpoint.
          example: '2026-12-30T09:14:00.000Z'
      required:
        - cancelEffectiveAt
      description: The scheduled cancellation. Repeating the call returns the same date.
      example:
        cancelEffectiveAt: '2026-12-30T09:14:00.000Z'
    DedicatedError:
      type: object
      properties:
        error:
          type: string
          description: Why the dedicated endpoint request failed.
          example: Endpoint not found
      required:
        - error
      description: Error body returned by the dedicated endpoint routes.
      example:
        error: Endpoint not found
  responses:
    DedicatedUnauthorized:
      description: The Authorization header is missing or holds an invalid Morph API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DedicatedError'
          example:
            error: Unauthorized
    DedicatedNotFound:
      description: >-
        No endpoint with this id belongs to the key. Endpoints owned by another
        account also return 404, so existence is never leaked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DedicatedError'
          example:
            error: Endpoint not found
  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.