> ## 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 text-to-video, image-to-video, reference-to-video, and video-editing API.

Create HappyHorse 1.0 tasks through `POST /v1/video/generations`. The four workflows use their own model IDs; optional controls can be placed at the top level or in `parameters`.

<Tabs sync={false}>
  <Tab title="Text to video">
    ## Create task

    `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": "A cat running on grass",
          "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>

    ## Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Request body format.</ParamField>

    ## Request parameters

    <ParamField body="model" type="string" required>Must be `happyhorse-1.0-t2v`.</ParamField>
    <ParamField body="prompt" type="string" required>Text description of the video.</ParamField>

    ## Query task by ID

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

    ### Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Request body format.</ParamField>

    ### Path parameters

    <ParamField path="task_id" type="string" required>Task ID returned by the create request.</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>

    ### Response fields

    <ResponseField name="code" type="string">`success` when the task query succeeds.</ResponseField>
    <ResponseField name="message" type="string">Additional response message.</ResponseField>
    <ResponseField name="data.task_id" type="string">AnyFast task ID.</ResponseField>
    <ResponseField name="data.action" type="string">Workflow action used to process the task.</ResponseField>
    <ResponseField name="data.status" type="string">Task status, such as `QUEUED`, `IN_PROGRESS`, `SUCCESS`, or `FAILURE`.</ResponseField>
    <ResponseField name="data.result_url" type="string">Result video URL when the task succeeds.</ResponseField>
    <ResponseField name="data.fail_reason" type="string">Failure detail returned by the upstream task service. The service may populate this field with a result URL in successful responses.</ResponseField>
    <ResponseField name="data.submit_time" type="integer">Task submission time as a Unix timestamp.</ResponseField>
    <ResponseField name="data.start_time" type="integer">Task processing start time as a Unix timestamp.</ResponseField>
    <ResponseField name="data.finish_time" type="integer">Task completion time as a Unix timestamp.</ResponseField>
    <ResponseField name="data.progress" type="string">Task progress percentage.</ResponseField>
    <ResponseField name="data.request_id" type="string">Request ID for the outer AnyFast response.</ResponseField>
    <ResponseField name="data.data.output" type="object">Upstream task output details.</ResponseField>
    <ResponseField name="data.data.output.task_id" type="string">Upstream task ID.</ResponseField>
    <ResponseField name="data.data.output.task_status" type="string">Upstream task status, such as `SUCCEEDED`.</ResponseField>
    <ResponseField name="data.data.output.video_url" type="string">Upstream result video URL.</ResponseField>
    <ResponseField name="data.data.output.orig_prompt" type="string">Original prompt submitted for the task.</ResponseField>
    <ResponseField name="data.data.output.submit_time" type="string">Upstream task submission time.</ResponseField>
    <ResponseField name="data.data.output.scheduled_time" type="string">Upstream task scheduling time.</ResponseField>
    <ResponseField name="data.data.output.end_time" type="string">Upstream task completion time.</ResponseField>
    <ResponseField name="data.data.request_id" type="string">Request ID returned by the upstream task service.</ResponseField>
    <ResponseField name="data.data.usage" type="object">Usage and output metrics returned by the upstream task service.</ResponseField>
    <ResponseField name="data.data.usage.SR" type="integer">Output super-resolution value.</ResponseField>
    <ResponseField name="data.data.usage.duration" type="number">Requested or generated video duration.</ResponseField>
    <ResponseField name="data.data.usage.input_video_duration" type="number">Input video duration.</ResponseField>
    <ResponseField name="data.data.usage.output_video_duration" type="number">Output video duration.</ResponseField>
    <ResponseField name="data.data.usage.ratio" type="string">Output aspect ratio.</ResponseField>
    <ResponseField name="data.data.usage.video_count" type="integer">Number of generated videos.</ResponseField>
  </Tab>

  <Tab title="Image to video">
    ## Create task

    `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": "Camera slowly zooms in as the scene comes to life",
          "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>

    ## Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Request body format.</ParamField>

    ## Request parameters

    <ParamField body="model" type="string" required>Must be `happyhorse-1.0-i2v`.</ParamField>
    <ParamField body="prompt" type="string" required>Text description of the desired motion.</ParamField>
    <ParamField body="image" type="string" required>First-frame image URL. `images` is also accepted, but only its first item is used.</ParamField>

    ## Query task by ID

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

    ### Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Request body format.</ParamField>

    ### Path parameters

    <ParamField path="task_id" type="string" required>Task ID returned by the create request.</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>

    ### Response fields

    ### Response fields

    <ResponseField name="code" type="string">`success` when the task query succeeds.</ResponseField>
    <ResponseField name="message" type="string">Additional response message.</ResponseField>
    <ResponseField name="data.task_id" type="string">AnyFast task ID.</ResponseField>
    <ResponseField name="data.action" type="string">Workflow action used to process the task.</ResponseField>
    <ResponseField name="data.status" type="string">Task status, such as `QUEUED`, `IN_PROGRESS`, `SUCCESS`, or `FAILURE`.</ResponseField>
    <ResponseField name="data.result_url" type="string">Result video URL when the task succeeds.</ResponseField>
    <ResponseField name="data.fail_reason" type="string">Failure detail returned by the upstream task service. The service may populate this field with a result URL in successful responses.</ResponseField>
    <ResponseField name="data.submit_time" type="integer">Task submission time as a Unix timestamp.</ResponseField>
    <ResponseField name="data.start_time" type="integer">Task processing start time as a Unix timestamp.</ResponseField>
    <ResponseField name="data.finish_time" type="integer">Task completion time as a Unix timestamp.</ResponseField>
    <ResponseField name="data.progress" type="string">Task progress percentage.</ResponseField>
    <ResponseField name="data.request_id" type="string">Request ID for the outer AnyFast response.</ResponseField>
    <ResponseField name="data.data.output" type="object">Upstream task output details.</ResponseField>
    <ResponseField name="data.data.output.task_id" type="string">Upstream task ID.</ResponseField>
    <ResponseField name="data.data.output.task_status" type="string">Upstream task status, such as `SUCCEEDED`.</ResponseField>
    <ResponseField name="data.data.output.video_url" type="string">Upstream result video URL.</ResponseField>
    <ResponseField name="data.data.output.orig_prompt" type="string">Original prompt submitted for the task.</ResponseField>
    <ResponseField name="data.data.output.submit_time" type="string">Upstream task submission time.</ResponseField>
    <ResponseField name="data.data.output.scheduled_time" type="string">Upstream task scheduling time.</ResponseField>
    <ResponseField name="data.data.output.end_time" type="string">Upstream task completion time.</ResponseField>
    <ResponseField name="data.data.request_id" type="string">Request ID returned by the upstream task service.</ResponseField>
    <ResponseField name="data.data.usage" type="object">Usage and output metrics returned by the upstream task service.</ResponseField>
    <ResponseField name="data.data.usage.SR" type="integer">Output super-resolution value.</ResponseField>
    <ResponseField name="data.data.usage.duration" type="number">Requested or generated video duration.</ResponseField>
    <ResponseField name="data.data.usage.input_video_duration" type="number">Input video duration.</ResponseField>
    <ResponseField name="data.data.usage.output_video_duration" type="number">Output video duration.</ResponseField>
    <ResponseField name="data.data.usage.ratio" type="string">Output aspect ratio.</ResponseField>
    <ResponseField name="data.data.usage.video_count" type="integer">Number of generated videos.</ResponseField>
  </Tab>

  <Tab title="Reference to video">
    ## Create task

    `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": "A woman in a red qipao gracefully unfolds a folding fan",
          "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>

    ## Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Request body format.</ParamField>

    ## Request parameters

    <ParamField body="model" type="string" required>Must be `happyhorse-1.0-r2v`.</ParamField>
    <ParamField body="prompt" type="string" required>Text description of the video.</ParamField>
    <ParamField body="images" type="string[]" required>1-3 reference image URLs.</ParamField>

    ## Query task by ID

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

    ### Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Request body format.</ParamField>

    ### Path parameters

    <ParamField path="task_id" type="string" required>Task ID returned by the create request.</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>

    ### Response fields

    ### Response fields

    <ResponseField name="code" type="string">`success` when the task query succeeds.</ResponseField>
    <ResponseField name="message" type="string">Additional response message.</ResponseField>
    <ResponseField name="data.task_id" type="string">AnyFast task ID.</ResponseField>
    <ResponseField name="data.action" type="string">Workflow action used to process the task.</ResponseField>
    <ResponseField name="data.status" type="string">Task status, such as `QUEUED`, `IN_PROGRESS`, `SUCCESS`, or `FAILURE`.</ResponseField>
    <ResponseField name="data.result_url" type="string">Result video URL when the task succeeds.</ResponseField>
    <ResponseField name="data.fail_reason" type="string">Failure detail returned by the upstream task service. The service may populate this field with a result URL in successful responses.</ResponseField>
    <ResponseField name="data.submit_time" type="integer">Task submission time as a Unix timestamp.</ResponseField>
    <ResponseField name="data.start_time" type="integer">Task processing start time as a Unix timestamp.</ResponseField>
    <ResponseField name="data.finish_time" type="integer">Task completion time as a Unix timestamp.</ResponseField>
    <ResponseField name="data.progress" type="string">Task progress percentage.</ResponseField>
    <ResponseField name="data.request_id" type="string">Request ID for the outer AnyFast response.</ResponseField>
    <ResponseField name="data.data.output" type="object">Upstream task output details.</ResponseField>
    <ResponseField name="data.data.output.task_id" type="string">Upstream task ID.</ResponseField>
    <ResponseField name="data.data.output.task_status" type="string">Upstream task status, such as `SUCCEEDED`.</ResponseField>
    <ResponseField name="data.data.output.video_url" type="string">Upstream result video URL.</ResponseField>
    <ResponseField name="data.data.output.orig_prompt" type="string">Original prompt submitted for the task.</ResponseField>
    <ResponseField name="data.data.output.submit_time" type="string">Upstream task submission time.</ResponseField>
    <ResponseField name="data.data.output.scheduled_time" type="string">Upstream task scheduling time.</ResponseField>
    <ResponseField name="data.data.output.end_time" type="string">Upstream task completion time.</ResponseField>
    <ResponseField name="data.data.request_id" type="string">Request ID returned by the upstream task service.</ResponseField>
    <ResponseField name="data.data.usage" type="object">Usage and output metrics returned by the upstream task service.</ResponseField>
    <ResponseField name="data.data.usage.SR" type="integer">Output super-resolution value.</ResponseField>
    <ResponseField name="data.data.usage.duration" type="number">Requested or generated video duration.</ResponseField>
    <ResponseField name="data.data.usage.input_video_duration" type="number">Input video duration.</ResponseField>
    <ResponseField name="data.data.usage.output_video_duration" type="number">Output video duration.</ResponseField>
    <ResponseField name="data.data.usage.ratio" type="string">Output aspect ratio.</ResponseField>
    <ResponseField name="data.data.usage.video_count" type="integer">Number of generated videos.</ResponseField>
  </Tab>

  <Tab title="Video edit">
    ## Create task

    `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": "Make the character wear the striped sweater from the image.",
            "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>

    ## Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Request body format.</ParamField>

    ## Request parameters

    <ParamField body="model" type="string" required>Must be `happyhorse-1.0-video-edit`.</ParamField>
    <ParamField body="input.prompt" type="string" required>Editing instruction. Maximum 5,000 non-Chinese or 2,500 Chinese characters.</ParamField>
    <ParamField body="input.media" type="object[]" required>Contains exactly one source-video item and 0-5 optional reference-image items.</ParamField>
    <ParamField body="input.media[].type" type="string" required>`video` for the one source video or `reference_image` for an optional reference image.</ParamField>
    <ParamField body="input.media[].url" type="string" required>Publicly accessible media URL.</ParamField>
    <ParamField body="parameters.resolution" type="string" default="1080P">`720P` or `1080P`.</ParamField>
    <ParamField body="parameters.duration" type="integer">Output duration follows the source video and this parameter might not take effect.</ParamField>

    ## Query task by ID

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

    ### Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Request body format.</ParamField>

    ### Path parameters

    <ParamField path="task_id" type="string" required>Task ID returned by the create request.</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>

    ### Response fields

    ### Response fields

    <ResponseField name="code" type="string">`success` when the task query succeeds.</ResponseField>
    <ResponseField name="message" type="string">Additional response message.</ResponseField>
    <ResponseField name="data.task_id" type="string">AnyFast task ID.</ResponseField>
    <ResponseField name="data.action" type="string">Workflow action used to process the task.</ResponseField>
    <ResponseField name="data.status" type="string">Task status, such as `QUEUED`, `IN_PROGRESS`, `SUCCESS`, or `FAILURE`.</ResponseField>
    <ResponseField name="data.result_url" type="string">Result video URL when the task succeeds.</ResponseField>
    <ResponseField name="data.fail_reason" type="string">Failure detail returned by the upstream task service. The service may populate this field with a result URL in successful responses.</ResponseField>
    <ResponseField name="data.submit_time" type="integer">Task submission time as a Unix timestamp.</ResponseField>
    <ResponseField name="data.start_time" type="integer">Task processing start time as a Unix timestamp.</ResponseField>
    <ResponseField name="data.finish_time" type="integer">Task completion time as a Unix timestamp.</ResponseField>
    <ResponseField name="data.progress" type="string">Task progress percentage.</ResponseField>
    <ResponseField name="data.request_id" type="string">Request ID for the outer AnyFast response.</ResponseField>
    <ResponseField name="data.data.output" type="object">Upstream task output details.</ResponseField>
    <ResponseField name="data.data.output.task_id" type="string">Upstream task ID.</ResponseField>
    <ResponseField name="data.data.output.task_status" type="string">Upstream task status, such as `SUCCEEDED`.</ResponseField>
    <ResponseField name="data.data.output.video_url" type="string">Upstream result video URL.</ResponseField>
    <ResponseField name="data.data.output.orig_prompt" type="string">Original prompt submitted for the task.</ResponseField>
    <ResponseField name="data.data.output.submit_time" type="string">Upstream task submission time.</ResponseField>
    <ResponseField name="data.data.output.scheduled_time" type="string">Upstream task scheduling time.</ResponseField>
    <ResponseField name="data.data.output.end_time" type="string">Upstream task completion time.</ResponseField>
    <ResponseField name="data.data.request_id" type="string">Request ID returned by the upstream task service.</ResponseField>
    <ResponseField name="data.data.usage" type="object">Usage and output metrics returned by the upstream task service.</ResponseField>
    <ResponseField name="data.data.usage.SR" type="integer">Output super-resolution value.</ResponseField>
    <ResponseField name="data.data.usage.duration" type="number">Requested or generated video duration.</ResponseField>
    <ResponseField name="data.data.usage.input_video_duration" type="number">Input video duration.</ResponseField>
    <ResponseField name="data.data.usage.output_video_duration" type="number">Output video duration.</ResponseField>
    <ResponseField name="data.data.usage.ratio" type="string">Output aspect ratio.</ResponseField>
    <ResponseField name="data.data.usage.video_count" type="integer">Number of generated videos.</ResponseField>
  </Tab>
</Tabs>

## Shared request parameters

<ParamField body="resolution" type="string" default="1080P">`720P` or `1080P`.</ParamField>
<ParamField body="ratio" type="string" default="16:9">`16:9`, `9:16`, `1:1`, `4:3`, or `3:4`.</ParamField>
<ParamField body="duration" type="integer" default={5}>Video duration from 3 to 15 seconds.</ParamField>
<ParamField body="watermark" type="boolean" default={true}>Whether to add the HappyHorse watermark.</ParamField>
<ParamField body="seed" type="integer">Random seed in `[0, 2147483647]`.</ParamField>

## Response

<ResponseField name="id" type="string">Created task ID.</ResponseField>
<ResponseField name="task_id" type="string">Created task ID; use it for task queries.</ResponseField>
<ResponseField name="model" type="string">Model used for task creation.</ResponseField>
<ResponseField name="status" type="string">Initial task status.</ResponseField>
<ResponseField name="progress" type="integer">Initial task progress.</ResponseField>

## Error responses

* `400 Bad Request` - Invalid input or unsupported parameter combination.
* `401 Unauthorized` - API key is missing or invalid.
* `429 Rate limit exceeded` - Request rate exceeded the applicable limit.

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