curl --request POST \
--url https://api.minimax.io/v2/video_generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "Epic space-opera theatrical teaser: a female captain stands alone before a massive observation window as the last fleet gathers and jumps away in a blinding flash, the bridge shaking, leaving her behind."
}
],
"resolution": "2K",
"duration": 5,
"ratio": "16:9"
}
'{
"task_id": "424010985738629"
}{
"type": "error",
"error": {
"type": "bad_request_error",
"message": "invalid params (2013)",
"http_code": "400"
},
"request_id": "021785229015510a2c883cf675b9804d"
}{
"type": "error",
"error": {
"type": "authorized_error",
"message": "login fail: Please carry the API secret key in the 'Authorization' field of the request header (1004)",
"http_code": "401"
},
"request_id": "021785229015510a2c883cf675b9804d"
}{
"type": "error",
"error": {
"type": "insufficient_balance_error",
"message": "insufficient balance (1008)",
"http_code": "402"
},
"request_id": "021785229015510a2c883cf675b9804d"
}{
"type": "error",
"error": {
"type": "unprocessable_entity_error",
"message": "video description contains sensitive content (1026)",
"http_code": "422"
},
"request_id": "021785229015510a2c883cf675b9804d"
}{
"type": "error",
"error": {
"type": "rate_limit_error",
"message": "rate limit, please retry later (1002)",
"http_code": "429"
},
"request_id": "021785229015510a2c883cf675b9804d"
}{
"type": "error",
"error": {
"type": "server_error",
"message": "internal error (1000)",
"http_code": "500"
},
"request_id": "021785229015510a2c883cf675b9804d"
}Create Video Generation Task
Video generation V2 endpoint. Provide multimodal input via the content array (text / image / video / audio) to support text-to-video, image-to-video (first & last frame), and reference-to-video, with 2K output.
curl --request POST \
--url https://api.minimax.io/v2/video_generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "Epic space-opera theatrical teaser: a female captain stands alone before a massive observation window as the last fleet gathers and jumps away in a blinding flash, the bridge shaking, leaving her behind."
}
],
"resolution": "2K",
"duration": 5,
"ratio": "16:9"
}
'{
"task_id": "424010985738629"
}{
"type": "error",
"error": {
"type": "bad_request_error",
"message": "invalid params (2013)",
"http_code": "400"
},
"request_id": "021785229015510a2c883cf675b9804d"
}{
"type": "error",
"error": {
"type": "authorized_error",
"message": "login fail: Please carry the API secret key in the 'Authorization' field of the request header (1004)",
"http_code": "401"
},
"request_id": "021785229015510a2c883cf675b9804d"
}{
"type": "error",
"error": {
"type": "insufficient_balance_error",
"message": "insufficient balance (1008)",
"http_code": "402"
},
"request_id": "021785229015510a2c883cf675b9804d"
}{
"type": "error",
"error": {
"type": "unprocessable_entity_error",
"message": "video description contains sensitive content (1026)",
"http_code": "422"
},
"request_id": "021785229015510a2c883cf675b9804d"
}{
"type": "error",
"error": {
"type": "rate_limit_error",
"message": "rate limit, please retry later (1002)",
"http_code": "429"
},
"request_id": "021785229015510a2c883cf675b9804d"
}{
"type": "error",
"error": {
"type": "server_error",
"message": "internal error (1000)",
"http_code": "500"
},
"request_id": "021785229015510a2c883cf675b9804d"
}Authorizations
HTTP: Bearer Auth
- Security Scheme Type: http
- HTTP Authorization Scheme:
Bearer API_key, used to verify account information, can be found in Account Management>API Keys.
Headers
Media type of the request body. Set it to application/json.
application/json Body
Model name. Currently available: MiniMax-H3.
MiniMax-H3 Array of multimodal input describing the information used to generate the video. Each element is distinguished by type (text / image_url / video_url / audio_url) and can be labeled with a role.
Every request must include one non-empty text item (the prompt is required); otherwise a parameter error is returned.
Supported input combinations (corresponding to different generation scenarios):
- Text-to-video: a single
textelement only. - Image-to-video, first frame:
text+ 1image_url(role=first_frame, or omitted). - Image-to-video, last frame:
text+ 1image_url(role=last_frame). - Image-to-video, first & last frame:
text+ 2image_urlitems withroleset tofirst_frameandlast_framerespectively. - Reference-to-video:
text+ any combination of reference images (role=reference_image), reference videos (role=reference_video), and reference audio (role=reference_audio); audio alone is not allowed, at least one reference video or image is required.
Image-to-video and reference-to-video are mutually exclusive: if any
reference_image/reference_video/reference_audiorole appears in content, thenfirst_frame/last_framemust not appear (and vice versa); the two cannot be mixed.
Input media limits (total request body ≤ 64 MB; use public URLs for large files, avoid Base64)
Image image_url:
| Item | Limit |
|---|---|
| Format | JPG, JPEG, PNG, WEBP, HEIC, HEIF |
| Single file size | ≤ 30 MB |
| Width/height range | [256, 5760] px |
| Aspect ratio (w/h) | [0.4, 2.5] |
| Count | first frame ≤ 1, last frame ≤ 1, reference images ≤ 9 |
Video video_url (reference scenario only):
| Item | Limit |
|---|---|
| Container / format | MP4 (.mp4), MOV (.mov) |
| Codec | Video H.264/AVC, H.265/HEVC; audio AAC, MP3 |
| Single file size | ≤ 50 MB |
| Count | ≤ 3 |
| Per-clip duration | [2, 15] s; total ≤ 15 s |
| Width/height range | [256, 5760] px |
| Aspect ratio (w/h) | [0.4, 2.5] |
| Frame rate | [23.976, 60] |
Audio audio_url (reference scenario only):
| Item | Limit |
|---|---|
| Format | WAV, MP3 |
| Single file size | ≤ 15 MB |
| Count | ≤ 3 |
| Per-clip duration | [2, 15] s; total ≤ 15 s |
Show child attributes
Show child attributes
Video resolution. Currently available: 2K.
2K Duration of the generated video in seconds. Required, integer. Available values: 4-15.
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 Aspect ratio of the generated video. Defaults to adaptive (the most suitable ratio is chosen automatically based on the input; the actual ratio can be read from the ratio field of the query endpoint). 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 21:9, 16:9, 4:3, 1:1, 3:4, 9:16.
Image-to-video (i2va, content contains a first_frame / last_frame image): the aspect ratio is determined by the input image and ratio is always adaptive; passing another valid value does not error but is ignored and treated as adaptive.
Reference-to-video (r2va, content contains reference_image / reference_video / reference_audio): ratio is optional and defaults to adaptive; you may also explicitly specify any of the concrete ratios above.
adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 Callback URL for task status changes. Once configured, the MiniMax server first sends a verification request containing a challenge field (you must return the challenge unchanged within 3 seconds to complete verification); after verification succeeds, it POSTs an update to this URL whenever the task status changes. The push body has the same structure as the response of the Query video generation task endpoint.
Callback status values: queued, running, succeeded, failed, expired.
Whether to add an AIGC watermark to the generated video. Defaults to false.
Response
ID of the video generation task, used to query the task status later.