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

> Generate videos with synchronized audio from text using HappyHorse 1.1 T2V.

HappyHorse 1.1 T2V is Alibaba Cloud Model Studio's text-to-video model. It generates a 24 fps MP4 video with synchronized audio from a text prompt through AnyFast's asynchronous video API.

`T2V` means **text-to-video**: the request contains a text prompt and does not require an input image.

## Key capabilities

* **Text-to-video** - Generate video and audio from a text description
* **Resolution** - `720P` or `1080P`
* **Duration** - An integer from 3 to 15 seconds
* **Aspect ratio** - `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `4:5`, `5:4`, `9:21`, or `21:9`
* **Reproducibility control** - Set a random `seed`
* **Watermark control** - Choose whether to add the HappyHorse watermark

## Workflow

```text theme={null}
1. POST /v1/video/generations -> task_id
2. GET /v1/video/generations/{task_id} -> poll until complete
3. Download the generated video from the returned result URL
```

<Note>
  Video generation is asynchronous. Keep the returned task ID and poll the task query endpoint. Task IDs and successful result URLs are available for 24 hours.
</Note>

## Quick example

<CodeGroup>
  ```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.1-t2v",
      "input": {
        "prompt": "A miniature cardboard city comes to life at night as a small illuminated train passes through it."
      },
      "parameters": {
        "resolution": "720P",
        "ratio": "16:9",
        "duration": 5,
        "watermark": false,
        "seed": 42
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://www.anyfast.ai/v1/video/generations",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      json={
          "model": "happyhorse-1.1-t2v",
          "input": {
              "prompt": "A miniature cardboard city comes to life at night."
          },
          "parameters": {
              "resolution": "720P",
              "ratio": "16:9",
              "duration": 5,
              "watermark": False,
          },
      },
  )
  response.raise_for_status()
  print(response.json()["task_id"])
  ```
</CodeGroup>

## Parameters

| Parameter               | Type    | Required | Description                                                                                                      |
| ----------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------- |
| `model`                 | string  | Yes      | Must be `happyhorse-1.1-t2v`                                                                                     |
| `input.prompt`          | string  | Yes      | Video description. Maximum 5,000 non-Chinese characters or 2,500 Chinese characters; excess content is truncated |
| `parameters.resolution` | string  | No       | `720P` or `1080P`. Default: `1080P`                                                                              |
| `parameters.ratio`      | string  | No       | Output aspect ratio. Default: `16:9`                                                                             |
| `parameters.duration`   | integer | No       | Video duration from 3 to 15 seconds. Default: `5`                                                                |
| `parameters.watermark`  | boolean | No       | Whether to add the HappyHorse watermark. Default: `true`                                                         |
| `parameters.seed`       | integer | No       | Random seed in `[0, 2147483647]`                                                                                 |

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/api-reference/model-api/alibaba/happyhorse-1.1-t2v">
    View the request and response schema.
  </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>

## Official reference

See the [Alibaba Cloud Model Studio HappyHorse text-to-video API reference](https://help.aliyun.com/en/model-studio/happyhorse-text-to-video-api-reference).

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