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

# /api/v3/contents/generations/tasks/{task_id}

> Query the status and result of a generation task by ID.

Authenticate with `Authorization: Bearer <API_KEY>`.

## Task status

| status | Description |
| - | - |
| `queued` | Queued |
| `running` | Generating |
| `succeeded` | Succeeded. The video URL is in `content.video_url` |
| `failed` | Failed. The reason is in `error` |
| `cancelled` | Cancelled |
| `expired` | Expired |

Keep polling while the status is `queued` or `running`; the others are terminal. Poll about every 10 seconds.

## Result fields

* `content.video_url` is a temporary download URL. Save the file before it expires. After expiry, `video_url` is no longer returned.
* `content.expireAt` is the expiry time of `video_url`, in Unix seconds.
* `created_at` and `updated_at` are Unix seconds.
* `usage` is the actual usage.
* Whether fields such as `priority` and `safety_identifier` are returned depends on whether they were passed at creation and on the task status.

## Generation failures

A task can fail after it is created. The query then returns HTTP 200 with `status` set to `failed` and an `error` object containing `code`, `type` and `message`. Failures caused by parameters or content moderation return the corresponding error code; failures caused by internal or upstream issues use `InternalServiceError`.

```json theme={null}
{
  "id": "task_20261020080000abcdef",
  "model": "dreamina-seedance-2-0-260128",
  "status": "failed",
  "error": {
    "code": "InternalServiceError",
    "type": "InternalServerError",
    "message": "Media generation failed."
  },
  "created_at": 1792396500,
  "updated_at": 1792396620
}
```


## OpenAPI

````yaml en/api-reference/openapi.json GET /api/v3/contents/generations/tasks/{task_id}
openapi: 3.1.0
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api-vip.apigo.ai
security:
  - bearerAuth: []
paths:
  /api/v3/contents/generations/tasks/{task_id}:
    get:
      summary: Get a Seedance video generation task
      description: Query the status and result of a generation task by ID.
      parameters:
        - name: task_id
          in: path
          required: true
          description: The `id` returned when the task was created.
          schema:
            type: string
            example: task_20261020080000abcdef
      responses:
        '200':
          description: Task details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeedanceTask'
              example:
                id: task_20261020080000abcdef
                model: dreamina-seedance-2-0-260128
                status: succeeded
                content:
                  video_url: https://media.example.com/result.mp4?signature=xxx
                  expireAt: 1792483200
                created_at: 1792396500
                updated_at: 1792396800
                resolution: 720p
                ratio: '16:9'
                duration: 5
                generate_audio: true
                framespersecond: 24
                priority: 0
                usage:
                  completion_tokens: 100000
                  total_tokens: 100000
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeedanceErrorResponse'
              example:
                error:
                  code: AuthenticationError
                  message: The API key is missing or invalid.
                  param: ''
                  type: Unauthorized
        '403':
          description: Insufficient balance, or blocked by IP allowlist or model permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeedanceErrorResponse'
              example:
                error:
                  code: AccountOverdueError
                  message: Your account balance is insufficient.
                  param: ''
                  type: Forbidden
        '404':
          description: Task not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeedanceErrorResponse'
              example:
                error:
                  code: NotFound
                  message: The specified task task_20261020080000abcdef is not found.
                  param: ''
                  type: NotFound
        '429':
          description: Too many requests or API key quota reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeedanceErrorResponse'
              example:
                error:
                  code: AccountRateLimitExceeded
                  message: Too many requests, please retry later.
                  param: ''
                  type: TooManyRequests
components:
  schemas:
    SeedanceTask:
      type: object
      properties:
        id:
          type: string
          description: Task ID.
        model:
          type: string
          description: Model ID.
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - failed
            - cancelled
            - expired
          description: >-
            Task status. `queued` and `running` are in progress; `succeeded`,
            `failed`, `cancelled` and `expired` are terminal.
        content:
          type: object
          description: Generation result, returned when `status=succeeded`.
          properties:
            video_url:
              type: string
              description: Temporary download URL of the video. Save the file promptly.
            expireAt:
              type: integer
              description: Expiry time of `video_url`, in Unix seconds.
        error:
          type: object
          description: Failure reason, returned when `status=failed`.
          properties:
            code:
              type: string
              description: Error code, for example `InvalidParameter`.
            message:
              type: string
              description: Error message.
            type:
              type: string
              description: Error type, for example `BadRequest`.
        created_at:
          type: integer
          description: Creation time, Unix seconds.
        updated_at:
          type: integer
          description: Last update time, Unix seconds.
        resolution:
          type: string
          description: Output resolution, for example `720p`.
        ratio:
          type: string
          description: Aspect ratio, for example `16:9` or `1:1`.
        duration:
          type: integer
          description: Video length in seconds.
        generate_audio:
          type: boolean
          description: >-
            Whether to generate sound. Set to `true` when using a reference
            audio or the original sound of a reference video.
        framespersecond:
          type: integer
          description: Frame rate.
        priority:
          type: integer
          description: Task priority. Echoed back in the query result when provided.
        safety_identifier:
          type: string
          description: >-
            End-user identifier. Use an irreversible hash. Echoed back in the
            query result when provided.
        usage:
          type: object
          description: Actual usage.
          properties:
            completion_tokens:
              type: integer
            total_tokens:
              type: integer
    SeedanceErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          description: Error object.
          properties:
            code:
              type: string
              description: Error code, for example `InvalidParameter`.
            message:
              type: string
              description: Error message.
            param:
              type: string
              description: Name of the offending parameter. May be empty.
            type:
              type: string
              description: Error type, for example `BadRequest`.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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