Skip to main content
AI

Create Video Generation Task

This document explains Happy Horse video model call.

Public Models

Public ModelsCapabilityResolution tier
happy-horse-720ptext-to-video, image-to-video, reference-image-to-video720p
happy-horse-1080ptext-to-video, image-to-video, reference-image-to-video1080p
happy-horse-edit-720pvideo editing720p
happy-horse-edit-1080pvideo editing1080p

Note:

  • duration Happy Horse Public Models Yesrequired parameter,3 15.
  • video editingModel, duration billing detail andtask, editing video, up toprocessing 15.
  • generation model aspect_ratio text-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

ParametersTypeRequiredModelNote
modelstringYesallPublic model name
promptstringYesallprompt, up to 2500
durationintegerYesall3 15; editingModel billing detail
sizestringNoallOptional values: pass value: 720p Modelpass 720p, 1080p Modelpass 1080p
seedintegerNoallrandom seed, range 0 2147483647
aspect_ratiostringNotext-to-video, reference-image-to-videoOptional values 16:9, 9:16, 1:1, 4:3, 3:4
imagestringimage-to-videoRequiredimage-to-videosingle source image URL
imagesstring[]reference-image-to-videoRequiredreference-image-to-video1 9 reference image URL
reference_image_urlsstring[]reference-image-to-videoreference-image-to-videoimages

imageconstraints:

  • image-to-video image supports jpeg, jpg, png, bmp, webp, imagesize 300px, Ratio 1:2.5 2.5:1, 10MB.
  • reference-image-to-video images supports jpeg, jpg, png, webp, 1 9, 400px, recommended 720p, 10MB.
  • reference-image-to-videoprompt use character1 character9 image.

video editingParameters

ParametersTypeRequiredNote
videostringYesvideo URL
reference_image_urlsstring[]Noreference image URL, up to 5
audio_settingstringNoOptional values auto or origin, default follows the upstream default auto

videoconstraints:

  • supports mp4, mov, recommended H.264.
  • video 3 60.
  • 2160px, 320px.
  • Ratio 1:2.5 2.5:1.
  • 8fps, file 100MB.

reference imageconstraints:

  • up to 5.
  • supports jpeg, jpg, png, webp.
  • size 300px, Ratio 1:2.5 2.5:1.
  • 10MB.

API Parameters and Examples

Endpoint

POST /v1/video/generations

Header Parameters

NameTypeRequiredDescriptionExample
AuthorizationstringNoBearer {your_token}

Request Body Parameters

FieldTypeRequiredTitleDescription
modelstringYesModel namePublic model name
promptstringYespromptprompt, up to 2500
imagestringYesreference URLsingle source image URL, must be public URLimage URL
imagesstringYesreference-image-to-video1 9 reference image URL
aspect_ratiostringNoRatioOptional values 16:9, 9:16, 1:1, 4:3, 3:4
durationstringNodescription3 15; editingModel billing detail
seedstringYesrandom seedrandom seed, range 0 2147483647
videostringYesvideo URLmust be public URL URL
audio_settingstringYesOptional values auto or origin, default follows the upstream default auto
sizestringNoExample fieldAppears in a request example; no separate field description is provided.
reference_image_urlsarrayNoExample fieldAppears 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

FieldTypeRequiredTitleDescription
idstringYestask ID
objectstringYesTask type
modelstringYesModel name
statusstringYesStatus
progressstringYes
created_atstringYesCreated time
secondsstringYesduration

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
}