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

# Get video generation task status

> Poll a generic video generation task for progress and the final video URL

## Task status values

| Status        | Meaning                                     |
| ------------- | ------------------------------------------- |
| `queued`      | Waiting in queue                            |
| `in_progress` | Generation in progress                      |
| `completed`   | Done — download the video from `url`        |
| `failed`      | Generation failed — check the `error` field |

## Polling guidance

Tasks typically complete in 30 seconds to a few minutes depending on the
model and video length. Poll every 5–10 seconds and set a reasonable
timeout (e.g. 10 minutes).


## OpenAPI

````yaml /openapi/videos.en.yaml get /v1/video/generations/{task_id}
openapi: 3.1.0
info:
  title: InfinityBlue API — Videos
  version: 1.0.0
  summary: Unified AI video generation endpoints
  description: >
    Video generation endpoints using an **async task model**:

    submit a task → poll for status → retrieve the result.


    InfinityBlue provides two video endpoint families:


    - **Generic video endpoints** (`/v1/video/generations`): multi-vendor
    support
      for Kling, Veo, and others. Request style is close to the OpenAI Images API,
      making it suitable for cross-model scenarios.
    - **Seedance 2.0 endpoints** (`/v1/videos`): optimised for ByteDance
    Seedance 2.0.
      Exposes richer Seedance-specific parameters (`seconds`, `resolution`, `ratio`,
      `generate_audio`, `camera_fixed`, etc.) and supports advanced multimodal inputs
      such as first/last frame references, video references, and audio references.

    ## Typical flow


    1. `POST /v1/video/generations` or `POST /v1/videos` — submit the task,
    receive `task_id`

    2. `GET /v1/video/generations/{task_id}` or `GET /v1/videos/{task_id}` —
       poll until `status` is `completed` or `failed`
    3. Read the video URL from `url` / `metadata.url`, or download via
       `GET /v1/videos/{task_id}/content`

    ## Authentication


    Every request must include your API key in the header:

    ```

    Authorization: Bearer YOUR_API_KEY

    ```
  contact:
    name: InfinityBlue
    url: https://getinfinityblue.com
servers:
  - url: https://api.getinfinityblue.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Videos
    description: >
      Generic video generation endpoints supporting Kling, Veo, and other
      vendors,

      using a submit → poll → retrieve async task model.
  - name: Seedance 2.0
    description: |
      ByteDance Seedance 2.0 dedicated video endpoints with richer parameters,
      including first/last frame, video reference, and audio reference support.
paths:
  /v1/video/generations/{task_id}:
    get:
      tags:
        - Videos
      summary: Get video generation task status
      description: |
        Query the status and result of a generic video generation task.
        Poll every 5–10 seconds until `status` becomes `completed` or `failed`.
      operationId: getVideoGeneration
      parameters:
        - name: task_id
          in: path
          description: Task ID returned by the create endpoint.
          required: true
          schema:
            type: string
          example: abcd1234efgh
      responses:
        '200':
          description: Task status retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationTaskStatus'
              examples:
                in_progress:
                  summary: In progress
                  value:
                    task_id: abcd1234efgh
                    status: in_progress
                completed:
                  summary: Completed
                  value:
                    task_id: abcd1234efgh
                    status: completed
                    url: https://example.com/generated-video.mp4
                    format: mp4
                    metadata:
                      duration: 5
                      fps: 30
                      width: 1280
                      height: 720
                      seed: 20231234
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Task not found, not completed yet, or content already expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    VideoGenerationTaskStatus:
      type: object
      description: Status response for a generic video generation task.
      properties:
        task_id:
          type: string
          description: Task ID.
          examples:
            - abcd1234efgh
        status:
          type: string
          description: Task status.
          enum:
            - queued
            - in_progress
            - completed
            - failed
          examples:
            - completed
        url:
          type: string
          description: Video file URL, populated when `status=completed`.
          examples:
            - https://example.com/generated-video.mp4
        format:
          type: string
          description: Video format.
          examples:
            - mp4
        metadata:
          $ref: '#/components/schemas/VideoGenerationMetadata'
        error:
          $ref: '#/components/schemas/VideoGenerationError'
    ErrorResponse:
      type: object
      description: Standard error response.
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Error message.
              examples:
                - Invalid duration. Supported range is 4 to 15 seconds.
            type:
              type: string
              description: Error type.
              examples:
                - invalid_request_error
            param:
              type:
                - string
                - 'null'
              description: The parameter related to the error.
              examples:
                - seconds
            code:
              type:
                - string
                - 'null'
              description: Error code.
              examples:
                - invalid_duration
    VideoGenerationMetadata:
      type: object
      description: Metadata about the generated video, including actual specs.
      properties:
        duration:
          type: number
          description: Actual video duration in seconds.
          examples:
            - 5
        fps:
          type: integer
          description: Actual frame rate (fps).
          examples:
            - 30
        width:
          type: integer
          description: Actual video width in pixels.
          examples:
            - 1280
        height:
          type: integer
          description: Actual video height in pixels.
          examples:
            - 720
        seed:
          type: integer
          description: Random seed that was actually used.
          examples:
            - 20231234
    VideoGenerationError:
      type: object
      description: Error information for a failed video task.
      properties:
        code:
          type: integer
          description: Error code.
        message:
          type: string
          description: Error message.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >
        Bearer token authentication, format: `Authorization: Bearer sk-xxxxxx`.

        Get your API key in the
        [console](https://api.getinfinityblue.com/console).

````