Create Video Generation Task
This document explains Happy Horse video model call.
Public Models
| Public Models | Capability | Resolution tier |
|---|---|---|
happy-horse-720p | text-to-video, image-to-video, reference-image-to-video | 720p |
happy-horse-1080p | text-to-video, image-to-video, reference-image-to-video | 1080p |
happy-horse-edit-720p | video editing | 720p |
happy-horse-edit-1080p | video editing | 1080p |
Note:
durationHappy Horse Public Models Yesrequired parameter,315.- video editingModel,
durationbilling detail andtask, editing video, up toprocessing15. - generation model
aspect_ratiotext-to-videoandreference-image-to-video; image-to-video Input image. - video editingModeldoes not support
aspect_ratio.
Endpoint
submit task:
POST /v1/videos/generations
Authorization: Bearer <api-key>
Content-Type: application/json
Query Task:
GET /v1/videos/generations/{task_id}
Authorization: Bearer <api-key>
Parameter Reference
| Parameters | Type | Required | Model | Note |
|---|---|---|---|---|
model | string | Yes | all | Public model name |
prompt | string | Yes | all | prompt, up to 2500 |
duration | integer | Yes | all | 3 15; editingModel billing detail |
size | string | No | all | Optional values: pass value: 720p Modelpass 720p, 1080p Modelpass 1080p |
seed | integer | No | all | random seed, range 0 2147483647 |
aspect_ratio | string | No | text-to-video, reference-image-to-video | Optional values 16:9, 9:16, 1:1, 4:3, 3:4 |
image | string | image-to-videoRequired | image-to-video | single source image URL |
images | string[] | reference-image-to-videoRequired | reference-image-to-video | 1 9 reference image URL |
reference_image_urls | string[] | reference-image-to-video | reference-image-to-video | images |
imageconstraints:
- image-to-video
imagesupportsjpeg,jpg,png,bmp,webp, imagesize300px, Ratio1:2.52.5:1,10MB. - reference-image-to-video
imagessupportsjpeg,jpg,png,webp, 1 9,400px, recommended 720p,10MB. - reference-image-to-videoprompt use
character1character9image.
video editingParameters
| Parameters | Type | Required | Note |
|---|---|---|---|
video | string | Yes | video URL |
reference_image_urls | string[] | No | reference image URL, up to 5 |
audio_setting | string | No | Optional values auto or origin, default follows the upstream default auto |
videoconstraints:
- supports
mp4,mov, recommended H.264. - video
360. 2160px,320px.- Ratio
1:2.52.5:1. 8fps, file100MB.
reference imageconstraints:
- up to 5.
- supports
jpeg,jpg,png,webp. - size
300px, Ratio1:2.52.5:1. 10MB.
API Parameters and Examples
Endpoint
POST /v1/video/generations
Header Parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
Authorization | string | No | Bearer {your_token} |
Request Body Parameters
| Field | Type | Required | Title | Description |
|---|---|---|---|---|
model | string | Yes | Model name | Public model name |
prompt | string | Yes | prompt | prompt, up to 2500 |
image | string | Yes | reference URL | single source image URL, must be public URLimage URL |
images | string | Yes | reference-image-to-video | 1 9 reference image URL |
aspect_ratio | string | No | Ratio | Optional values 16:9, 9:16, 1:1, 4:3, 3:4 |
duration | string | No | description | 3 15; editingModel billing detail |
seed | string | Yes | random seed | random seed, range 0 2147483647 |
video | string | Yes | video URL | must be public URL URL |
audio_setting | string | Yes | Optional values auto or origin, default follows the upstream default auto | |
size | string | No | Example field | Appears in a request example; no separate field description is provided. |
reference_image_urls | array | No | Example field | Appears in a request example; no separate field description is provided. |
Request Examples
text-to-video
{
"model": "happy-horse-720p",
"prompt": "A cinematic wide shot of a white horse running across a misty grassland at sunrise, realistic motion, soft rim light.",
"duration": 4,
"aspect_ratio": "16:9",
"size": "720p",
"seed": 12345
}
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{"model": "happy-horse-720p",
"prompt": "A cinematic wide shot of a white horse running across a misty grassland at sunrise, realistic motion, soft rim light.",
"duration": 4,
"aspect_ratio": "16:9",
"size": "720p",
"seed": 12345}'
image-to-video
{
"model": "happy-horse-1080p",
"prompt": "Animate the subject naturally, with subtle camera push-in and realistic cloth movement.",
"image": "https://example.com/source-frame.png",
"duration": 6,
"size": "1080p",
"seed": 67890
}
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{"model": "happy-horse-1080p",
"prompt": "Animate the subject naturally, with subtle camera push-in and realistic cloth movement.",
"image": "https://example.com/source-frame.png",
"duration": 6,
"size": "1080p",
"seed": 67890}'
reference-image-to-video
{
"model": "happy-horse-1080p",
"prompt": "character1 rides character2 through a futuristic city street, keep both identities consistent.",
"images": [
"https://example.com/character1.png",
"https://example.com/character2.png"
],
"duration": 8,
"aspect_ratio": "9:16",
"seed": 24680
}
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{"model": "happy-horse-1080p",
"prompt": "character1 rides character2 through a futuristic city street, keep both identities consistent.",
"images": ["https://example.com/character1.png",
"https://example.com/character2.png"],
"duration": 8,
"aspect_ratio": "9:16",
"seed": 24680}'
video editing
{
"model": "happy-horse-edit-720p",
"prompt": "Change the actor jacket into a red leather jacket while preserving motion, face identity, camera movement, and background.",
"video": "https://example.com/source-video.mp4",
"reference_image_urls": [
"https://example.com/jacket-reference.png"
],
"duration": 4,
"size": "720p",
"audio_setting": "origin",
"seed": 13579
}
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{"model": "happy-horse-edit-720p",
"prompt": "Change the actor jacket into a red leather jacket while preserving motion, face identity, camera movement, and background.",
"video": "https://example.com/source-video.mp4",
"reference_image_urls": ["https://example.com/jacket-reference.png"],
"duration": 4,
"size": "720p",
"audio_setting": "origin",
"seed": 13579}'
Response Fields
| Field | Type | Required | Title | Description |
|---|---|---|---|---|
id | string | Yes | task ID | |
object | string | Yes | Task type | |
model | string | Yes | Model name | |
status | string | Yes | Status | |
progress | string | Yes | ||
created_at | string | Yes | Created time | |
seconds | string | Yes | duration |
Response Examples
Success
{
"id": "task_xxxxxxxxxxxxx",
"task_id": "task_xxxxxxxxxxxxx",
"object": "video.generation.job",
"model": "happy-horse-edit-720p",
"status": "queued",
"progress": 0,
"created_at": 1777355454
}