MiniMax Video Generation
Use `POST /v1/videos` to call MiniMax-H3 and submit asynchronous video tasks.
https://zx1.deepwl.net/v1/videoscurl --location --request POST 'https://zx1.deepwl.net/v1/videos' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea",
"duration": 5,
"size": "2K",
"metadata": {
"ratio": "16:9"
}
}'{
"id": "task_a1b2c3d4e5f6",
"task_id": "task_a1b2c3d4e5f6",
"object": "video",
"model": "MiniMax-H3",
"status": "queued",
"progress": 0,
"created_at": 1785125529
}OpenAI-format entry point, with JSON submission as the primary method. If you need to use the unified video POST /v1/video/create, please see Create Video.
- Currently only supports the
MiniMax-H3model. - Asynchronous interface that returns a task ID; poll the result via MiniMax Task Query.
- Total request body size must not exceed 64 MB. For large files, use a public URL instead of Base64.
Three generation scenarios, determined automatically from the request parameters
| Scenario | Parameters | Aspect Ratio |
|---|---|---|
| Text-to-video | prompt only | Default 16:9, cannot be adaptive |
| Image-to-video | image or images | Forced adaptive |
| Multi-modal reference video | metadata.reference_video / reference_audio | Default adaptive |
Image-to-video and multi-modal reference video are mutually exclusive and cannot be mixed.
Request Headers
Authorizationstring必填Authentication header. Uses a Bearer token, e.g. Bearer YOUR_API_KEY.
Content-Typestring必填Request content type, must be application/json.
Request Body
modelstring必填Model name. Currently only supports MiniMax-H3.
promptstring必填Prompt. All generation scenarios require a non-empty prompt, up to 7000 characters per request.
durationintegerVideo duration in seconds. Range 4–15, default 5; out-of-range values are automatically clamped by the gateway to the boundary without an error.
sizestringVideo resolution. Options: 768P, 2K, default 2K; case-insensitive, unrecognized values fall back to 2K.
imagestringA single input image used as the first frame. Mutually exclusive with images; when both are passed, image takes precedence.
- Supports public URLs,
mm_file://{file_id}, anddata:image/<format>;base64,<Base64>. - Formats JPG/JPEG/PNG/WEBP/HEIC/HEIF, single file up to 30 MB, width/height [256, 5760] px, aspect ratio [0.4, 2.5].
imagesarrayMultiple input images; roles are assigned automatically by count.
- 1 image: first frame.
- 2 images: first frame + last frame.
- 3 or more: all used as reference images (multi-modal reference scenario, up to 9 reference images).
metadataobjectExtended configuration.
ratiostringAspect ratio. Options: adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16.
- Text-to-video: default
16:9, cannot beadaptive. - Image-to-video (including first/last frame): forced
adaptive, other values are ignored. - Multi-modal reference video: default
adaptive.
reference_videostringReference video URL (multi-modal reference scenario). Formats MP4/MOV, codecs H.264/H.265, single file up to 50 MB, duration 2–15 seconds.
reference_videosarrayMultiple reference video URLs, up to 3, total duration up to 15 seconds. Mutually exclusive with reference_video; when both are passed, this field takes precedence.
reference_audiostringReference audio URL (multi-modal reference scenario). Formats WAV/MP3, single file up to 15 MB, duration 2–15 seconds; audio input is free.
reference_audiosarrayMultiple reference audio URLs, up to 3, total duration up to 15 seconds. Mutually exclusive with reference_audio; when both are passed, this field takes precedence.
aigc_watermarkbooleanWhether to add an AIGC watermark to the generated video, default false.
Request Examples
Response Example
Response Fields
idstringTask ID for subsequent queries. Gateway public ID, does not expose the upstream identifier.
task_idstringTask ID (legacy compatibility field, to be deprecated; same value as id). Use id for new integrations.
objectstringAlways video.
modelstringThe model used by the task.
statusstringTask status: queued / in_progress / completed / failed.
progressintegerTask progress percentage, 0–100.
created_atintegerTask creation time (Unix timestamp, seconds).
Error Codes
| Status Code | Description |
|---|---|
| 400 | Invalid parameters, e.g. missing prompt |
| 401 | Authentication failed: missing, invalid, or expired token |
| 402 | Insufficient quota |
| 422 | Input contains sensitive content |
| 429 | Rate limited, please retry later |
| 500 | Internal server error |