Create a HappyHorse video
Create a HappyHorse text-to-video or reference-image video task through CometAPI with POST /v1/videos, then poll the task and download the completed MP4 file.
curl https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
-F model=happyhorse-1.1 \
-F 'prompt=A close-up cinematic shot of a ceramic coffee cup on a wooden table. Steam rises slowly while morning light moves across the background.' \
-F seconds=3 \
-F size=1920x1080{
"id": "task_example",
"task_id": "task_example",
"object": "video",
"model": "happyhorse-1.1",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}id to poll the task and download the completed video.
POST /v1/videos uses multipart/form-data. Send controls as form fields and reference images as input_reference fields, with one HTTPS URL or uploaded image file per field.
Choose an input mode
| Goal | Model | Required fields | Optional fields |
|---|---|---|---|
| Text-to-video | happyhorse-1.0, happyhorse-1.1 | model, prompt | seconds, size |
| Reference-to-video | happyhorse-1.0, happyhorse-1.1 | model, prompt, 1–9 input_reference URLs or files | seconds, size |
| First-frame image-to-video | happyhorse-1.0, happyhorse-1.1 | model, prompt, one first_frame URL or file | seconds, size |
input_reference once per image in image order.
Use only URLs or only files within this field. Send each URL separately rather than joining URLs with commas.
For input_reference, each reference image must be at or below 10 MB with happyhorse-1.0.
With happyhorse-1.1, each reference image must be at or below 20 MB.
These model limits apply to both image URLs and uploaded files.
Use JPEG, JPG, PNG, or WEBP images with a shortest side of at least 400 px.
The input_reference upload limit is 20 MiB (20 × 1024 × 1024 bytes) per file. Uploaded images must also meet the model-specific limit above.
The request samples at the top of this page show multiple image URLs for HappyHorse 1.1 and multiple file uploads for both models.
To set the opening frame, send first_frame once with one publicly accessible HTTPS image URL or one image file. Use this field in a separate request from input_reference.
Set duration and size
| Model ID | seconds | Default |
|---|---|---|
happyhorse-1.0 | integer 3-15 | 5 seconds, 1920x1080 |
happyhorse-1.1 | integer 3-15 | 5 seconds, 1920x1080 |
WxH value for size from the table below.
For first-frame requests, the image determines the framing and aspect ratio, while size selects the output resolution tier.
| Model | Frame shape | size values |
|---|---|---|
happyhorse-1.0 | Landscape | 1280x720, 1920x1080 |
| Portrait | 720x1280, 1080x1920 | |
| Square | 1440x1440 | |
happyhorse-1.1 | Landscape | 1280x720, 1920x1080 |
| Portrait | 720x1280, 1080x1920 | |
| Square | 1440x1440 | |
| Classic landscape | 1440x1080 | |
| Classic portrait | 720x960, 1080x1440 | |
| Wide landscape | 2520x1080 | |
| Wide portrait | 1080x2520 | |
| Near-square landscape | 900x720, 1350x1080 | |
| Near-square portrait | 720x900, 1080x1350 |
Task flow
Create the task
id.Poll the task
status is completed, failed, or error.Download the result
completed, call Retrieve HappyHorse video content to download the MP4 file.Body
Reference images for reference-to-video. Send 1–9 publicly accessible HTTPS image URLs or 1–9 uploaded image files by repeating input_reference once per image. Use only URLs or only files within this field; do not join URLs with commas. Reference images guide subjects and visual details. CometAPI preserves image order. Use JPEG, JPG, PNG, or WEBP images with a shortest side of at least 400 px. Each reference image must be at or below 10 MB for happyhorse-1.0 or 20 MB for happyhorse-1.1. These model limits apply to both image URLs and uploaded files. The input_reference file upload limit is 20 MiB (20 x 1024 x 1024 bytes) per file. Keep uploads within the model limit as well. Keep this field separate from first_frame.
^https://Response
Task created. Store the returned id and poll GET /v1/videos/{task_id}.
curl https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
-F model=happyhorse-1.1 \
-F 'prompt=A close-up cinematic shot of a ceramic coffee cup on a wooden table. Steam rises slowly while morning light moves across the background.' \
-F seconds=3 \
-F size=1920x1080{
"id": "task_example",
"task_id": "task_example",
"object": "video",
"model": "happyhorse-1.1",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}