Video Generation API
Generate short videos with minimax-h3 — from a text prompt, reference images, or reference audio. Billed per second of video; see model pricing for the rate at each resolution.
Videos are asynchronous
A video takes a few minutes to generate. You submit a task, get a task ID back immediately, then poll until it finishes. Do not wait on a single request — it will time out.
1. Submit a task
POST https://jzstoken.com/api/v1/videos
curl https://jzstoken.com/api/v1/videos \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-YOUR_KEY_HERE" \
-d '{
"model": "minimax-h3",
"prompt": "A paper boat drifting down a rainy city street at night, neon reflections, cinematic",
"resolution": "480p",
"duration": 5,
"aspectRatio": "landscape"
}'Returns 202 with a task:
{
"id": "cmuxxxxxxxxxxxxxxxx",
"object": "video.task",
"model": "minimax-h3",
"status": "running",
"resolution": "480p",
"duration": 5,
"cost_usd": 0.0968,
"refunded": false,
"created": 1790590000
}2. Poll for the result
GET https://jzstoken.com/api/v1/videos/{id} — poll every 10–15 seconds. You can only read tasks created with your own API key.
curl https://jzstoken.com/api/v1/videos/TASK_ID \
-H "Authorization: Bearer sk-YOUR_KEY_HERE"running— still generating;progressis 0–100.succeeded—data[0].urlis the video. The link is temporary, download it.failed—error.messageexplains why, and the charge is refunded automatically (refunded: true).
Python example
import time, requests
BASE = "https://jzstoken.com/api/v1"
HEADERS = {"Authorization": "Bearer sk-YOUR_KEY_HERE"}
task = requests.post(f"{BASE}/videos", headers=HEADERS, json={
"model": "minimax-h3",
"prompt": "A paper boat drifting down a rainy city street at night",
"resolution": "480p",
"duration": 5,
}).json()
print("submitted", task["id"], "cost $", task["cost_usd"])
while True:
t = requests.get(f"{BASE}/videos/{task['id']}", headers=HEADERS).json()
if t["status"] == "succeeded":
print("video:", t["data"][0]["url"])
break
if t["status"] == "failed":
print("failed:", t["error"]["message"], "(refunded)" if t["refunded"] else "")
break
print("progress", t.get("progress", 0), "%")
time.sleep(10)Parameters
| Field | Description |
|---|---|
| model | Required. minimax-h3. |
| prompt | Required. Describe the scene, camera movement, timing and sound. Detailed, shot-by-shot prompts give much better results. |
| resolution | 480p (default), 768p or 1080p. Price per second depends on this. |
| duration | Seconds, 1–15 (default 5). At 1080p the maximum is 10. |
| aspectRatio | landscape (default), portrait or square. Ratios such as 16:9, 9:16 and 1:1 also work. |
| images | Optional. Up to 9 reference images (URLs or base64). |
| audios | Optional. Up to 3 reference audio clips (URLs or base64). |
| seed | Optional integer, for reproducible results. |
Billing
- Price = per-second rate for the chosen resolution × duration. The full amount is reserved from your balance when you submit, so make sure your balance covers it.
- If the task fails or is blocked by content moderation, the full amount is refunded automatically.
- Each task appears in your usage log with its cost; refunded tasks show a cost of $0 and the reason.