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

# Download a video

> Redirects to the MP4 file of a completed job. Requires the API key of the account that created it. NagaAI keeps the file for a limited time after the job completes.



## OpenAPI

````yaml /openapi/naga-api.json get /v1/videos/{id}/content
openapi: 3.1.0
info:
  title: NagaAI API
  description: >-
    NagaAI routes inference requests to a pool of upstream providers behind one
    endpoint. Requests speak the OpenAI or the Anthropic dialect, and the
    gateway selects a provider that serves the requested model. Two credentials
    exist and they are not interchangeable. An API key reaches models. A
    provisioning key manages the account: its keys, its balance, and its usage.
    Each operation declares which one it accepts. NagaAI charges the account in
    credits for the tokens a request consumes, at the published price of the
    model that served it. One credit costs one US dollar.
  termsOfService: https://naga.ac/legal/terms
  contact:
    name: NagaAI
    url: https://naga.ac
  version: '2026-03-31'
  summary: >-
    One API to many model providers, in the OpenAI and Anthropic request
    formats.
servers:
  - url: https://api.naga.ac
    description: Production
security: []
tags:
  - name: Chat Completions
    description: >-
      The OpenAI Chat Completions dialect, with streaming, tools and multimodal
      input.
    externalDocs:
      url: https://platform.openai.com/docs/api-reference/chat
      description: The OpenAI reference for this dialect.
  - name: Messages
    description: >-
      The Anthropic Messages dialect, as Claude-style clients and agents speak
      it.
    externalDocs:
      url: https://docs.anthropic.com/en/api/messages
      description: The Anthropic reference for this dialect.
  - name: Responses
    description: >-
      The OpenAI Responses dialect, with structured input, tools and streamed
      output items.
    externalDocs:
      url: https://platform.openai.com/docs/api-reference/responses
      description: The OpenAI reference for this dialect.
  - name: Embeddings
    description: Vector embeddings for search, retrieval, clustering and ranking.
    externalDocs:
      url: https://platform.openai.com/docs/api-reference/embeddings
      description: The OpenAI reference for this route.
  - name: Images
    description: Image generation and editing with multimodal models.
    externalDocs:
      url: https://platform.openai.com/docs/api-reference/images
      description: The OpenAI reference for these routes.
  - name: Audio
    description: Speech from text, and text from uploaded audio.
    externalDocs:
      url: https://platform.openai.com/docs/api-reference/audio
      description: The OpenAI reference for these routes.
  - name: Videos
    description: 'Video generation as a job: submit it, poll it, download the file.'
    externalDocs:
      url: https://docs.naga.ac/api/videos
      description: The NagaAI guide to video generation.
  - name: Moderations
    description: Safety classification of text and image input.
    externalDocs:
      url: https://platform.openai.com/docs/api-reference/moderations
      description: The OpenAI reference for this route.
  - name: Models
    description: The catalog of models, their capabilities and their prices.
    externalDocs:
      url: https://platform.openai.com/docs/api-reference/models
      description: The OpenAI reference for this route.
  - name: Startups
    description: The organizations whose models the catalog carries.
    externalDocs:
      url: https://docs.naga.ac/get-started/models
      description: The NagaAI guide to the model catalog.
  - name: Account
    description: The account's balance and its usage, behind a provisioning key.
    externalDocs:
      url: https://docs.naga.ac/account/balance-and-activity
      description: The NagaAI guide to balance and activity.
  - name: API Keys
    description: The account's API keys, behind a provisioning key.
    externalDocs:
      url: https://docs.naga.ac/account/api-keys
      description: The NagaAI guide to API keys.
paths:
  /v1/videos/{id}/content:
    get:
      tags:
        - Videos
      summary: Download a video
      description: >-
        Redirects to the MP4 file of a completed job. Requires the API key of
        the account that created it. NagaAI keeps the file for a limited time
        after the job completes.
      operationId: get_video_content
      parameters:
        - name: id
          in: path
          description: The job's `id`, as `POST /v1/videos` returned it.
          required: true
          schema:
            type: string
      responses:
        '302':
          description: A redirect to the MP4 file.
          headers:
            Location:
              schema:
                type: string
              description: The file's URL.
          x-retry-safe: false
        '401':
          description: >-
            The API key is missing, malformed, disabled, or does not belong to
            an account that may call this route.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              examples:
                invalid-api-key:
                  summary: 401 — the key is not one this gateway serves
                  value:
                    error:
                      type: invalid_api_key
                      message: >-
                        The provided API key is invalid. Please ensure your API
                        key is correct and active. You can find more information
                        about obtaining a key on our website: https://naga.ac If
                        you just created this key, wait a few minutes and try
                        again.
          x-retry-safe: false
        '404':
          description: >-
            No job with this id belongs to the account. Another account's job
            answers the same way.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          x-retry-safe: false
        '409':
          description: 'The job is not `completed`: poll `GET /v1/videos/{id}` first.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          x-retry-safe: false
        '500':
          description: >-
            The gateway failed for a reason of its own. Report it — this status
            marks NagaAI's own bugs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          x-retry-safe: true
        '503':
          description: >-
            A store the gateway needs did not respond. `Retry-After`, when
            present, carries the suggested wait.
          headers:
            Retry-After:
              schema:
                type: string
              description: How long to wait before retrying, in seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          x-retry-safe: true
      security:
        - bearerAuth: []
        - xApiKeyAuth: []
      x-codeSamples:
        - lang: bash
          label: curl
          source: >-
            curl
            https://api.naga.ac/v1/videos/4b1f0c2e9a7d4e6f8a3b5c1d2e7f9a0b/content
            \
              -H "Authorization: Bearer $NAGA_API_KEY"
components:
  schemas:
    ErrorEnvelope:
      type: object
      description: >-
        `{"error": {…}}` — the body of every non-2xx answer outside
        `/v1/messages`.
      required:
        - error
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ErrorBody'
          description: The failure itself, and the envelope's only member.
    ErrorBody:
      type: object
      description: 'The `error` member: what went wrong, in the caller''s terms.'
      required:
        - type
        - message
      properties:
        type:
          type: string
          description: >-
            The class of the failure; a provider's own class can reach you
            unchanged.
          examples:
            - invalid_request_error
            - authentication_required
            - invalid_api_key
            - invalid_provisioning_key
            - invalid_session_token
            - disabled_api_key
            - disabled_provisioning_key
            - expired_api_key
            - credit_limit_exceeded
            - rate_limit_exceeded
            - model_deprecated
            - inappropriate_content
            - billing_metering_incomplete
            - billing_request_id_invalid
            - billing_writer_missing
            - server_error
        message:
          type: string
          description: The human-readable sentence shown to the caller.
        code:
          type:
            - string
            - 'null'
          description: The finer-grained code, when the failure has one.
        param:
          type:
            - string
            - 'null'
          description: The request field the failure is about, when it is about one.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'An account API key. Send it as `Authorization: Bearer <key>`.'
    xApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        An account API key. Send it as `x-api-key: <key>`, the header
        Anthropic-style clients use.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.