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

# Query video task

> Retrieve status, progress, results, and errors for an asynchronous video generation task by task_id.

After creating a video task, call this endpoint with the returned `task_id`. Poll at a reasonable interval until the task reaches a terminal state; for production workloads, prefer `callback_url` on the create request.

## Task statuses

| `status`     | Meaning                                           | Recommended action                        |
| ------------ | ------------------------------------------------- | ----------------------------------------- |
| `pending`    | The task is queued.                               | Wait and poll again.                      |
| `processing` | The provider is generating the result.            | Wait and poll again.                      |
| `completed`  | The task completed; outputs are in `data.result`. | Download and persist the outputs.         |
| `failed`     | The task failed.                                  | Inspect the error fields and request log. |
| `cancelled`  | The task was cancelled.                           | Stop polling.                             |


## OpenAPI

````yaml api-reference/openapi/query-video-task.yaml GET /v1/videos/status/{task_id}
openapi: 3.1.0
info:
  title: Query Video Task API
  version: 1.0.0
servers:
  - url: https://api.apipod.ai
    description: Production
security: []
paths:
  /v1/videos/status/{task_id}:
    get:
      tags:
        - Video tasks
      summary: Get Generation Task
      operationId: get-query-video-task
      parameters:
        - name: task_id
          in: path
          required: true
          description: APIPod asynchronous task ID returned by the create endpoint.
          schema:
            type: string
          example: vid_task_01JEXAMPLE
      responses:
        '200':
          description: Task status
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                    const: 200
                  message:
                    type: string
                    description: Response message.
                    const: success
                  data:
                    type: object
                    properties:
                      task_id:
                        type: string
                        description: Public APIPod task ID.
                      status:
                        type: string
                        description: Public task status.
                        enum:
                          - pending
                          - processing
                          - completed
                          - failed
                          - cancelled
                      progress:
                        type: integer
                        description: Completion progress when available.
                        minimum: 0
                        maximum: 100
                      result:
                        type: array
                        items:
                          type: string
                        description: Generated artifact URLs returned after completion.
                      completed_at:
                        type: integer
                        description: Unix completion timestamp in seconds.
                      error:
                        type: string
                        description: Client-safe asynchronous error message.
                    required:
                      - task_id
                      - status
                required:
                  - code
                  - message
                  - data
              example:
                code: 200
                message: success
                data:
                  task_id: vid_task_01JEXAMPLE
                  status: completed
                  progress: 100
                  result:
                    - https://cdn.example.com/generated.mp4
                  completed_at: 1786358400
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: APIPod API key
      description: Use your APIPod API key as a Bearer token in the Authorization header.

````