Multimodal Video Generation
Generate videos with MiniMax-H3 multimodal content arrays (text / image / video / audio). Supports text-to-video, image-to-video (first/last frame), and multimodal reference-to-video with 2K output. Async task API: submit to receive task_id, then poll for status.
Use the MiniMax-H3 multimodal video API to combine text prompts, first/last-frame images, reference images, reference videos, and reference audio in a single request. It supports text-to-video, image-to-video (first frame / last frame / first and last frames), and multimodal reference-to-video generation at 768P / 2K resolution and 4–15 seconds in duration.
This is an asynchronous task API: submitting a request immediately returns a task_id. Poll the task status, then download the video after it succeeds.
Only the MiniMax-H3 model is supported.
Base URL
https://api.autorouter.top— Production
Authentication
BearerAuth: http (bearer)
Authenticate using a Bearer Token.
Format: Authorization: Bearer sk-xxxxxx
Endpoints
POST /minimax/v2/video_generation
Create a video generation task
Create a video generation task through a multimodal content array (text / image / video / audio). This is an asynchronous API. On successful creation, it returns a task_id. Poll the task status through the Query Task API, then retrieve the generated video after the task succeeds.
Headers
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Content-Type | string | Yes | application/json | The media type of the request body. Set this to application/json |
Authorization | string | Yes | - | Authentication information, in the format: Bearer sk-xxxxxx |
Request Body
Content-Type: application/json
Example:
{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "史诗级太空歌剧院线预告:女舰长独自站在巨大观景窗前,最后一支舰队正在集结并跃迁离去,强光爆闪、舰桥震动,她被留在原地。"
}
],
"resolution": "2K",
"duration": 5,
"ratio": "16:9"
}Properties:
| Name | Type | Required | Default | Enum | Description |
|---|---|---|---|---|---|
model | string | Yes | - | MiniMax-H3 | Model name |
content | array | Yes | - | - | Multimodal input content array describing the information used to generate the video |
content[].type | string | Yes | - | text, image_url, video_url, audio_url | Type of input content |
resolution | string | Yes | - | 768P, 2K | Video resolution |
duration | integer | Yes | - | 4–15 | Generated video duration (seconds) |
ratio | string | No | adaptive | adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | Aspect ratio of the generated video; see below |
callback_url | string | No | - | - | Callback URL for task status change notifications |
aigc_watermark | boolean | No | false | - | Whether to add an AIGC watermark to the generated video |
modelstring(required)
Model name. Currently available value: MiniMax-H3.
contentarray(required)
Multimodal input content array describing the information used to generate the video. Each item is distinguished by type (text / image_url / video_url / audio_url) and can be labeled with role to indicate its purpose.
Every request must include one non-empty text item (prompt required); omitting it returns a parameter error.
Supported input combinations (for different generation scenarios):
- Text-to-video: one
textitem only. - Image-to-video—first frame:
text+ 1image_url(role=first_frameor omitted). - Image-to-video—last frame:
text+ 1image_url(role=last_frame). - Image-to-video—first and last frames:
text+ 2image_urlitems (rolevaluesfirst_frameandlast_frame, respectively). - Multimodal reference-to-video:
text+ a combination of reference images (role=reference_image), reference videos (role=reference_video), and reference audio (role=reference_audio).
Image-to-video and multimodal reference-to-video are mutually exclusive: if
contentincludes any of thereference_image/reference_video/reference_audioroles, it cannot includefirst_frame/last_frame(and vice versa). The two cannot be mixed.
Input media limits (total request body size ≤ 64 MB; use public URLs for large files instead of Base64)
Images (image_url):
| Item | Limit |
|---|---|
| Formats | JPG, JPEG, PNG, WEBP, HEIC, HEIF |
| Per-file size | ≤ 30 MB |
| Width and height range | [256, 5760] px |
| Aspect ratio (width/height) | [0.4, 2.5] |
| Quantity | First frame ≤ 1, last frame ≤ 1, reference images ≤ 9 |
Videos (video_url) (multimodal reference scenarios only):
| Item | Limit |
|---|---|
| Container / formats | MP4 (.mp4), MOV (.mov) |
| Encoding | Video H.264/AVC, H.265/HEVC; audio AAC, MP3 |
| Per-file size | ≤ 50 MB |
| Quantity | ≤ 3 |
| Per-clip duration | [2, 15] s; total duration ≤ 15 s |
| Width and height range | [256, 5760] px |
| Aspect ratio (width/height) | [0.4, 2.5] |
| Frame rate | [23.976, 60] |
Audio (audio_url) (multimodal reference scenarios only):
| Item | Limit |
|---|---|
| Formats | WAV, MP3 |
| Per-file size | ≤ 15 MB |
| Quantity | ≤ 3 |
| Per-clip duration | [2, 15] s; total duration ≤ 15 s |
The format is as follows:
[
{
"type": "text",
"text": "string"
},
{
"type": "image_url",
"image_url": {
"url": "string"
},
"role": "first_frame"
},
{
"type": "video_url",
"video_url": {
"url": "string"
},
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": {
"url": "string"
},
"role": "reference_audio"
}
]Type of input content:
text: Text promptimage_url: Imagevideo_url: Video (multimodal reference scenarios only)audio_url: Audio (multimodal reference scenarios only)
{
"type": "text",
"text": "string"
}text: Text prompt (prompt), required: all scenarios must include one non-emptytextitem describing the expected generated video- Length is measured by character count; each
textcan contain up to 7,000 characters
{
"type": "image_url",
"image_url": {
"url": "string"
},
"role": "first_frame"
}image_url.url: Image URL (required). Supported:- Public URL
mm_file://{file_id}(references an existing platform file, such as an uploaded file or thefile_idof a historical output)data:image/<format>;base64,<Base64>data URI (<format>must be lowercase)
role: Purpose of the content; see theroledescription below- See the
contentdescription above for format / size / dimension / quantity limits
{
"type": "video_url",
"video_url": {
"url": "string"
},
"role": "reference_video"
}video_url.url: Video URL (required). Supported:- Public URL
mm_file://{file_id}data:video/mp4;base64,<Base64>data URI
- Note that total request body size must be ≤ 64 MB. Base64 increases size by approximately 33%, so use a public URL or
mm_file://for large videos. - Used only for multimodal reference scenarios; see the
contentdescription above for format / size / duration limits
{
"type": "audio_url",
"audio_url": {
"url": "string"
},
"role": "reference_audio"
}audio_url.url: Audio URL (required). Supported:- Public URL
mm_file://{file_id}data:audio/<format>;base64,<Base64>data URI (<format>must be lowercase)
- Used only for multimodal reference scenarios; see the
contentdescription above for format / size / duration limits
Position or purpose of the content:
first_frame: First-frame image (image-to-video; if only one image is provided androleis omitted, it is treated asfirst_frameby default)last_frame: Last-frame image (image-to-video with first and last frames; must be paired withfirst_frame)reference_image: Reference image (multimodal reference-to-video)reference_video: Reference video (multimodal reference-to-video)reference_audio: Reference audio (multimodal reference-to-video)
resolutionstring(required)
Video resolution. Currently available values: 768P, 2K.
durationinteger(required)
Generated video duration (seconds), required and must be an integer.
Available values: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
ratiostring(optional)
Aspect ratio of the generated video. Defaults to adaptive (automatically selects the most appropriate aspect ratio based on the input; the actual ratio is available from the ratio field in the query API).
Available values: adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16.
Text-to-video (t2va, content contains only text): ratio is required and cannot be adaptive; available values are 21:9, 16:9, 4:3, 1:1, 3:4, 9:16.
Image-to-video (i2va, content contains first_frame / last_frame images): the aspect ratio is determined by the input image, and ratio is always adaptive; passing another valid value does not return an error, but it is ignored and processed as adaptive.
Multimodal reference-to-video (r2va, content contains reference_image / reference_video / reference_audio): ratio is optional and defaults to adaptive; any specific ratio listed above can also be explicitly set.
callback_urlstring(optional)
Callback URL for task status change notifications. Once configured, the server first sends a verification request containing a challenge field (return the challenge unchanged within 3 seconds to complete verification). After verification succeeds, it sends a POST push notification to this URL whenever task status changes. The push body has the same structure as the response from the Query Task API.
Callback status values: queued (queued), running (running), succeeded (succeeded), failed (failed), cancelled (cancelled).
aigc_watermarkboolean(optional)
Whether to add an AIGC watermark to the generated video. Defaults to false.
Responses
200: Task created successfully; returns task_id
Content-Type: application/json
400: Invalid parameters
401: Authentication failed
402: Insufficient balance/quota
422: Input contains sensitive content
429: Rate limit triggered
500: Server error
Request Examples
curl -X POST "https://api.autorouter.top/minimax/v2/video_generation" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxx" \
-d '{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "史诗级太空歌剧院线预告:女舰长独自站在巨大观景窗前,最后一支舰队正在集结并跃迁离去,强光爆闪、舰桥震动,她被留在原地。"
}
],
"resolution": "2K",
"duration": 5,
"ratio": "16:9"
}'Response Examples
{
"task_id": "424010985738629"
}Response field descriptions:
| Name | Type | Description |
|---|---|---|
task_id | string | Task ID used to subsequently query task status and results |
More Scenario Examples
Text-to-video (t2va)
curl -X POST "https://api.autorouter.top/minimax/v2/video_generation" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxx" \
-d '{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "史诗级太空歌剧院线预告:女舰长独自站在巨大观景窗前,最后一支舰队正在集结并跃迁离去,强光爆闪、舰桥震动,她被留在原地。"
}
],
"resolution": "2K",
"duration": 5,
"ratio": "16:9"
}'Image-to-video (i2va)
curl -X POST "https://api.autorouter.top/minimax/v2/video_generation" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxx" \
-d '{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "Pull focus to the people in the background and add more steam to the ramen bowl."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.png"
},
"role": "first_frame"
}
],
"resolution": "2K",
"duration": 5,
"ratio": "adaptive"
}'Multimodal reference-to-video (r2va)
curl -X POST "https://api.autorouter.top/minimax/v2/video_generation" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxx" \
-d '{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "角色说话:Follow the wind, live free.Leave worries behind, enjoy the moment,音色参考音频1"
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/reference.mp4"
},
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/reference.mp3"
},
"role": "reference_audio"
}
],
"resolution": "2K",
"duration": 5,
"ratio": "adaptive"
}'GET /minimax/v2/query/video_generation/{task_id}
Query a task
Query the status and results of a single video generation task from the past 7 days by task_id. After the task succeeds (status=succeeded), retrieve the generated video from content.url.
- Only task records from the past 7 days can be queried (window
[T-7 days, T), whereTis the UTC timestamp in seconds when the request is initiated); atask_idoutside this window returnsinvalid task_id - Video output download links expire; download or save them promptly
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | Task ID to query (the task_id returned when creating the task) |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Authentication information, in the format: Bearer sk-xxxxxx |
Responses
200: Task queried successfully
Content-Type: application/json
400: Invalid parameters
401: Authentication failed
429: Rate limit triggered
500: Server error
Request Examples
curl -X GET "https://api.autorouter.top/minimax/v2/query/video_generation/{task_id}" \
-H "Authorization: Bearer sk-xxxxxx"Response Examples
{
"task": {
"id": "424010985738629",
"model": "MiniMax-H3",
"status": "succeeded",
"created_at": 1785125529,
"updated_at": 1785125946,
"content": {
"url": "https://your-cdn.example.com/h3-generated-2k-output.mp4"
},
"resolution": "2K",
"duration": 5,
"usage": {
"total_seconds": 5,
"input_seconds": 0,
"output_seconds": 5,
"input_image_count": 0
},
"ratio": "16:9",
"task_type": "generation",
"modality": "video"
}
}Response field descriptions:
| Name | Type | Description |
|---|---|---|
task | object | Task object |
task.id | string | Task ID |
task.model | string | Model name used by the task, such as MiniMax-H3 |
task.status | string | Task status; see below |
task.error | object | Error information. Not returned when the task succeeds; returns code and message when the task fails |
task.created_at | integer | Unix timestamp (seconds) when the task was created |
task.updated_at | integer | Unix timestamp (seconds) when the task status was updated |
task.content | object | Task output content, returned after the task succeeds |
task.content.url | string | Expiring download URL for the video output; download or save it promptly. Query again after expiry to obtain a new URL |
task.resolution | string | Resolution of the task output |
task.duration | integer | Duration of the task output (seconds) |
task.usage | object | Billable usage for this request |
task.ratio | string | Aspect ratio of the task output; may return an empty string when not applicable to the current task type |
task.task_type | string | Task type: generation (video generation) |
task.modality | string | Output modality: video generation tasks return video |
statusstring
Task status:
queued: Queuedrunning: Runningsucceeded: Succeededfailed: Failedcancelled: Cancelled
The recommended polling interval is 3–5 seconds, until status is succeeded, failed, or cancelled.
errorobject
Error information. Not returned when the task succeeds; returned when the task fails.
Error code.
Error message.
contentobject
Task output content, returned after the task succeeds.
Expiring download URL for the video output; download or save it promptly. Query again after expiry to obtain a new URL.
usageobject
Billable usage for this request. Video tasks return fields measured in seconds.
Total billable seconds for this request = input seconds + output seconds.
Billable seconds for input reference videos (counted when reference videos are included).
Billable seconds for the output video.
Number of images involved in billing for this request.
Error Handling
HTTP 400 Invalid Parameters
| Scenario | Recommended action |
|---|---|
No non-empty text provided | Add the required prompt |
Image-to-video and multimodal reference roles are mixed in content | The two cannot be mixed; select only one based on the scenario |
No ratio provided for text-to-video, or adaptive is provided | Text-to-video must explicitly specify a concrete aspect ratio |
Invalid duration / resolution | Use the enum values listed in the documentation |
| Media format / size / dimensions exceed limits | Adjust input according to the content media limits |
HTTP 401 / 403 Authentication Errors
401 Unauthorized: The API Key is invalid or expired403 Forbidden: The API Key is not authorized to access this model
HTTP 402 Insufficient Balance
An insufficient balance error is returned. Go to the AutoRouter console to add funds.
HTTP 422 Sensitive Content
The input contains sensitive content. Adjust the prompt or media assets and try again.
Task failed Status
| Cause | Recommended action |
|---|---|
| Content moderation failed | Adjust the prompt to avoid sensitive content |
| Invalid parameter combination | Pass parameters according to the Request Body specification |
When a task fails, AutoRouter automatically refunds your account.
Video Generation
Omni video generation with Kling O1. Combine prompts, images, Elements, and videos in one API. Async task API: submit a request, receive a task ID, then poll for status to get the result.
PixVerse Video Generation
PixVerse is a high-quality AI video generation platform. AutoRouter integrates with PixVerse OpenAPI v2 and exposes it via the OpenAI-compatible /v1/videos endpoint. All 8 PixVerse model versions are supported for text-to-video and image-to-video. PixVerse uses an async task-based API: submit a request, receive a task_id, poll for status, then download the video via the proxy endpoint. ---