> ## 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 Seedance video task status

> Poll a Seedance video task for progress and the final video URL

## Task status values

| Status        | Meaning                                                |
| ------------- | ------------------------------------------------------ |
| `queued`      | Waiting in queue                                       |
| `in_progress` | Generation in progress; `progress` reflects percentage |
| `completed`   | Done — video URL in `metadata.url`                     |
| `failed`      | Generation failed — check the `error` field            |

## Polling guidance

Seedance tasks typically complete in 30 seconds to a few minutes.
Poll every 5–10 seconds and surface the `progress` value to users.

## Retrieving the video

Two options once the task is complete:

* Use the CDN link in `metadata.url` directly (valid until `expires_at`)
* Call `GET /v1/videos/{task_id}/content` to proxy-download through the API


## OpenAPI

````yaml /openapi/videos.en.yaml get /v1/videos/{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/videos/{task_id}:
    get:
      tags:
        - Seedance 2.0
      summary: Get Seedance video task status
      description: |
        Retrieve the status, progress, and result of a Seedance video task.
        Once the task is complete, the video file URL is available in
        `metadata.url`.
      operationId: getSeedanceVideo
      parameters:
        - name: task_id
          in: path
          description: Video task ID — the `id` field returned by the create endpoint.
          required: true
          schema:
            type: string
          example: video_abc123
      responses:
        '200':
          description: Task status retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeedanceVideoTask'
              examples:
                queued:
                  summary: Queued
                  value:
                    id: video_abc123
                    object: video
                    model: doubao-seedance-2-0-fast-260128
                    status: queued
                    progress: 0
                    created_at: 1764347090922
                    seconds: '5'
                completed:
                  summary: Completed
                  value:
                    id: video_abc123
                    object: video
                    model: doubao-seedance-2-0-fast-260128
                    status: completed
                    progress: 100
                    created_at: 1764347090922
                    completed_at: 1764347170000
                    seconds: '5'
                    size: 1280x720
                    metadata:
                      url: https://example.com/generated-video.mp4
        '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:
    SeedanceVideoTask:
      type: object
      description: >-
        Seedance video task object, compatible with the OpenAI / Sora video task
        format.
      required:
        - id
        - object
        - model
        - status
        - progress
        - created_at
        - seconds
      properties:
        id:
          type: string
          description: Video task ID.
          examples:
            - video_abc123
        object:
          type: string
          description: Object type, always `video`.
          enum:
            - video
          examples:
            - video
        model:
          type: string
          description: The model that processed the task.
          enum:
            - doubao-seedance-2-0-260128
            - doubao-seedance-2-0-fast-260128
          examples:
            - doubao-seedance-2-0-fast-260128
        status:
          type: string
          description: Task status.
          enum:
            - queued
            - in_progress
            - completed
            - failed
          examples:
            - queued
        progress:
          type: integer
          description: Task progress as a percentage (0–100).
          minimum: 0
          maximum: 100
          examples:
            - 0
        created_at:
          type: integer
          format: int64
          description: Task creation timestamp in milliseconds.
          examples:
            - 1764347090922
        seconds:
          type: string
          description: Video duration in seconds.
          examples:
            - '5'
        completed_at:
          type: integer
          format: int64
          description: Task completion timestamp in milliseconds, populated when complete.
          examples:
            - 1764347170000
        expires_at:
          type: integer
          format: int64
          description: Expiry timestamp for the task and video file, in milliseconds.
          examples:
            - 1764433570000
        size:
          type: string
          description: Video dimensions, e.g. `1280x720`.
          examples:
            - 1280x720
        error:
          $ref: '#/components/schemas/SeedanceVideoError'
        metadata:
          type: object
          description: Additional metadata. Contains `url` once the task is complete.
          additionalProperties: true
          properties:
            url:
              type: string
              format: uri
              description: Video file URL.
              examples:
                - https://example.com/generated-video.mp4
    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
    SeedanceVideoError:
      type: object
      description: Error information for a failed Seedance video task.
      properties:
        message:
          type: string
          description: Error message.
          examples:
            - generation failed
        code:
          type: string
          description: Error code.
          examples:
            - generation_failed
  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).

````