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

# MiniMax-H3 查询视频任务

> 根据 task_id 查询 MiniMax-H3 视频生成任务的状态、结果和用量。

<script src="/feedback.js" />


## OpenAPI

````yaml api-reference/model-api/minimax/openapi/minimax-h3/openapi.yaml GET /minimax/v2/query/video_generation/{task_id}
openapi: 3.1.0
info:
  title: MiniMax-H3 视频生成 API
  description: 通过 AnyFast 创建并查询 MiniMax-H3 多模态视频生成任务。
  version: 1.0.0
servers:
  - url: https://www.anyfast.com.cn
security:
  - bearerAuth: []
tags:
  - name: MiniMax-H3
    description: MiniMax-H3 视频生成任务
paths:
  /minimax/v2/query/video_generation/{task_id}:
    get:
      tags:
        - MiniMax-H3
      summary: 查询视频生成任务
      description: 根据任务 ID 查询最近 7 天内创建的 MiniMax-H3 视频任务状态、结果和用量。
      operationId: queryMiniMaxH3VideoGeneration
      parameters:
        - name: task_id
          in: path
          required: true
          description: 创建视频任务时返回的任务 ID。
          schema:
            type: string
          example: '1234567890'
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryVideoResponse'
              examples:
                succeeded:
                  summary: 任务已成功
                  value:
                    task:
                      id: '1234567890'
                      model: MiniMax-H3
                      status: succeeded
                      created_at: 1785945600
                      updated_at: 1785945660
                      content:
                        url: https://example.com/generated-video.mp4
                      error: null
                      resolution: 768P
                      duration: 6
                      usage:
                        total_seconds: 6
                        input_seconds: 0
                        output_seconds: 6
                        input_image_count: 0
                      ratio: '16:9'
                      task_type: generation
                      modality: video
                running:
                  summary: 任务处理中
                  value:
                    task:
                      id: '1234567890'
                      model: MiniMax-H3
                      status: running
                      created_at: 1785945600
                      updated_at: 1785945610
                      content: null
                      error: null
                      resolution: 768P
                      duration: 6
                      usage: null
                      ratio: '16:9'
                      task_type: generation
                      modality: video
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: 任务不存在或已超过可查询时间
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    QueryVideoResponse:
      type: object
      required:
        - task
      properties:
        task:
          $ref: '#/components/schemas/VideoTask'
    ErrorResponse:
      type: object
      properties:
        error:
          oneOf:
            - type: object
              properties:
                code:
                  oneOf:
                    - type: string
                    - type: integer
                message:
                  type: string
            - type: string
          description: 错误详情。
        message:
          type: string
          description: 错误信息。
    VideoTask:
      type: object
      required:
        - id
        - model
        - status
        - created_at
        - updated_at
        - task_type
        - modality
      properties:
        id:
          type: string
          description: 任务 ID。
          example: '1234567890'
        model:
          type: string
          description: 实际使用的模型。
          example: MiniMax-H3
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - failed
            - cancelled
          description: 当前任务状态。
          example: succeeded
        created_at:
          type: integer
          format: int64
          description: 任务创建时间，Unix 时间戳。
          example: 1785945600
        updated_at:
          type: integer
          format: int64
          description: 任务最后更新时间，Unix 时间戳。
          example: 1785945660
        content:
          oneOf:
            - $ref: '#/components/schemas/VideoResult'
            - type: 'null'
          description: 生成结果；任务成功前可能为 `null`。
        error:
          oneOf:
            - $ref: '#/components/schemas/TaskError'
            - type: 'null'
          description: 失败信息；未失败时为 `null`。
        resolution:
          type: string
          enum:
            - 768P
            - 2K
          description: 输出视频分辨率。
          example: 768P
        duration:
          type: integer
          minimum: 4
          maximum: 15
          description: 输出视频时长，单位为秒。
          example: 6
        usage:
          oneOf:
            - $ref: '#/components/schemas/VideoUsage'
            - type: 'null'
          description: 任务用量；处理中可能为 `null`。
        ratio:
          type: string
          description: 输出视频宽高比。
          example: '16:9'
        task_type:
          type: string
          enum:
            - generation
          description: 任务类型。
          example: generation
        modality:
          type: string
          enum:
            - video
          description: 输出模态。
          example: video
    VideoResult:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          format: uri
          description: 生成视频的下载地址。
          example: https://example.com/generated-video.mp4
    TaskError:
      type: object
      properties:
        code:
          oneOf:
            - type: string
            - type: integer
          description: 任务错误码。
        message:
          type: string
          description: 任务失败原因。
    VideoUsage:
      type: object
      properties:
        total_seconds:
          type: number
          description: 总计费秒数。
          example: 6
        input_seconds:
          type: number
          description: 输入视频或音频秒数。
          example: 0
        output_seconds:
          type: number
          description: 输出视频秒数。
          example: 6
        input_image_count:
          type: integer
          description: 输入图片数量。
          example: 0
  responses:
    BadRequest:
      description: 请求参数有误
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: API Key 缺失或无效
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: 请求频率超限
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServerError:
      description: 服务端错误
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 使用 `Bearer YOUR_API_KEY` 格式传入 AnyFast API Key。

````