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

# HappyHorse 1.1 - Image to Video

> Generate videos from a first-frame image using the HappyHorse 1.1 model.

Generate a video from a single first-frame image using the **HappyHorse 1.1** model.

## Create a Video Generation Task

```http theme={null}
POST /api/v1/jobs/createTask
```

## Authentication

All API requests require a Bearer Token.

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Parameters

<ParamField body="model" default="happyhorse-1-1/image-to-video" type="string" required>
  Must be `happyhorse-1-1/image-to-video`.
</ParamField>

### `input` Parameters

<ParamField body="input" type="object" required>
  The `input` object contains the parameters used to generate the video.

  <ParamField body="prompt" type="string">
    Use `prompt` to describe the video motion you want to generate any language or Chinese.

    **Note:** Extra content is truncated.

    **Maximum length:** `5,000` non-Chinese characters. <br /> **Maximum length:** `2,500` Chinese characters.
  </ParamField>

  <ParamField body="image_urls" type="string[]" required>
    Use the provided image URL as the first frame. <br /> The `image_urls` must contain the URL of an uploaded image. The value must be an uploaded file URL, not the file content itself.

    Supported image constraints:

    * **Formats:** JPEG, JPG, PNG, WEBP
    * **Minimum resolution:** 300 × 300 pixels
    * **Aspect ratio:** 1:2.5 to 2.5:1
    * **Maximum file size:** 20 MB
  </ParamField>

  <ParamField body="resolution" default="1080p" type="string">
    Specify the resolution of the output video.

    Supported output resolutions:

    * `720p`
    * `1080p`

    **Default:** `1080p`
  </ParamField>

  <ParamField body="duration" type="integer">
    Generated video duration in seconds.

    Supported range : `3`–`15`, in one-second steps.

    **Default:** `5`
  </ParamField>
</ParamField>

## Request

### Example

```json theme={null}
{
  "model": "happyhorse-1-1/image-to-video",
  "input": {
    "prompt": "A cat running on the grass",
    "image_urls": [
      "https://example.com/input-image.jpg"
    ],
    "resolution": "1080p",
    "duration": 5,
  }
}
```

## Successful Response

<ResponseField name="code" type="integer" default="200">
  Response status code.
</ResponseField>

<ResponseField name="msg" type="string">
  Response message. Contains the error description when the request fails.

  **Example:** `success`
</ResponseField>

<ResponseField name="data" type="object" required>
  The task data object containing task id.

  <ResponseField name="taskId" type="string" required>
    The unique identifier for this task.

    **Example:** `task_1765180586443`
  </ResponseField>
</ResponseField>

## Query Task Status

After submitting a task, use the unified query endpoint to check the task progress and retrieve the generated results.

<Card title="Get Task Details" icon="search" href="/get-task-detail">
  Check task status, monitor generation progress, and retrieve results.
</Card>

### Error Response

```json theme={null}
{
  "code": 500,
  "msg": "Server Error - An unexpected error occurred while processing the request",
  "data": null
}
```

## Response Codes

|  Code | Meaning                                                                   |
| ----: | ------------------------------------------------------------------------- |
| `200` | Success — the request was successfully processed.                         |
| `401` | Unauthorized — authentication credentials are missing or invalid.         |
| `402` | Insufficient Credits — the account does not have enough credits.          |
| `404` | Not Found — the requested resource or interface does not exist.           |
| `408` | Upstream service issue — no result has been returned for over 10 minutes. |
| `422` | Validation Error — request parameters failed validation.                  |
| `429` | Rate Limited — request frequency limit has been exceeded.                 |
| `433` | Request Limit — sub-key usage exceeded the limit.                         |
| `455` | Service Unavailable — system is undergoing maintenance.                   |
| `500` | Server Error — an unexpected error occurred while processing the request. |
| `501` | Generation Failed — content generation failed.                            |
| `505` | Feature Disabled — the requested feature is disabled.                     |
