Hailuo 03
Generate 768p or native 2K video with synchronized audio from text, frames, or reference media using MiniMax H3.
POST /v2/videos/generate — model: "hailuo-03"
MiniMax H3 generates 4 to 15 second clips at 768p or native 2K with stereo audio produced in the same pass, so dialogue, effects, and ambience are synchronized to the picture rather than dubbed on afterwards. It accepts three kinds of input: a text prompt on its own, first and last frames, or a set of reference images, videos, and audio clips that carry a subject, style, or voice into the result. Pass a 768p H3 clip as base_video to regenerate it at 2K.
See Video Generation overview for common request fields, response format, and error codes.
Model-specific parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
hailuoParams.duration | number | No | 5 | Output length in seconds, any integer from 4 to 15 |
hailuoParams.resolution | string | No | "2K" | Video resolution: "768p" or "2K" |
hailuoParams.aspect_ratio | string | No | "16:9" | One of "auto", "21:9", "16:9", "4:3", "1:1", "3:4", "9:16" |
hailuoParams.image | string | No | — | Image URL used as the first frame |
hailuoParams.end_image | string | No | — | Image URL used as the last frame |
hailuoParams.base_video | string | No | — | A 768p Hailuo 03 clip to regenerate at 2K. Output is always 2K |
hailuoParams.reference_images | string[] | No | — | Up to 9 image URLs describing subjects or style |
hailuoParams.reference_videos | string[] | No | — | Up to 3 video URLs, 15s total across all clips |
hailuoParams.reference_audios | string[] | No | — | Up to 3 audio URLs used as a voice reference |
The prompt field accepts up to 7,000 characters for this model.
Constraints:
- Frame inputs (
image,end_image) and reference inputs (reference_images,reference_videos,reference_audios) cannot be combined in one request. reference_audiosrequires at least onereference_imagesorreference_videosentry.aspect_ratio: "auto"needs at least one media input. Text-only requests must pick a concrete ratio.- Reference videos must be 2 to 15 seconds each and 15 seconds in total.
base_videoregeneration always outputs 2K. Do not setresolutionto"768p"on a regen request. Reproduce the original prompt and frames or references alongside the source clip.
Credit cost
Billed per second, on the output duration plus the total duration of any reference videos. A base_video regen is billed on the probed source duration at the regen rate.
| Variant | Credits / second |
|---|---|
768p | 10 |
2k | 16 |
2k-regen | 6 |
Each reference image past the first five adds a flat surcharge:
| Variant | Credits |
|---|---|
extra-image | 5 |
extra-image-regen | 3 |
A 6 second 2K clip costs 132 credits. The same clip at 768p costs 84 credits. A 6 second regen of a 768p source costs 54 credits. The 2K clip with a 4 second reference video costs 220 credits (10 billed seconds). Add 7 reference images and it costs 234 credits (2 images past the free 5).
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"
}The audio track is muxed into the 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 chef plates a dish in a busy kitchen, steam rising, ambient clatter and low chatter",
"model": "hailuo-03",
"hailuoParams": {
"duration": 6,
"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 chef plates a dish in a busy kitchen, steam rising, ambient clatter and low chatter",
"model": "hailuo-03",
"hailuoParams": {
"duration": 6,
"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 chef plates a dish in a busy kitchen, steam rising, ambient clatter and low chatter",
model: "hailuo-03",
hailuoParams: {
duration: 6,
aspect_ratio: "16:9",
},
}),
});
console.log(await response.json());body := `{
"prompt": "a chef plates a dish in a busy kitchen, steam rising, ambient clatter and low chatter",
"model": "hailuo-03",
"hailuoParams": {
"duration": 6,
"aspect_ratio": "16:9"
}
}`
req, _ := http.NewRequest("POST", "https://api.apiframe.ai/v2/videos/generate",
strings.NewReader(body))
req.Header.Set("X-API-Key", "afk_your_api_key_here")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)Reference-driven generation
Pass reference media instead of frames to carry a subject, setting, or voice into a new scene. The references describe what appears; the prompt describes what happens.
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": "she walks through the market at golden hour, greeting a vendor",
"model": "hailuo-03",
"hailuoParams": {
"duration": 8,
"aspect_ratio": "auto",
"reference_images": [
"https://example.com/character-front.jpg",
"https://example.com/character-side.jpg"
],
"reference_audios": ["https://example.com/voice-sample.mp3"]
}
}'Try it
/v2/videos/generateTry it