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

# Vidu Task Status Query

> Query the latest status of a Vidu task by task ID.



## OpenAPI

````yaml api-reference/en/zmodelVideo/vidu/vidu-query-task-status.json GET /vidu/ent/v2/tasks/{task_id}/creations
openapi: 3.0.1
info:
  title: Vidu Task Status Query
  version: 1.0.0
  description: >-
    Unified task status query interface for Vidu. Applicable to all types of
    tasks including video, audio, and image generation.
servers:
  - url: https://api.powertokens.ai
    description: Baze API Service Endpoint
security: []
paths:
  /vidu/ent/v2/tasks/{task_id}/creations:
    get:
      tags:
        - Vidu Tasks
      summary: Task Status Query
      description: Query the latest status of a Vidu task by task ID.
      operationId: viduQueryTaskStatus
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
          description: Public task ID returned by the submit endpoint.
      responses:
        '200':
          description: Query successful, returns task status information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskStatusResponse'
              examples:
                success:
                  summary: Task completed successfully
                  value:
                    state: success
                    err_code: ''
                    credits: 4
                    payload: ''
                    creations:
                      - id: your_creations_id
                        url: your_generated_results_url
                        cover_url: your_generated_results_cover_url
                processing:
                  summary: Task processing
                  value:
                    state: processing
                    err_code: ''
                    credits: 0
                    payload: ''
                    creations: []
                failed:
                  summary: Task failed
                  value:
                    state: failed
                    err_code: generation_failed
                    credits: 0
                    payload: ''
                    creations: []
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: Unauthorized
                  value:
                    code: access_denied
                    message: Invalid token
                    data: null
        '404':
          description: Task not found or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                not_found:
                  summary: Task not found
                  value:
                    code: task_not_found
                    message: Task not found or has expired
                    data: null
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                server_error:
                  summary: Server error
                  value:
                    code: internal_server_error
                    message: Internal server error, please try again later
                    data: null
      security:
        - BearerAuth: []
components:
  schemas:
    TaskStatusResponse:
      type: object
      properties:
        state:
          type: string
          enum:
            - created
            - queueing
            - processing
            - success
            - failed
          description: |-
            Task processing state:
            - **created**: Task created successfully
            - **queueing**: Task in queue
            - **processing**: Task processing
            - **success**: Generation successful
            - **failed**: Task failed
        err_code:
          type: string
          description: Error code returned in case of failure. Empty string if no error.
        credits:
          type: integer
          description: 'The number of credits consumed by this task. Unit: credits.'
        payload:
          type: string
          description: The payload parameter used for this call.
        bgm:
          type: boolean
          description: Whether to use BGM (background music) for this call.
        off_peak:
          type: boolean
          description: Whether to use off-peak mode for this call.
        creations:
          type: array
          items:
            $ref: '#/components/schemas/CreationResult'
          description: Generated results array.
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code.
        message:
          type: string
          description: Error message.
        data:
          type: object
          nullable: true
          description: Additional error data.
    CreationResult:
      type: object
      properties:
        id:
          type: string
          description: Creation ID.
        url:
          type: string
          description: The URL of the generated results, valid for 24 hours.
        cover_url:
          type: string
          description: The cover URL of the generated results, valid for 24 hours.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Pass `Authorization: Bearer <token>` in the request header.'

````