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

# Estimate a movie

> Estimate credits and rough runtime before creating a billable movie job.



## OpenAPI

````yaml /openapi/keyframe.v1.yaml post /movies/estimate
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/estimate:
    post:
      tags:
        - Movies
      summary: Estimate a movie
      description: Estimate credits and rough runtime before creating a billable movie job.
      operationId: estimateMovie
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMovieRequest'
      responses:
        '200':
          description: Movie estimate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MovieEstimate'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    CreateMovieRequest:
      type: object
      required:
        - prompt
      properties:
        prompt:
          type: string
          minLength: 10
          maxLength: 8000
          description: Creative brief for the movie.
        duration_seconds:
          type: integer
          minimum: 5
          maximum: 120
          default: 30
          description: Target final movie duration.
        aspect_ratio:
          $ref: '#/components/schemas/AspectRatio'
        style:
          type: string
          maxLength: 1000
          description: Natural-language style direction.
        references:
          type: array
          maxItems: 20
          items:
            $ref: '#/components/schemas/MovieReferenceInput'
        webhook_url:
          type: string
          format: uri
          description: Optional HTTPS endpoint for lifecycle events.
    MovieEstimate:
      type: object
      required:
        - estimated_credits
        - estimated_runtime_seconds
        - currency
        - amount_minor
      properties:
        estimated_credits:
          type: integer
          minimum: 0
          description: Estimated credits required to create the movie.
        estimated_runtime_seconds:
          type: integer
          minimum: 0
          description: Rough wall-clock generation time.
        currency:
          type: string
          minLength: 3
          maxLength: 3
          examples:
            - USD
        amount_minor:
          type: integer
          minimum: 0
          description: Estimated monetary value in minor currency units.
        assumptions:
          type: array
          items:
            type: string
          description: Important assumptions used for the estimate.
    AspectRatio:
      type: string
      enum:
        - '16:9'
        - '9:16'
        - '1:1'
        - '4:5'
    MovieReferenceInput:
      type: object
      required:
        - reference_id
        - role
      properties:
        reference_id:
          type: string
          examples:
            - ref_abc123
        role:
          $ref: '#/components/schemas/ReferenceRole'
        description:
          type: string
          maxLength: 1000
          description: Per-movie usage instructions for this reference.
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    ReferenceRole:
      type: string
      enum:
        - character
        - product
        - location
        - style
        - audio
        - document
        - other
    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
  responses:
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: Rate limit exceeded.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
            minimum: 1
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````