MiniMax Video API Integration Guide & Examples
| Method | Path | Use |
|---|---|---|
POST | /minimax/v2/video_generation | Create a video generation task |
GET | /minimax/v2/video_generation/{task_id} | Poll task status and result |
DELETE | /minimax/v2/video_generation/{task_id} | Cancel an unfinished task and release its preauthorization |
This is MiniMax video generation V2 as an inbound protocol, aimed mainly at the MiniMax-H3 family. Request and response bodies both use MiniMax's own shapes, so a client written against MiniMax's official docs can parse them directly.
Create a task
bash
curl https://api.modelgo.ai/minimax/v2/video_generation \
-H "Authorization: Bearer $MODELGO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "<model>",
"content": [
{ "type": "text", "text": "a boy playing basketball by the sea" },
{ "type": "image_url", "image_url": { "url": "https://example.com/first.jpg" }, "role": "first_frame" }
],
"resolution": "2K",
"duration": 5,
"ratio": "16:9"
}'The response is a bare task handle: { "task_id": "424010985738629" }.
Request fields
type | Allowed role | Meaning |
|---|---|---|
text | — | Prompt |
image_url | first_frame / last_frame | First / last frame image |
image_url | reference_image | Reference image |
video_url | reference_video | Reference video |
audio_url | reference_audio | Reference audio |
- First/last frames and reference media cannot be mixed: once
first_frame/last_frameis present, noreference_*item may be sent, and vice versa. resolution,durationandratiosit next tocontent. When omitted, the defaults below apply and are billed at that default tier:
| Model | resolution | resolution default | duration (s) | duration default |
|---|---|---|---|---|
| MiniMax-H3 | 768P / 2K | 2K | 4–15 | 5 |
| MiniMax-H3-Max | 480P / 768P (no 2K) | 768P | 5–15 | none, required |
Model names follow what is listed in the Model Catalog; out-of-range values usually return 400.
Poll a task
bash
curl https://api.modelgo.ai/minimax/v2/video_generation/424010985738629 \
-H "Authorization: Bearer $MODELGO_API_KEY"The poll response is a task envelope, shaped differently from the create response:
json
{
"task": {
"id": "424010985738629",
"model": "<model>",
"status": "succeeded",
"content": { "url": "https://.../video.mp4" },
"resolution": "2K",
"duration": 5,
"ratio": "16:9",
"usage": { "total_seconds": 5, "output_seconds": 5 }
}
}statusis one ofqueued/running/succeeded/failed; on success the asset URL is intask.content.url.usageis metered in seconds, not tokens.- A failed task additionally carries
task.error(code/message); clients parsing the official shape simply ignore it.
Cancel a task
bash
curl -X DELETE https://api.modelgo.ai/minimax/v2/video_generation/424010985738629 \
-H "Authorization: Bearer $MODELGO_API_KEY"Cancelling releases the preauthorization. This entrypoint never returns the cancelled status from MiniMax's docs; a cancelled task is always reported as failed.
For the standardized entrypoint, see OpenAI Video.