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

# 查询视频任务状态

> 接口说明：根据 taskId 查询视频生成任务的执行状态与结果。



## OpenAPI

````yaml /openapi/zh/aitoearn.openapi.json get /api/ai/video/generations/{taskId}
openapi: 3.0.1
info:
  title: AiToEarn 开放平台 API
  description: AiToEarn 开放平台 API，支持在中国站与国际站之间切换调试。业务是否成功以响应体 code === 0 为准。
  version: 1.0.0
  contact: {}
servers:
  - url: https://aitoearn.cn
    description: 中国站
  - url: https://aitoearn.ai
    description: 国际站
security: []
tags:
  - name: AI 服务
  - name: AI 服务/视频生成
  - name: AI 服务/图像生成
  - name: AI 服务/模型中转
  - name: 渠道管理
  - name: 渠道管理/账号
  - name: 渠道管理/内容发布
  - name: 渠道管理/平台
  - name: 渠道管理/互动
  - name: 渠道管理/作品
  - name: 渠道管理/账号分组
  - name: 渠道管理/授权
  - name: 资源管理
paths:
  /api/ai/video/generations/{taskId}:
    get:
      tags:
        - AI 服务/视频生成
      summary: 查询视频任务状态
      description: 接口说明：根据 taskId 查询视频生成任务的执行状态与结果。
      operationId: VideoController_getVideoTaskStatus
      parameters:
        - name: taskId
          in: path
          description: 任务 ID，由生成视频接口返回，用于任务状态或生成结果查询。
          required: true
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: 请求已被服务处理。业务是否成功以响应体 code === 0 为准。
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/VideoTaskStatusResponseVo'
                  code:
                    type: integer
                    description: 业务状态码。0 表示成功，非 0 表示业务错误。
                  message:
                    type: string
                    description: 响应消息。
                  requestId:
                    type: string
                    description: 请求 ID。
                  timestamp:
                    type: integer
                    description: 错误响应时间戳，Unix 毫秒。
                required:
                  - code
                  - message
              examples:
                success:
                  summary: 成功
                  value:
                    code: 0
                    message: 请求成功
                    data:
                      id: string
                      model: string
                      status: string
                      input:
                        prompt: string
                        groupId: string
                        image: string
                        images:
                          - string
                        audios:
                          - string
                        duration: 1
                        aspectRatio: string
                        resolution: string
                        videoUrl: string
                        videos:
                          - string
                      submittedAt: '2026-07-02T12:00:00.000Z'
                      startedAt: '2026-07-02T12:00:00.000Z'
                      videoUrl: string
                      coverUrl: string
                      mediaId: string
                      groupId: string
                      error:
                        message: string
                      finishedAt: '2026-07-02T12:00:00.000Z'
                validationFailed10002:
                  summary: ValidationFailed (10002)
                  value:
                    code: 10002
                    message: 参数验证失败
                    data: {}
                    timestamp: 1772099056662
                unauthorized401:
                  summary: 未认证或 API Key 无效
                  value:
                    code: 401
                    message: Unauthorized
                    data: {}
                    timestamp: 1772099056662
                invalidAiTaskId12302:
                  summary: InvalidAiTaskId (12302)
                  value:
                    code: 12302
                    message: 无效的 AI 任务 ID
                    data: {}
                    timestamp: 1772099056662
      deprecated: false
      security:
        - apikey-header-X-Api-Key: []
components:
  schemas:
    VideoTaskStatusResponseVo:
      type: object
      properties:
        id:
          type: string
          description: 任务 ID
        model:
          type: string
          description: 模型名称
        status:
          type: string
          description: 任务状态
        input:
          type: object
          properties:
            prompt:
              type: string
              description: 提示词
            groupId:
              description: 素材组 ID
              type: string
            image:
              description: 图片 URL
              anyOf:
                - type: string
                - type: array
                  items:
                    type: string
            images:
              description: 参考图片 URL 列表
              type: array
              items:
                type: string
            audios:
              description: 参考音频 URL 列表
              type: array
              items:
                type: string
            duration:
              description: 时长（秒）
              type: number
            aspectRatio:
              description: 宽高比
              type: string
            resolution:
              description: 分辨率
              type: string
            videoUrl:
              description: 首个参考视频 URL
              type: string
            videos:
              description: 参考视频 URL 列表
              type: array
              items:
                type: string
          required:
            - prompt
          additionalProperties: false
          description: 输入参数
        videoUrl:
          description: 生成的视频 URL
          type: string
        coverUrl:
          description: 生成视频的封面 URL
          type: string
        mediaId:
          description: 保存后的素材 ID
          type: string
        groupId:
          description: 保存到的素材组 ID
          type: string
        error:
          description: 错误信息
          type: object
          properties:
            message:
              description: 错误信息
              type: string
          required:
            - message
          additionalProperties: false
        submittedAt:
          description: 提交时间
          type: string
          format: date-time
        startedAt:
          description: 开始时间
          type: string
          format: date-time
        finishedAt:
          description: 完成时间
          type: string
          format: date-time
      required:
        - id
        - model
        - status
        - input
        - submittedAt
        - startedAt
      additionalProperties: false
  securitySchemes:
    apikey-header-X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: AiToEarn Open Platform API Key。

````