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

# Cancel a prediction

> Record-only cancellation: the prediction is marked cancelled and never bills. There is no 404 on this route today — an unknown id (or a backend cancel failure) surfaces as a 500 gateway error.



## OpenAPI

````yaml /openapi_specs/video_api.json post /v1/prediction/{id}/cancel
openapi: 3.1.0
info:
  title: eachlabs Video API (beta)
  version: v1-beta
  description: >-
    Machine-readable contract for the eachlabs Video API: 45 capability input
    schemas embedded token-for-token from the engine's capability registry (the
    canonical contract — content and key order preserved, whitespace re-flowed;
    keep_ranges and silence_remove are one capability under two accepted names),
    the prediction submit/poll/cancel envelopes, and the error taxonomy.
    GENERATED — do not edit by hand; regenerate with `make openapi` in
    be-monorepo/video-api. Human documentation:
    https://docs.eachlabs.ai/video/overview.
  contact:
    name: eachlabs
    url: https://docs.eachlabs.ai/video/overview
  x-generator: be-monorepo/video-api cmd/openapigen
servers:
  - url: https://api.eachlabs.ai
security:
  - BearerAuth: []
tags:
  - name: video
    description: eachlabs Video API prediction surface
externalDocs:
  description: Human documentation for the video surface
  url: https://docs.eachlabs.ai/video/overview
paths:
  /v1/prediction/{id}/cancel:
    post:
      tags:
        - video
      summary: Cancel a prediction
      description: >-
        Record-only cancellation: the prediction is marked cancelled and never
        bills. There is no 404 on this route today — an unknown id (or a backend
        cancel failure) surfaces as a 500 gateway error.
      operationId: cancelVideoPrediction
      parameters:
        - description: The prediction id returned by submit as predictionID.
          example: eb474c68-0fc6-40a3-8c4a-63f1b064b8b0
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                message: Prediction canceled successfully
                predictionID: 1f0fdf4d-7b3c-4e9a-8d25-c61f90ab4e73
                status: success
              schema:
                $ref: '#/components/schemas/CancelPredictionResponse'
          description: Cancellation recorded.
        '401':
          content:
            application/json:
              schema:
                description: Empty object.
                type: object
          description: Missing or invalid API key. The body is an empty JSON object today.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
          description: Unknown prediction id or a backend cancel failure.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
          description: Any other gateway failure.
components:
  schemas:
    CancelPredictionResponse:
      description: Body of POST /v1/prediction/{id}/cancel.
      properties:
        message:
          type: string
        predictionID:
          type: string
        status:
          type: string
      required:
        - status
        - message
        - predictionID
      type: object
    GatewayError:
      description: >-
        Gateway-level error body for errors mapped by the gateway's error
        handler (unknown prediction, internal failures), e.g. {"status": 404,
        "error": "not found"}. Exceptions returning an empty JSON object body
        today: 401 (missing or invalid API key), 400 (request validation), and
        422 (malformed JSON).
      properties:
        details:
          description: Optional detail; shape varies by the failing layer.
        error:
          type: string
        status:
          description: HTTP status code echoed in the body.
          type: integer
      type: object
  securitySchemes:
    BearerAuth:
      description: >-
        Your eachlabs API key (dashboard → API keys), sent as Authorization:
        Bearer <api_key> on every request. One key authenticates and bills every
        video operation.
      scheme: bearer
      type: http

````