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

# Get video · OpenAI video

> Check task status, handle failures and find the completed video.

## Polling and status

Replace `<TASK_ID>` with the returned `id` and poll every 10 to 15 seconds:

```bash theme={"system"}
curl "https://api.aiohub.org/v1/videos/<TASK_ID>" \
  -H "Authorization: Bearer <AIOHUB_API_KEY>"
```

| `status` | Action |
| - | - |
| `queued` / `in_progress` | Keep polling |
| `completed` | Download the MP4 |
| `failed` | Stop polling and read `error.message` |

After success, [download the video](/en/api/video-content).

## Failures and retries

A `failed` task is a generation failure even with HTTP 200. After a polling disconnect, retry with the same `id`. Correct parameter errors before retrying a 400. Files remain for 72 hours and task records for 7 days.

After a 429 or temporary service error, wait before retrying the read; do not create another task. If a task is missing, check the identifier and the account that owns the API key.


## OpenAPI

````yaml openapi/relay.en.json GET /v1/videos/{task_id}
openapi: 3.0.1
info:
  title: AIOHub API
  description: AIOHub public API
  version: 1.0.0
servers:
  - url: https://api.aiohub.org
security:
  - BearerAuth: []
tags:
  - name: List models
  - name: OpenAI Chat
  - name: OpenAI Responses
  - name: Image generation
  - name: OpenAI Images
  - name: Video generation
  - name: Claude Messages
  - name: Gemini API
  - name: OpenAI Embeddings
  - name: Text completions
  - name: OpenAI Audio
  - name: Realtime API
paths:
  /v1/videos/{task_id}:
    get:
      tags:
        - Video generation
      summary: Get video task status
      description: >
        OpenAI-compatible video task status endpoint.


        Returns detailed video task status information.



        Seedance task status is `queued`, `in_progress`, `completed` or
        `failed`. Download only after `completed`; read `error.message` on
        failure.
      operationId: getVideo
      parameters:
        - name: task_id
          in: path
          description: Video task ID
          required: true
          example: video-123456
          schema:
            type: string
      responses:
        '200':
          description: Video task status retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                  model:
                    type: string
                  status:
                    type: string
                  progress:
                    type: integer
                  created_at:
                    type: integer
                  seconds:
                    type: string
                  error:
                    $ref: '#/components/schemas/OpenAIVideoError'
                required:
                  - id
                  - object
                  - model
                  - status
                  - progress
                  - created_at
                  - seconds
              example:
                id: task_example
                object: video
                model: doubao-seedance-2-5-260628
                status: completed
                progress: 100
                created_at: 1791275108
                seconds: '4'
          headers: {}
        '404':
          description: Task not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    OpenAIVideoError:
      type: object
      description: OpenAI video error information
      properties:
        message:
          type: string
          description: Error message
        code:
          type: string
          description: Error code
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Error message
            type:
              type: string
              description: Error type
            param:
              type: string
              description: Related parameters
              nullable: true
            code:
              type: string
              description: Error code
              nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key (sk-xxx)

````

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