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

> Generate text-to-video, image-to-video, reference-to-video, or video-editing tasks with HappyHorse 1.0.

HappyHorse 1.0 is Alibaba Cloud Model Studio's asynchronous video-generation series. This page groups its text-to-video, image-to-video, reference-to-video, and video-editing workflows.

<Note>
  `T2V` means text-to-video, `I2V` means image-to-video, and `R2V` means reference-to-video. Create a task with `POST /v1/video/generations`, then use the returned task ID with the [task query guide](/guides/model-api/alibaba/happyhorse-task-query).
</Note>

## Key capabilities

* **Async generation** - Submit a task and poll until it reaches `SUCCESS` or `FAILURE`
* **Resolution** - `720P` or `1080P`
* **Duration** - 3-15 seconds
* **Output controls** - Set ratio, watermark, and random seed where supported

<Tabs sync={false}>
  <Tab title="Text to video">
    Use `happyhorse-1.0-t2v` with a text prompt.

    ```bash cURL theme={null}
    curl https://www.anyfast.ai/v1/video/generations \
      -H 'Authorization: Bearer YOUR_API_KEY' \
      -H 'Content-Type: application/json' \
      -d '{
        "model": "happyhorse-1.0-t2v",
        "prompt": "A cat running on grass",
        "parameters": {"resolution": "720P", "ratio": "16:9", "duration": 5, "watermark": false}
      }'
    ```
  </Tab>

  <Tab title="Image to video">
    Use `happyhorse-1.0-i2v` with a single first-frame image. `image` accepts one URL; `images` is also accepted, but only its first item is used as the first frame.

    ```bash cURL theme={null}
    curl https://www.anyfast.ai/v1/video/generations \
      -H 'Authorization: Bearer YOUR_API_KEY' \
      -H 'Content-Type: application/json' \
      -d '{
        "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}
      }'
    ```
  </Tab>

  <Tab title="Reference to video">
    Use `happyhorse-1.0-r2v` with 1-3 reference image URLs.

    ```bash cURL theme={null}
    curl https://www.anyfast.ai/v1/video/generations \
      -H 'Authorization: Bearer YOUR_API_KEY' \
      -H 'Content-Type: application/json' \
      -d '{
        "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}
      }'
    ```
  </Tab>

  <Tab title="Video edit">
    Use `happyhorse-1.0-video-edit` to edit a source video with text instructions and optional reference images. The native `input.media` structure is required: include exactly one `video` item and optionally 0-5 `reference_image` items.

    ```bash cURL theme={null}
    curl https://www.anyfast.ai/v1/video/generations \
      -H 'Authorization: Bearer YOUR_API_KEY' \
      -H 'Content-Type: application/json' \
      -d '{
        "model": "happyhorse-1.0-video-edit",
        "input": {
          "prompt": "Make the character in the video 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}
      }'
    ```

    <Warning>The source video must be a publicly accessible URL. Output duration follows the input video; `duration` might not take effect for video editing.</Warning>
  </Tab>
</Tabs>

## Parameters

Optional controls may be placed at the top level or in `parameters`; both forms are accepted.

| Parameter     | Type      | Required   | Description                                                                                      |
| ------------- | --------- | ---------- | ------------------------------------------------------------------------------------------------ |
| `model`       | string    | Yes        | `happyhorse-1.0-t2v`, `happyhorse-1.0-i2v`, `happyhorse-1.0-r2v`, or `happyhorse-1.0-video-edit` |
| `prompt`      | string    | Yes        | Description of the requested video                                                               |
| `image`       | string    | I2V        | Single first-frame image URL                                                                     |
| `images`      | string\[] | R2V        | 1-3 reference image URLs; I2V accepts the array form but uses only the first image               |
| `resolution`  | string    | No         | `720P` or `1080P`; default `1080P`                                                               |
| `ratio`       | string    | No         | `16:9`, `9:16`, `1:1`, `4:3`, or `3:4`; default `16:9`                                           |
| `duration`    | integer   | No         | 3-15 seconds; default `5`                                                                        |
| `watermark`   | boolean   | No         | Whether to add the HappyHorse watermark; default `true`                                          |
| `seed`        | integer   | No         | Random seed in `[0, 2147483647]`                                                                 |
| `input.media` | object\[] | Video edit | Exactly one `video` item and 0-5 optional `reference_image` items                                |

<CardGroup cols={2}>
  <Card title="API reference" icon="code" href="/api-reference/model-api/alibaba/happyhorse-1.0">View all four HappyHorse 1.0 request formats.</Card>
  <Card title="Task query" icon="magnifying-glass" href="/guides/model-api/alibaba/happyhorse-task-query">Poll task status and retrieve the result URL.</Card>
</CardGroup>

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