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

# happyhorse-1.0

> HappyHorse 1.0 文生视频、图生视频、参考图生视频和视频编辑 API。

通过 `POST /v1/video/generations` 创建 HappyHorse 1.0 任务。四种工作流使用各自的模型 ID；可选控制参数可放在顶层或 `parameters` 中。

<Tabs sync={false}>
  <Tab title="文生视频">
    ## 创建任务

    `POST /v1/video/generations`

    <div className="kling-api-example-panel happyhorse-api-example-panel">
      ```bash cURL theme={null}
      curl --request POST \
        --url https://www.anyfast.ai/v1/video/generations \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json' \
        --data '{
          "model": "happyhorse-1.0-t2v",
          "prompt": "一只猫在草地上奔跑",
          "parameters": {"resolution": "720P", "ratio": "16:9", "duration": 5, "watermark": false}
        }'
      ```

      ```json 200 theme={null}
      {
        "id": "asyntask_jwgfhsG0m2aDjLmiiELRf74eoWmss6ya",
        "task_id": "asyntask_jwgfhsG0m2aDjLmiiELRf74eoWmss6ya",
        "object": "video",
        "model": "happyhorse-1.0-t2v",
        "status": "queued",
        "progress": 0,
        "created_at": 1777343862
      }
      ```
    </div>

    ## 请求头

    <ParamField header="Authorization" type="string" required>Bearer 鉴权，格式为 `Bearer YOUR_API_KEY`。</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>请求体格式。</ParamField>

    ## 请求参数

    <ParamField body="model" type="string" required>必须为 `happyhorse-1.0-t2v`。</ParamField>
    <ParamField body="prompt" type="string" required>视频内容描述。</ParamField>

    ## 查询任务（单个）

    `GET /v1/video/generations/{task_id}`

    ### 请求头

    <ParamField header="Authorization" type="string" required>Bearer 鉴权，格式为 `Bearer YOUR_API_KEY`。</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>请求体格式。</ParamField>

    ### 路径参数

    <ParamField path="task_id" type="string" required>创建任务时返回的任务 ID。</ParamField>

    <div className="kling-api-example-panel happyhorse-api-example-panel">
      ```bash cURL theme={null}
      curl --request GET \
        --url https://www.anyfast.ai/v1/video/generations/TASK_ID \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json'
      ```

      ```json 200 theme={null}
      {
        "code": "success",
        "message": "",
        "data": {
          "task_id": "asyntask_6rTCHZ9Xi7wXdmotOYsZP3o0XWWA1dOY",
          "action": "generate",
          "status": "SUCCESS",
          "result_url": "https://dashscope-a717.oss-accelerate.aliyuncs.com/.../xxx_refiner.mp4?Expires=...",
          "fail_reason": "https://dashscope-a717.oss-accelerate.aliyuncs.com/.../xxx_refiner.mp4?Expires=...",
          "submit_time": 1777343862,
          "start_time": 1777343866,
          "finish_time": 1777343961,
          "progress": "100%",
          "request_id": "20260731061043150392831bGTNOtlT",
          "data": {
            "output": {
              "task_id": "e45a6a1b-6f05-43e5-ab06-ddfdc97587a7",
              "task_status": "SUCCEEDED",
              "video_url": "https://dashscope-a717.oss-accelerate.aliyuncs.com/.../xxx_refiner.mp4?Expires=...",
              "orig_prompt": "A cat running on grass",
              "submit_time": "2026-04-28 10:37:42.625",
              "scheduled_time": "2026-04-28 10:37:42.652",
              "end_time": "2026-04-28 10:39:04.185"
            },
            "request_id": "53121cad-c008-9b96-af1d-4289a4fc714b",
            "usage": {
              "SR": 720,
              "duration": 5,
              "input_video_duration": 0,
              "output_video_duration": 5,
              "ratio": "16:9",
              "video_count": 1
            }
          }
        }
      }
      ```
    </div>

    ### 响应字段

    <ResponseField name="code" type="string">查询成功时为 `success`。</ResponseField>
    <ResponseField name="message" type="string">附加响应消息。</ResponseField>
    <ResponseField name="data.task_id" type="string">AnyFast 任务 ID。</ResponseField>
    <ResponseField name="data.action" type="string">任务使用的工作流动作。</ResponseField>
    <ResponseField name="data.status" type="string">任务状态，例如 `QUEUED`、`IN_PROGRESS`、`SUCCESS` 或 `FAILURE`。</ResponseField>
    <ResponseField name="data.result_url" type="string">任务成功后的结果视频 URL。</ResponseField>
    <ResponseField name="data.fail_reason" type="string">上游任务服务返回的失败详情；成功响应中该字段也可能被填充为结果 URL。</ResponseField>
    <ResponseField name="data.submit_time" type="integer">任务提交时间，Unix 时间戳。</ResponseField>
    <ResponseField name="data.start_time" type="integer">任务开始处理时间，Unix 时间戳。</ResponseField>
    <ResponseField name="data.finish_time" type="integer">任务完成时间，Unix 时间戳。</ResponseField>
    <ResponseField name="data.progress" type="string">任务进度百分比。</ResponseField>
    <ResponseField name="data.request_id" type="string">AnyFast 外层响应的请求 ID。</ResponseField>
    <ResponseField name="data.data.output" type="object">上游任务输出详情。</ResponseField>
    <ResponseField name="data.data.output.task_id" type="string">上游任务 ID。</ResponseField>
    <ResponseField name="data.data.output.task_status" type="string">上游任务状态，例如 `SUCCEEDED`。</ResponseField>
    <ResponseField name="data.data.output.video_url" type="string">上游结果视频 URL。</ResponseField>
    <ResponseField name="data.data.output.orig_prompt" type="string">任务提交时使用的原始提示词。</ResponseField>
    <ResponseField name="data.data.output.submit_time" type="string">上游任务提交时间。</ResponseField>
    <ResponseField name="data.data.output.scheduled_time" type="string">上游任务调度时间。</ResponseField>
    <ResponseField name="data.data.output.end_time" type="string">上游任务完成时间。</ResponseField>
    <ResponseField name="data.data.request_id" type="string">上游任务服务返回的请求 ID。</ResponseField>
    <ResponseField name="data.data.usage" type="object">上游任务服务返回的用量和输出指标。</ResponseField>
    <ResponseField name="data.data.usage.SR" type="integer">输出超分辨率值。</ResponseField>
    <ResponseField name="data.data.usage.duration" type="number">请求或生成的视频时长。</ResponseField>
    <ResponseField name="data.data.usage.input_video_duration" type="number">输入视频时长。</ResponseField>
    <ResponseField name="data.data.usage.output_video_duration" type="number">输出视频时长。</ResponseField>
    <ResponseField name="data.data.usage.ratio" type="string">输出画面比例。</ResponseField>
    <ResponseField name="data.data.usage.video_count" type="integer">生成的视频数量。</ResponseField>
  </Tab>

  <Tab title="图生视频">
    ## 创建任务

    `POST /v1/video/generations`

    <div className="kling-api-example-panel happyhorse-api-example-panel">
      ```bash cURL theme={null}
      curl --request POST \
        --url https://www.anyfast.ai/v1/video/generations \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json' \
        --data '{
          "model": "happyhorse-1.0-i2v",
          "prompt": "镜头缓缓拉近，画面逐渐动起来",
          "image": "https://example.com/first-frame.png",
          "parameters": {"resolution": "720P", "duration": 5, "watermark": false}
        }'
      ```

      ```json 200 theme={null}
      {
        "id": "asyntask_jwgfhsG0m2aDjLmiiELRf74eoWmss6ya",
        "task_id": "asyntask_jwgfhsG0m2aDjLmiiELRf74eoWmss6ya",
        "object": "video",
        "model": "happyhorse-1.0-i2v",
        "status": "queued",
        "progress": 0,
        "created_at": 1777343862
      }
      ```
    </div>

    ## 请求头

    <ParamField header="Authorization" type="string" required>Bearer 鉴权，格式为 `Bearer YOUR_API_KEY`。</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>请求体格式。</ParamField>

    ## 请求参数

    <ParamField body="model" type="string" required>必须为 `happyhorse-1.0-i2v`。</ParamField>
    <ParamField body="prompt" type="string" required>预期动作的文本描述。</ParamField>
    <ParamField body="image" type="string" required>首帧图片 URL。也支持 `images`，但只使用其中第一张。</ParamField>

    ## 查询任务（单个）

    `GET /v1/video/generations/{task_id}`

    ### 请求头

    <ParamField header="Authorization" type="string" required>Bearer 鉴权，格式为 `Bearer YOUR_API_KEY`。</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>请求体格式。</ParamField>

    ### 路径参数

    <ParamField path="task_id" type="string" required>创建任务时返回的任务 ID。</ParamField>

    <div className="kling-api-example-panel happyhorse-api-example-panel">
      ```bash cURL theme={null}
      curl --request GET \
        --url https://www.anyfast.ai/v1/video/generations/TASK_ID \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json'
      ```

      ```json 200 theme={null}
      {
        "code": "success",
        "message": "",
        "data": {
          "task_id": "asyntask_6rTCHZ9Xi7wXdmotOYsZP3o0XWWA1dOY",
          "action": "firstTailGenerate",
          "status": "SUCCESS",
          "result_url": "https://dashscope-a717.oss-accelerate.aliyuncs.com/.../xxx_refiner.mp4?Expires=...",
          "fail_reason": "https://dashscope-a717.oss-accelerate.aliyuncs.com/.../xxx_refiner.mp4?Expires=...",
          "submit_time": 1777343862,
          "start_time": 1777343866,
          "finish_time": 1777348588,
          "progress": "100%",
          "request_id": "20260731061043150392831bGTNOtlT",
          "data": {
            "output": {
              "task_id": "e45a6a1b-6f05-43e5-ab06-ddfdc97587a7",
              "task_status": "SUCCEEDED",
              "video_url": "https://dashscope-a717.oss-accelerate.aliyuncs.com/.../xxx_refiner.mp4?Expires=...",
              "orig_prompt": "A cat running on grass",
              "submit_time": "2026-04-28 10:37:42.625",
              "scheduled_time": "2026-04-28 10:37:42.652",
              "end_time": "2026-04-28 10:39:04.185"
            },
            "request_id": "53121cad-c008-9b96-af1d-4289a4fc714b",
            "usage": {
              "SR": 720,
              "duration": 5,
              "input_video_duration": 0,
              "output_video_duration": 5,
              "ratio": "16:9",
              "video_count": 1
            }
          }
        }
      }
      ```
    </div>

    ### 响应字段

    ### 响应字段

    <ResponseField name="code" type="string">查询成功时为 `success`。</ResponseField>
    <ResponseField name="message" type="string">附加响应消息。</ResponseField>
    <ResponseField name="data.task_id" type="string">AnyFast 任务 ID。</ResponseField>
    <ResponseField name="data.action" type="string">任务使用的工作流动作。</ResponseField>
    <ResponseField name="data.status" type="string">任务状态，例如 `QUEUED`、`IN_PROGRESS`、`SUCCESS` 或 `FAILURE`。</ResponseField>
    <ResponseField name="data.result_url" type="string">任务成功后的结果视频 URL。</ResponseField>
    <ResponseField name="data.fail_reason" type="string">上游任务服务返回的失败详情；成功响应中该字段也可能被填充为结果 URL。</ResponseField>
    <ResponseField name="data.submit_time" type="integer">任务提交时间，Unix 时间戳。</ResponseField>
    <ResponseField name="data.start_time" type="integer">任务开始处理时间，Unix 时间戳。</ResponseField>
    <ResponseField name="data.finish_time" type="integer">任务完成时间，Unix 时间戳。</ResponseField>
    <ResponseField name="data.progress" type="string">任务进度百分比。</ResponseField>
    <ResponseField name="data.request_id" type="string">AnyFast 外层响应的请求 ID。</ResponseField>
    <ResponseField name="data.data.output" type="object">上游任务输出详情。</ResponseField>
    <ResponseField name="data.data.output.task_id" type="string">上游任务 ID。</ResponseField>
    <ResponseField name="data.data.output.task_status" type="string">上游任务状态，例如 `SUCCEEDED`。</ResponseField>
    <ResponseField name="data.data.output.video_url" type="string">上游结果视频 URL。</ResponseField>
    <ResponseField name="data.data.output.orig_prompt" type="string">任务提交时使用的原始提示词。</ResponseField>
    <ResponseField name="data.data.output.submit_time" type="string">上游任务提交时间。</ResponseField>
    <ResponseField name="data.data.output.scheduled_time" type="string">上游任务调度时间。</ResponseField>
    <ResponseField name="data.data.output.end_time" type="string">上游任务完成时间。</ResponseField>
    <ResponseField name="data.data.request_id" type="string">上游任务服务返回的请求 ID。</ResponseField>
    <ResponseField name="data.data.usage" type="object">上游任务服务返回的用量和输出指标。</ResponseField>
    <ResponseField name="data.data.usage.SR" type="integer">输出超分辨率值。</ResponseField>
    <ResponseField name="data.data.usage.duration" type="number">请求或生成的视频时长。</ResponseField>
    <ResponseField name="data.data.usage.input_video_duration" type="number">输入视频时长。</ResponseField>
    <ResponseField name="data.data.usage.output_video_duration" type="number">输出视频时长。</ResponseField>
    <ResponseField name="data.data.usage.ratio" type="string">输出画面比例。</ResponseField>
    <ResponseField name="data.data.usage.video_count" type="integer">生成的视频数量。</ResponseField>
  </Tab>

  <Tab title="参考图生视频">
    ## 创建任务

    `POST /v1/video/generations`

    <div className="kling-api-example-panel happyhorse-api-example-panel">
      ```bash cURL theme={null}
      curl --request POST \
        --url https://www.anyfast.ai/v1/video/generations \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json' \
        --data '{
          "model": "happyhorse-1.0-r2v",
          "prompt": "身着红色旗袍的女性轻抬玉手展开折扇",
          "images": ["https://example.com/ref1.jpg", "https://example.com/ref2.jpg"],
          "parameters": {"resolution": "720P", "ratio": "16:9", "duration": 5, "watermark": false}
        }'
      ```

      ```json 200 theme={null}
      {
        "id": "asyntask_jwgfhsG0m2aDjLmiiELRf74eoWmss6ya",
        "task_id": "asyntask_jwgfhsG0m2aDjLmiiELRf74eoWmss6ya",
        "object": "video",
        "model": "happyhorse-1.0-r2v",
        "status": "queued",
        "progress": 0,
        "created_at": 1777343862
      }
      ```
    </div>

    ## 请求头

    <ParamField header="Authorization" type="string" required>Bearer 鉴权，格式为 `Bearer YOUR_API_KEY`。</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>请求体格式。</ParamField>

    ## 请求参数

    <ParamField body="model" type="string" required>必须为 `happyhorse-1.0-r2v`。</ParamField>
    <ParamField body="prompt" type="string" required>视频内容描述。</ParamField>
    <ParamField body="images" type="string[]" required>1 至 3 张参考图 URL。</ParamField>

    ## 查询任务（单个）

    `GET /v1/video/generations/{task_id}`

    ### 请求头

    <ParamField header="Authorization" type="string" required>Bearer 鉴权，格式为 `Bearer YOUR_API_KEY`。</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>请求体格式。</ParamField>

    ### 路径参数

    <ParamField path="task_id" type="string" required>创建任务时返回的任务 ID。</ParamField>

    <div className="kling-api-example-panel happyhorse-api-example-panel">
      ```bash cURL theme={null}
      curl --request GET \
        --url https://www.anyfast.ai/v1/video/generations/TASK_ID \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json'
      ```

      ```json 200 theme={null}
      {
        "code": "success",
        "message": "",
        "data": {
          "task_id": "asyntask_6rTCHZ9Xi7wXdmotOYsZP3o0XWWA1dOY",
          "action": "referenceGenerate",
          "status": "SUCCESS",
          "result_url": "https://dashscope-a717.oss-accelerate.aliyuncs.com/.../xxx_refiner.mp4?Expires=...",
          "fail_reason": "https://dashscope-a717.oss-accelerate.aliyuncs.com/.../xxx_refiner.mp4?Expires=...",
          "submit_time": 1777343862,
          "start_time": 1777343866,
          "finish_time": 1777348588,
          "progress": "100%",
          "request_id": "20260731061043150392831bGTNOtlT",
          "data": {
            "output": {
              "task_id": "e45a6a1b-6f05-43e5-ab06-ddfdc97587a7",
              "task_status": "SUCCEEDED",
              "video_url": "https://dashscope-a717.oss-accelerate.aliyuncs.com/.../xxx_refiner.mp4?Expires=...",
              "orig_prompt": "A cat running on grass",
              "submit_time": "2026-04-28 10:37:42.625",
              "scheduled_time": "2026-04-28 10:37:42.652",
              "end_time": "2026-04-28 10:39:04.185"
            },
            "request_id": "53121cad-c008-9b96-af1d-4289a4fc714b",
            "usage": {
              "SR": 720,
              "duration": 5,
              "input_video_duration": 0,
              "output_video_duration": 5,
              "ratio": "16:9",
              "video_count": 1
            }
          }
        }
      }
      ```
    </div>

    ### 响应字段

    ### 响应字段

    <ResponseField name="code" type="string">查询成功时为 `success`。</ResponseField>
    <ResponseField name="message" type="string">附加响应消息。</ResponseField>
    <ResponseField name="data.task_id" type="string">AnyFast 任务 ID。</ResponseField>
    <ResponseField name="data.action" type="string">任务使用的工作流动作。</ResponseField>
    <ResponseField name="data.status" type="string">任务状态，例如 `QUEUED`、`IN_PROGRESS`、`SUCCESS` 或 `FAILURE`。</ResponseField>
    <ResponseField name="data.result_url" type="string">任务成功后的结果视频 URL。</ResponseField>
    <ResponseField name="data.fail_reason" type="string">上游任务服务返回的失败详情；成功响应中该字段也可能被填充为结果 URL。</ResponseField>
    <ResponseField name="data.submit_time" type="integer">任务提交时间，Unix 时间戳。</ResponseField>
    <ResponseField name="data.start_time" type="integer">任务开始处理时间，Unix 时间戳。</ResponseField>
    <ResponseField name="data.finish_time" type="integer">任务完成时间，Unix 时间戳。</ResponseField>
    <ResponseField name="data.progress" type="string">任务进度百分比。</ResponseField>
    <ResponseField name="data.request_id" type="string">AnyFast 外层响应的请求 ID。</ResponseField>
    <ResponseField name="data.data.output" type="object">上游任务输出详情。</ResponseField>
    <ResponseField name="data.data.output.task_id" type="string">上游任务 ID。</ResponseField>
    <ResponseField name="data.data.output.task_status" type="string">上游任务状态，例如 `SUCCEEDED`。</ResponseField>
    <ResponseField name="data.data.output.video_url" type="string">上游结果视频 URL。</ResponseField>
    <ResponseField name="data.data.output.orig_prompt" type="string">任务提交时使用的原始提示词。</ResponseField>
    <ResponseField name="data.data.output.submit_time" type="string">上游任务提交时间。</ResponseField>
    <ResponseField name="data.data.output.scheduled_time" type="string">上游任务调度时间。</ResponseField>
    <ResponseField name="data.data.output.end_time" type="string">上游任务完成时间。</ResponseField>
    <ResponseField name="data.data.request_id" type="string">上游任务服务返回的请求 ID。</ResponseField>
    <ResponseField name="data.data.usage" type="object">上游任务服务返回的用量和输出指标。</ResponseField>
    <ResponseField name="data.data.usage.SR" type="integer">输出超分辨率值。</ResponseField>
    <ResponseField name="data.data.usage.duration" type="number">请求或生成的视频时长。</ResponseField>
    <ResponseField name="data.data.usage.input_video_duration" type="number">输入视频时长。</ResponseField>
    <ResponseField name="data.data.usage.output_video_duration" type="number">输出视频时长。</ResponseField>
    <ResponseField name="data.data.usage.ratio" type="string">输出画面比例。</ResponseField>
    <ResponseField name="data.data.usage.video_count" type="integer">生成的视频数量。</ResponseField>
  </Tab>

  <Tab title="视频编辑">
    ## 创建任务

    `POST /v1/video/generations`

    <div className="kling-api-example-panel happyhorse-api-example-panel">
      ```bash cURL theme={null}
      curl --request POST \
        --url https://www.anyfast.ai/v1/video/generations \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json' \
        --data '{
          "model": "happyhorse-1.0-video-edit",
          "input": {
            "prompt": "让视频中的角色穿上图片中的条纹毛衣。",
            "media": [
              {"type": "video", "url": "https://example.com/source.mp4"},
              {"type": "reference_image", "url": "https://example.com/sweater.png"}
            ]
          },
          "parameters": {"resolution": "720P", "watermark": false}
        }'
      ```

      ```json 200 theme={null}
      {
        "id": "asyntask_jwgfhsG0m2aDjLmiiELRf74eoWmss6ya",
        "task_id": "asyntask_jwgfhsG0m2aDjLmiiELRf74eoWmss6ya",
        "object": "video",
        "model": "happyhorse-1.0-video-edit",
        "status": "queued",
        "progress": 0,
        "created_at": 1777343862
      }
      ```
    </div>

    ## 请求头

    <ParamField header="Authorization" type="string" required>Bearer 鉴权，格式为 `Bearer YOUR_API_KEY`。</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>请求体格式。</ParamField>

    ## 请求参数

    <ParamField body="model" type="string" required>必须为 `happyhorse-1.0-video-edit`。</ParamField>
    <ParamField body="input.prompt" type="string" required>编辑指令，最多 5000 个非中文字符或 2500 个中文字符。</ParamField>
    <ParamField body="input.media" type="object[]" required>有且仅有一条原始视频，另可选包含 0 至 5 张参考图。</ParamField>
    <ParamField body="input.media[].type" type="string" required>原始视频使用 `video`，可选参考图使用 `reference_image`。</ParamField>
    <ParamField body="input.media[].url" type="string" required>公网可访问的媒体 URL。</ParamField>
    <ParamField body="parameters.resolution" type="string" default="1080P">`720P` 或 `1080P`。</ParamField>
    <ParamField body="parameters.duration" type="integer">输出时长由原始视频决定，该参数可能不生效。</ParamField>

    ## 查询任务（单个）

    `GET /v1/video/generations/{task_id}`

    ### 请求头

    <ParamField header="Authorization" type="string" required>Bearer 鉴权，格式为 `Bearer YOUR_API_KEY`。</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>请求体格式。</ParamField>

    ### 路径参数

    <ParamField path="task_id" type="string" required>创建任务时返回的任务 ID。</ParamField>

    <div className="kling-api-example-panel happyhorse-api-example-panel">
      ```bash cURL theme={null}
      curl --request GET \
        --url https://www.anyfast.ai/v1/video/generations/TASK_ID \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json'
      ```

      ```json 200 theme={null}
      {
        "code": "success",
        "message": "",
        "data": {
          "task_id": "asyntask_6rTCHZ9Xi7wXdmotOYsZP3o0XWWA1dOY",
          "action": "videoEdit",
          "status": "SUCCESS",
          "result_url": "https://dashscope-a717.oss-accelerate.aliyuncs.com/.../xxx_refiner.mp4?Expires=...",
          "fail_reason": "https://dashscope-a717.oss-accelerate.aliyuncs.com/.../xxx_refiner.mp4?Expires=...",
          "submit_time": 1777343862,
          "start_time": 1777343866,
          "finish_time": 1777348588,
          "progress": "100%",
          "request_id": "20260731061043150392831bGTNOtlT",
          "data": {
            "output": {
              "task_id": "e45a6a1b-6f05-43e5-ab06-ddfdc97587a7",
              "task_status": "SUCCEEDED",
              "video_url": "https://dashscope-a717.oss-accelerate.aliyuncs.com/.../xxx_refiner.mp4?Expires=...",
              "orig_prompt": "A cat running on grass",
              "submit_time": "2026-04-28 10:37:42.625",
              "scheduled_time": "2026-04-28 10:37:42.652",
              "end_time": "2026-04-28 10:39:04.185"
            },
            "request_id": "53121cad-c008-9b96-af1d-4289a4fc714b",
            "usage": {
              "SR": 720,
              "duration": 5,
              "input_video_duration": 0,
              "output_video_duration": 5,
              "ratio": "16:9",
              "video_count": 1
            }
          }
        }
      }
      ```
    </div>

    ### 响应字段

    ### 响应字段

    <ResponseField name="code" type="string">查询成功时为 `success`。</ResponseField>
    <ResponseField name="message" type="string">附加响应消息。</ResponseField>
    <ResponseField name="data.task_id" type="string">AnyFast 任务 ID。</ResponseField>
    <ResponseField name="data.action" type="string">任务使用的工作流动作。</ResponseField>
    <ResponseField name="data.status" type="string">任务状态，例如 `QUEUED`、`IN_PROGRESS`、`SUCCESS` 或 `FAILURE`。</ResponseField>
    <ResponseField name="data.result_url" type="string">任务成功后的结果视频 URL。</ResponseField>
    <ResponseField name="data.fail_reason" type="string">上游任务服务返回的失败详情；成功响应中该字段也可能被填充为结果 URL。</ResponseField>
    <ResponseField name="data.submit_time" type="integer">任务提交时间，Unix 时间戳。</ResponseField>
    <ResponseField name="data.start_time" type="integer">任务开始处理时间，Unix 时间戳。</ResponseField>
    <ResponseField name="data.finish_time" type="integer">任务完成时间，Unix 时间戳。</ResponseField>
    <ResponseField name="data.progress" type="string">任务进度百分比。</ResponseField>
    <ResponseField name="data.request_id" type="string">AnyFast 外层响应的请求 ID。</ResponseField>
    <ResponseField name="data.data.output" type="object">上游任务输出详情。</ResponseField>
    <ResponseField name="data.data.output.task_id" type="string">上游任务 ID。</ResponseField>
    <ResponseField name="data.data.output.task_status" type="string">上游任务状态，例如 `SUCCEEDED`。</ResponseField>
    <ResponseField name="data.data.output.video_url" type="string">上游结果视频 URL。</ResponseField>
    <ResponseField name="data.data.output.orig_prompt" type="string">任务提交时使用的原始提示词。</ResponseField>
    <ResponseField name="data.data.output.submit_time" type="string">上游任务提交时间。</ResponseField>
    <ResponseField name="data.data.output.scheduled_time" type="string">上游任务调度时间。</ResponseField>
    <ResponseField name="data.data.output.end_time" type="string">上游任务完成时间。</ResponseField>
    <ResponseField name="data.data.request_id" type="string">上游任务服务返回的请求 ID。</ResponseField>
    <ResponseField name="data.data.usage" type="object">上游任务服务返回的用量和输出指标。</ResponseField>
    <ResponseField name="data.data.usage.SR" type="integer">输出超分辨率值。</ResponseField>
    <ResponseField name="data.data.usage.duration" type="number">请求或生成的视频时长。</ResponseField>
    <ResponseField name="data.data.usage.input_video_duration" type="number">输入视频时长。</ResponseField>
    <ResponseField name="data.data.usage.output_video_duration" type="number">输出视频时长。</ResponseField>
    <ResponseField name="data.data.usage.ratio" type="string">输出画面比例。</ResponseField>
    <ResponseField name="data.data.usage.video_count" type="integer">生成的视频数量。</ResponseField>
  </Tab>
</Tabs>

## 通用请求参数

<ParamField body="resolution" type="string" default="1080P">`720P` 或 `1080P`。</ParamField>
<ParamField body="ratio" type="string" default="16:9">`16:9`、`9:16`、`1:1`、`4:3` 或 `3:4`。</ParamField>
<ParamField body="duration" type="integer" default={5}>视频时长，范围为 3 至 15 秒。</ParamField>
<ParamField body="watermark" type="boolean" default={true}>是否添加 HappyHorse 水印。</ParamField>
<ParamField body="seed" type="integer">`[0, 2147483647]` 范围内的随机种子。</ParamField>

## 响应

<ResponseField name="id" type="string">创建后的任务 ID。</ResponseField>
<ResponseField name="task_id" type="string">创建后的任务 ID，用于查询任务。</ResponseField>
<ResponseField name="model" type="string">创建任务所使用的模型。</ResponseField>
<ResponseField name="status" type="string">任务初始状态。</ResponseField>
<ResponseField name="progress" type="integer">任务初始进度。</ResponseField>

## 错误响应

* `400 Bad Request` - 请求参数无效或参数组合不支持。
* `401 Unauthorized` - API 密钥缺失或无效。
* `429 Rate limit exceeded` - 请求超过适用的速率限制。

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