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

# Cancel a movie

> Cancel a movie job if it has not completed.



## OpenAPI

````yaml /openapi/keyframe.v1.yaml post /movies/{movie_id}/cancel
openapi: 3.1.0
info:
  title: Keyframe API
  version: 1.0.0
  summary: Create generated movies from prompts and references.
  description: |
    The Keyframe API creates generated movies from creative briefs, reference
    media, and production constraints.

    This specification describes a proposed public v1 API and may change before
    public availability.
servers:
  - url: https://api.keyframe.art/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: References
    description: Upload and manage durable reference media.
  - name: Movies
    description: Create, inspect, cancel, and retrieve movie jobs.
paths:
  /movies/{movie_id}/cancel:
    post:
      tags:
        - Movies
      summary: Cancel a movie
      description: Cancel a movie job if it has not completed.
      operationId: cancelMovie
      parameters:
        - $ref: '#/components/parameters/MovieId'
      responses:
        '200':
          description: Movie canceled or already terminal.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Movie'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    MovieId:
      name: movie_id
      in: path
      required: true
      description: Movie ID.
      schema:
        type: string
        pattern: ^movie_[A-Za-z0-9]+$
  schemas:
    Movie:
      type: object
      required:
        - id
        - status
        - created_at
        - updated_at
      properties:
        id:
          type: string
          examples:
            - movie_abc123
        status:
          $ref: '#/components/schemas/MovieStatus'
        prompt:
          type: string
        duration_seconds:
          type: integer
        aspect_ratio:
          $ref: '#/components/schemas/AspectRatio'
        progress:
          type: object
          nullable: true
          properties:
            percent:
              type: integer
              minimum: 0
              maximum: 100
            stage:
              type: string
        error:
          allOf:
            - $ref: '#/components/schemas/ErrorObject'
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    MovieStatus:
      type: string
      enum:
        - queued
        - planning
        - generating
        - rendering
        - completed
        - failed
        - canceled
    AspectRatio:
      type: string
      enum:
        - '16:9'
        - '9:16'
        - '1:1'
        - '4:5'
    ErrorObject:
      type: object
      required:
        - code
        - message
        - request_id
      properties:
        code:
          type: string
          examples:
            - invalid_request
        message:
          type: string
        request_id:
          type: string
          examples:
            - req_abc123
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````