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

# Get a video job

> Returns a video job as it stands now. Requires the API key of the account that created it. `urls` and `usage` appear when `status` is `completed`, `error` when it is `failed`.



## OpenAPI

````yaml /openapi/naga-api.json get /v1/videos/{id}
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}:
    get:
      tags:
        - Videos
      summary: Get a video job
      description: >-
        Returns a video job as it stands now. Requires the API key of the
        account that created it. `urls` and `usage` appear when `status` is
        `completed`, `error` when it is `failed`.
      operationId: get_video
      parameters:
        - name: id
          in: path
          description: The job's `id`, as `POST /v1/videos` returned it.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The job as it stands now.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoJob'
              examples:
                basic:
                  summary: A completed job and what it cost
                  value:
                    id: 4b1f0c2e9a7d4e6f8a3b5c1d2e7f9a0b
                    object: video.generation
                    model: kling-v3.0-pro
                    status: completed
                    polling_url: >-
                      https://api.naga.ac/v1/videos/4b1f0c2e9a7d4e6f8a3b5c1d2e7f9a0b
                    created_at: 1774000000
                    duration: 8
                    resolution: 720p
                    aspect_ratio: '16:9'
                    completed_at: 1774000095
                    urls:
                      - >-
                        https://api.naga.ac/v1/videos/4b1f0c2e9a7d4e6f8a3b5c1d2e7f9a0b/content
                    usage:
                      cost: '0.672'
                      seconds: 8
          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
        '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
            \
              -H "Authorization: Bearer $NAGA_API_KEY"
components:
  schemas:
    VideoJob:
      type: object
      description: A video job as the gateway reports it.
      required:
        - id
        - object
        - model
        - status
        - polling_url
        - created_at
        - duration
        - resolution
        - aspect_ratio
      properties:
        id:
          type: string
          description: The job id; the polling and content URLs carry it.
        object:
          type: string
          description: Always `video.generation`.
          example: video.generation
        model:
          type: string
          description: The model the job was submitted for, as the caller named it.
        status:
          type: string
          description: '`pending`, `in_progress`, `completed` or `failed`.'
        polling_url:
          type: string
          description: Where to poll this job.
        created_at:
          type: integer
          format: int64
          description: Unix seconds when the job was accepted.
        completed_at:
          type:
            - integer
            - 'null'
          format: int64
          description: Unix seconds when the job reached `completed` or `failed`.
        duration:
          type: integer
          format: int64
          description: The requested clip length in seconds.
        resolution:
          type: string
          description: The requested resolution.
        aspect_ratio:
          type: string
          description: The requested aspect ratio.
        urls:
          type:
            - array
            - 'null'
          items:
            type: string
          description: Links to the finished file; present once the job is `completed`.
        usage:
          oneOf:
            - allOf:
                - $ref: '#/components/schemas/VideoUsage'
              description: What the job was charged; present once the job is `completed`.
            - type: 'null'
        error:
          oneOf:
            - allOf:
                - $ref: '#/components/schemas/VideoJobError'
              description: >-
                Why the job failed; present only when it is `failed`. A failed
                job is not charged.
            - type: 'null'
    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.
    VideoUsage:
      type: object
      description: The charge of a finished job.
      required:
        - cost
        - seconds
      properties:
        cost:
          type: string
          description: Credits charged, as a decimal string.
        seconds:
          type: integer
          format: int64
          description: Seconds of video the charge counts.
    VideoJobError:
      type: object
      description: Why a job failed.
      required:
        - message
        - type
      properties:
        message:
          type: string
          description: A short, provider-neutral reason.
        type:
          type: string
          description: '`upstream_error`, `moderation` or `timeout`.'
    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.