Quickstart
Generate a clip with sound in three calls. You need an API key — create an account and issue one from the console.
1. Submit
curl https://api.h3.studio/v2/video_generation \
-H "Authorization: Bearer $H3_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-H3",
"content": [{ "type": "text", "text": "a lighthouse at dusk, waves on black rock" }],
"resolution": "768P",
"duration": 5,
"ratio": "16:9"
}'
{ "task_id": "424010985738629" }
The call returns immediately. Generation takes 82–229 seconds depending on the tier, so nothing about this API blocks.
2. Poll
curl "https://api.h3.studio/v2/query/video_generation/$TASK_ID" \
-H "Authorization: Bearer $H3_API_KEY"
{
"task": {
"id": "424010985738629",
"model": "MiniMax-H3",
"status": "succeeded",
"created_at": 1785125529,
"updated_at": 1785125946,
"content": { "url": "https://cdn.h3.studio/outputs/...?Expires=…&Signature=…" },
"resolution": "768P",
"duration": 5,
"usage": {
"total_seconds": 5,
"input_seconds": 0,
"output_seconds": 5,
"input_image_count": 0
},
"ratio": "16:9",
"task_type": "generation",
"modality": "video"
}
}
status moves through queued → running → succeeded. Poll every few
seconds, or skip polling entirely with a callback.
3. Download
content.url is a signed link that expires after an hour. It is minted fresh
on every query, so if one expires, ask again.
curl -L "$URL" -o out.mp4
The result is an mp4: H.264 video at 24 fps, and an AAC stereo track at 32 kHz. The audio is generated jointly with the picture, in the same forward pass — it is not a soundtrack chosen afterwards.
In Python
import os, time, httpx
api = httpx.Client(
base_url="https://api.h3.studio",
headers={"Authorization": f"Bearer {os.environ['H3_API_KEY']}"},
)
task_id = api.post("/v2/video_generation", json={
"model": "MiniMax-H3",
"content": [{"type": "text", "text": "a lighthouse at dusk"}],
"resolution": "768P",
"duration": 5,
"ratio": "16:9",
}).raise_for_status().json()["task_id"]
while True:
task = api.get(f"/v2/query/video_generation/{task_id}").json()["task"]
if task["status"] in ("succeeded", "failed", "cancelled"):
break
time.sleep(5)
if task["status"] != "succeeded":
raise RuntimeError(task.get("error"))
with open("out.mp4", "wb") as f:
f.write(httpx.get(task["content"]["url"], follow_redirects=True).content)
Writing a prompt that works
H3 was trained on structured prompts, and it shows. A prompt with explicit sections for picture, ambient sound and music produces markedly better results than a single sentence:
integrated_multimodal_description: [Shot 1] Cinematic, slow push-in. A lone
lighthouse stands on a rocky headland at dusk, its lamp rotating through thin
sea mist. Waves break against black rocks below.
overall_soundscape: The steady low roar of surf against rock. Wind over an
exposed headland. A gull calls twice, thin and far away.
non_diegetic_music: A slow, sparse piano figure with sustained low strings,
patient and unresolved.
MiniMax publishes a prompt-writing guide as an installable skill in the MiniMax-H3 repository; it applies here unchanged.
Next
- Authentication — keys, and how to keep them safe
- Generate a video — every field, every mode
- Errors and limits — what can go wrong