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

# happyhorse-任务查询

> 通过任务 ID 查询 HappyHorse 视频生成任务的状态和结果。

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


## OpenAPI

````yaml api-reference/model-api/alibaba/openapi/happyhorse-task-query/openapi.yaml GET /v1/video/generations/{task_id}
openapi: 3.1.0
info:
  title: HappyHorse 任务查询
  description: 通过 Anyfast API 查询 HappyHorse 1.0 视频生成任务的状态和结果
  version: 1.0.0
servers:
  - url: https://www.anyfast.com.cn
security:
  - bearerAuth: []
paths:
  /v1/video/generations/{task_id}:
    get:
      summary: 查询视频生成任务
      description: 通过任务 ID 查询 HappyHorse 视频生成任务的状态和结果。
      operationId: getHappyhorseTaskStatus
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
          description: 视频生成请求返回的任务 ID（格式：`asyntask_xxx`）。
          example: asyntask_jwgfhsG0m2aDjLmiiELRf74eoWmss6ya
      responses:
        '200':
          description: 任务状态获取成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: success
                  message:
                    type: string
                    example: ''
                  data:
                    type: object
                    properties:
                      task_id:
                        type: string
                        example: asyntask_jwgfhsG0m2aDjLmiiELRf74eoWmss6ya
                      action:
                        type: string
                        description: >-
                          任务子类型：`generate`、`firstTailGenerate`、`referenceGenerate`、`omniGenerate`。
                        example: generate
                      status:
                        type: string
                        enum:
                          - NOT_START
                          - QUEUED
                          - IN_PROGRESS
                          - SUCCESS
                          - FAILURE
                        description: 任务状态。
                        example: SUCCESS
                      result_url:
                        type: string
                        description: 预签名视频下载 URL（有效期 24 小时）。失败任务此字段省略。
                        example: >-
                          https://dashscope-a717.oss-accelerate.aliyuncs.com/.../xxx_refiner.mp4?Expires=...
                      fail_reason:
                        type: string
                        description: 成功时复制 `result_url`（兼容老客户端）；`status = FAILURE` 时为错误信息。
                        example: >-
                          https://dashscope-a717.oss-accelerate.aliyuncs.com/.../xxx_refiner.mp4?Expires=...
                      submit_time:
                        type: integer
                        example: 1777343862
                      start_time:
                        type: integer
                        description: 上游开始时间戳；未开始为 `0`。
                        example: 1777343866
                      finish_time:
                        type: integer
                        example: 1777343961
                      progress:
                        type: string
                        example: 100%
                      request_id:
                        type: string
                        example: 20260428023742441081000FMrSbjcs
                      data:
                        type: object
                        description: 上游 DashScope 原始 output + usage。
                        properties:
                          output:
                            type: object
                            properties:
                              task_id:
                                type: string
                                description: 上游 DashScope 任务 ID。
                                example: e45a6a1b-6f05-43e5-ab06-ddfdc97587a7
                              task_status:
                                type: string
                                enum:
                                  - PENDING
                                  - RUNNING
                                  - SUCCEEDED
                                  - FAILED
                                  - CANCELED
                                  - UNKNOWN
                                example: SUCCEEDED
                              video_url:
                                type: string
                                description: 上游交付的视频 URL（与外层 `result_url` 一致）。
                                example: >-
                                  https://dashscope-a717.oss-accelerate.aliyuncs.com/.../xxx_refiner.mp4?Expires=...
                              orig_prompt:
                                type: string
                                example: 一只猫在草地上奔跑
                              submit_time:
                                type: string
                                example: '2026-04-28 10:37:42.625'
                              scheduled_time:
                                type: string
                                example: '2026-04-28 10:37:42.652'
                              end_time:
                                type: string
                                example: '2026-04-28 10:39:04.185'
                          request_id:
                            type: string
                            example: 53121cad-c008-9b96-af1d-4289a4fc714b
                          usage:
                            type: object
                            properties:
                              SR:
                                type: integer
                                description: 实际生成的分辨率档位（720 / 1080）。
                                example: 720
                              duration:
                                type: integer
                                description: 计费总时长。
                                example: 5
                              input_video_duration:
                                type: integer
                                description: 输入视频时长（t2v/i2v/r2v 是 0；video-edit 才有）。
                                example: 0
                              output_video_duration:
                                type: integer
                                description: 实际生成视频时长。
                                example: 5
                              ratio:
                                type: string
                                description: 实际宽高比（仅 t2v / r2v 返回；i2v / video-edit 不返回）。
                                example: '16:9'
                              video_count:
                                type: integer
                                description: 视频数量（恒为 1）。
                                example: 1
        '401':
          description: 未授权
        '404':
          description: 任务不存在
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````