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

# Wan2 Task Query

> Poll the video generation task until `status` becomes `succeeded` or `failed`.



## OpenAPI

````yaml en/api-reference/model-api/alibaba/openapi/wan2-task-query/openapi.yaml GET /v1/video/generations/{task_id}
openapi: 3.1.0
info:
  title: Wan video task query
  description: Query the status and result of a Wan2 video generation task
  version: 1.0.0
servers:
  - url: https://ai.cubeuaeai.com
security:
  - bearerAuth: []
paths:
  /v1/video/generations/{task_id}:
    get:
      summary: Query a video task
      description: >-
        Poll the video generation task until `status` becomes `succeeded` or
        `failed`.
      operationId: queryWanVideoTask
      parameters:
        - name: task_id
          in: path
          required: true
          description: Task ID returned by the create-task API.
          schema:
            type: string
            example: task_abc123
      responses:
        '200':
          description: Query succeeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: 0 indicates success.
                    example: 0
                  data:
                    type: object
                    properties:
                      task_id:
                        type: string
                      status:
                        type: string
                        enum:
                          - queued
                          - processing
                          - succeeded
                          - failed
                        description: Task status.
                      format:
                        type: string
                        description: Video format (e.g. `mp4`).
                      url:
                        type: string
                        description: >-
                          Video download URL after success (valid for about 24
                          hours).
                      error:
                        type: string
                        description: Error message when the task fails.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Task not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````