> ## 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.

# 查询视频任务状态

> 根据任务 ID 查询异步视频任务的最新状态。

任务完成后，响应中的 `metadata.url` 可用于继续访问结果地址；如果需要直接下载最终文件，请调用 `/v1/videos/{task_id}/content`。



## OpenAPI

````yaml api-reference/zh-Hans/zmodelVideo/minimax/query-video-status.json GET /v1/videos/{task_id}
openapi: 3.0.1
info:
  title: 视频任务状态查询
  version: 1.0.0
  description: 异步视频任务状态查询文档。公开统一入口为 `/v1/videos/{task_id}`，用于查询任务状态、进度与结果。
  license:
    name: Project License
    url: https://github.com/QuantumNous/new-api/blob/main/LICENSE
servers:
  - url: https://api.powertokens.ai
    description: Baze API 服务地址
security: []
tags:
  - name: Hailuo Video
    description: Hailuo 视频任务状态查询
paths:
  /v1/videos/{task_id}:
    get:
      tags:
        - Hailuo Video
      summary: 视频任务状态查询
      description: >-
        根据任务 ID 查询异步视频任务的最新状态。


        任务完成后，响应中的 `metadata.url` 可用于继续访问结果地址；如果需要直接下载最终文件，请调用
        `/v1/videos/{task_id}/content`。
      operationId: minimaxQueryVideoStatus
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
          description: 待查询的任务 ID。只能查询当前账号创建的任务
      responses:
        '200':
          description: 查询成功。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIVideo'
              examples:
                completed:
                  summary: 任务完成
                  value:
                    id: task_abc123
                    object: video
                    model: MiniMax-Hailuo-2.3
                    status: completed
                    progress: 100
                    created_at: 1742515200
                    completed_at: 1742515235
                    metadata:
                      url: https://api.example.com/v1/videos/task_abc123/content
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: 未授权
                  value:
                    code: access_denied
                    message: 无效的令牌
                    data: null
          description: 鉴权失败，例如未提供令牌或令牌无效。
        '404':
          description: 任务不存在或暂不可用。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                not_found:
                  summary: 任务不存在
                  value:
                    code: task_not_found
                    message: 任务不存在或已过期
                    data: null
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                quota_exceeded:
                  summary: 额度不足或速率受限
                  value:
                    code: insufficient_user_quota
                    message: 当前账户额度不足，请稍后重试
                    data: null
          description: 触发速率限制或账户额度不足。
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internal_error:
                  summary: 内部处理失败
                  value:
                    code: gen_relay_info_failed
                    message: 服务内部处理失败，请稍后重试
                    data: null
          description: 服务端处理请求时发生内部错误。
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                bad_gateway:
                  summary: 上游响应异常
                  value:
                    code: bad_response_status_code
                    message: 上游服务返回了无效响应
                    data: null
          description: 上游服务返回异常响应。
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                service_unavailable:
                  summary: 服务暂不可用
                  value:
                    code: get_channel_failed
                    message: 当前模型暂时无可用渠道，请稍后重试
                    data: null
          description: 上游服务暂不可用，或当前模型暂无可用渠道。
      security:
        - BearerAuth: []
components:
  schemas:
    OpenAIVideo:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          example: video
        model:
          type: string
        status:
          type: string
          example: completed
        progress:
          type: integer
          example: 100
        created_at:
          type: integer
          format: int64
        completed_at:
          type: integer
          format: int64
        metadata:
          type: object
          additionalProperties: true
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        data: {}
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: '在请求头中传入 `Authorization: Bearer <token>`。'

````