Happy Horse 1.0
Generate video from text or animate a first-frame image with Alibaba Happy Horse 1.0 — 720p/1080p, 3–15s, with built-in audio.
POST /v2/videos/generate — model: "happyhorse-1.0"
Happy Horse 1.0 is Alibaba's video generation model. It generates video from a text prompt, or animates a single first-frame image into video, with synchronized audio generated automatically. Served across Replicate and Alibaba Cloud (DashScope) with automatic failover.
The mode is selected automatically:
- Provide no
image→ text-to-video (useaspect_ratioto control the shape). - Provide
image→ image-to-video. The output adopts the image's aspect ratio, soaspect_ratiois ignored. Apromptis optional here and steers the motion.
See Video Generation overview for common request fields, response format, and error codes.
Model-specific parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
happyhorse10Params.image | string | No | — | First-frame image URL for image-to-video. Omit for text-to-video. JPG, PNG, BMP, or WEBP; each side ≥ 300px. |
happyhorse10Params.resolution | string | No | "1080p" | Output resolution: "720p" or "1080p". |
happyhorse10Params.aspect_ratio | string | No | "16:9" | Text-to-video only. One of "16:9", "9:16", "1:1", "4:3", "3:4". Ignored for image-to-video. |
happyhorse10Params.duration | number | No | 5 | Video duration in seconds (integer, 3–15). |
happyhorse10Params.seed | number | No | — | Random seed (0–2147483647) for reproducible generation. |
Credit cost
Pricing is per second of generated video (credits = rate × duration), by resolution.
| Variant | Credits / second |
|---|---|
720p | 24 |
1080p | 48 |
A 6-second clip at 1080p therefore costs 48 × 6 = 288 credits.
Example result
Once the job is COMPLETED, the result object on GET /v2/jobs/:id looks like:
{
"videoUrl": "https://cdn2.apiframe.ai/videos/b2c3d4e5-f6a7-8901-bcde-f23456789012.mp4"
}See Result format for field details.
Code examples
curl -X POST https://api.apiframe.ai/v2/videos/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A wild horse galloping across a misty meadow at sunrise, cinematic slow motion",
"model": "happyhorse-1.0",
"happyhorse10Params": {
"duration": 6,
"resolution": "1080p",
"aspect_ratio": "16:9"
}
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/videos/generate",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"prompt": "A wild horse galloping across a misty meadow at sunrise, cinematic slow motion",
"model": "happyhorse-1.0",
"happyhorse10Params": {
"duration": 6,
"resolution": "1080p",
"aspect_ratio": "16:9",
},
},
)
print(response.json())const response = await fetch("https://api.apiframe.ai/v2/videos/generate", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "A wild horse galloping across a misty meadow at sunrise, cinematic slow motion",
model: "happyhorse-1.0",
happyhorse10Params: {
duration: 6,
resolution: "1080p",
aspect_ratio: "16:9",
},
}),
});
console.log(await response.json());Image-to-video
Provide a first-frame image to animate. The output adopts the image's aspect ratio.
curl -X POST https://api.apiframe.ai/v2/videos/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "The horse rears up and shakes its mane",
"model": "happyhorse-1.0",
"happyhorse10Params": {
"image": "https://example.com/horse.jpg",
"duration": 5,
"resolution": "720p"
}
}'Try it
/v2/videos/generateTry it