Generates 5–15-second video at 480p or 768p from text, a first frame, or first and last frames. Four-second clips, middle frames, and multimodal references are unavailable.
minimax-video-h3-maxSupports text-to-video, frame-to-video, and first-and-last-frame-to-video generation, 480P / 768P, 5–15 seconds.
Required parameters: model, prompt, resolution
Available parameters: model, prompt, content, resolution, duration, ratio, aspect_ratio, aigc_watermark, wait, idempotency_key
Required parameters: model, first_frame_url, resolution
Available parameters: model, prompt, content, resolution, duration, ratio, aspect_ratio, aigc_watermark, wait, idempotency_key, first_frame_url
Required parameters: model, first_frame_url, last_frame_url, resolution
Available parameters: model, prompt, content, resolution, duration, ratio, aspect_ratio, aigc_watermark, wait, idempotency_key, first_frame_url, last_frame_url
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID. Options: minimax-video-h3-max |
prompt | string | No | Text prompt, describing the scene and motion. Required for text-to-video; optional for image-to-video, to describe how the scene evolves. Can also be passed via a content array (if content is provided, this field is overridden). |
resolution | string | Yes | Output resolution, required, case-insensitive. Only supports 480P / 768P; do not pass 720P, 1080P, 2K, or other values. Options: 480P / 768P |
duration | integer | No | Video duration (seconds), an integer multiple of 5–15, default 5. If less than 5 seconds, generated as 5 seconds and charged accordingly. |
ratio | string | No | Scene aspect ratio. Default 16:9 for text-to-video if not provided; follows the first frame image's aspect ratio for image-to-video if not provided. Options: 16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 21:9 |
first_frame_url | string | No | URL of the first frame image, from which the video begins. |
last_frame_url | string | No | URL of the last frame image, must be provided together with first_frame_url, the video transitions from the first to the last frame. |
content | array | No | Native input array, can replace prompt / first_frame_url / last_frame_url (if content is provided, these fields are ignored). Element types: - Text: { "type": "text", "text": "..." } - Image: { "type": "image_url", "image_url": { "url": "..." }, "role": "first_frame" | "last_frame" } Up to 2 images (one 1 for first and last frame); does not support reference images / reference videos / reference audio. |
aspect_ratio | string | No | Equivalent to ratio; pass one or the other; if both are provided, ratio takes precedence. |
aigc_watermark | boolean | No | Whether to add an AIGC-generated watermark in the video, default is not to add one. |
wait | boolean | No | When true, the maximum waiting time is approximately 60 seconds: if generation completes within this period, the result is returned directly; otherwise, a task in progress is returned, and the result must be retrieved via the query interface. It is recommended to use the default asynchronous method. |
idempotency_key | string | No | Idempotency key: when the same key is submitted repeatedly, the same task is returned and no duplicate creation or billing occurs. |
# 1) 提交任务:返回 202 和任务 id
curl https://api.router.ai/v1/videos/generations \
-H "Authorization: Bearer sk-你的令牌" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-video-h3-max",
"prompt": "一只橙色小猫坐在窗台上,慢慢转头看向镜头,午后阳光",
"resolution": "768P",
"duration": 5,
"ratio": "16:9"
}'
# 2) 查询结果:用上一步返回的 id,每 10 秒查一次,
# 直到 status 为 succeeded(成功)或 failed / timeout(失败)
curl https://api.router.ai/v1/videos/generations/vt_7f3c2a9e5b1d4c8a9e0b7d6e5f4a3b2c \
-H "Authorization: Bearer sk-你的令牌"