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

# Query Video Template Generation Task

> Use this API to query the task status of generated videos.



## OpenAPI

````yaml GET /v1/query/video_template_generation
openapi: 3.1.0
info:
  title: MiniMax API
  description: MiniMax video template generation API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.minimax.io
security:
  - bearerAuth: []
paths:
  /v1/query/video_template_generation:
    get:
      tags:
        - Video
      operationId: queryVideoTemplateGenerationTask
      parameters:
        - name: task_id
          in: query
          required: true
          description: >-
            The ID of the task to query. You can only query tasks created under
            the current account.
          schema:
            type: string
          example: '401047179385389059'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryVideoTemplateGenerationTaskResp'
components:
  schemas:
    QueryVideoTemplateGenerationTaskResp:
      type: object
      properties:
        task_id:
          type: string
          description: The ID of the queried task.
        status:
          $ref: '#/components/schemas/VideoProcessStatus'
        video_url:
          type: string
          description: >-
            Returned when the task is successful. The download URL of the
            generated video.


            ⚠️ Note: The download link is valid for 9 hours.
        base_resp:
          $ref: '#/components/schemas/QueryBaseResp'
      example:
        task_id: '401047179385389059'
        status: Success
        video_url: https://cdn.hailuoai.com/prod/video_20250714_141232_cdc5ba74.mp4
        base_resp:
          status_code: 0
          status_msg: success
    VideoProcessStatus:
      type: string
      enum:
        - Preparing
        - Processing
        - Success
        - Fail
      description: |-
        The status of the task. Possible values:

        - `Preparing` – Preparing
        - `Processing` – In progress
        - `Success` – Completed successfully
        - `Fail` – Failed
    QueryBaseResp:
      type: object
      description: Contains the status code and details.
      properties:
        status_code:
          type: integer
          format: int32
          description: >-
            Status codes and their meanings:


            `0`: Request successful

            `1002`: Rate limit triggered, please try again later

            `1004`: Authentication failed, check if the API Key is correct

            `1026`: Input content contains sensitive material

            `1027`: Generated video contains sensitive material


            For more information, please refer to the [Error Code
            Reference](https://platform.minimax.io/document/error_code?key=68ad64216fe587e3fbfe7acf).
        status_msg:
          type: string
          description: Status message. Returns success if the request is successful.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        `HTTP: Bearer Auth`

        - Security Scheme Type: http

        - HTTP Authorization Scheme: `Bearer API_key`, can be found in [Account
        Management>API
        Keys](https://platform.minimax.io/user-center/basic-information/interface-key).

````