{
"task_id": "424010985738629"
}{
"type": "error",
"error": {
"type": "bad_request_error",
"message": "invalid params, content must include a non-empty text item (prompt is required) (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"
}创建视频生成任务
视频生成 V2 接口,通过多模态 content 数组输入(文本 / 图片 / 视频 / 音频),可通过 model 字段切换 MiniMax H3 与 MiniMax H3 Max,覆盖文生视频、图生视频(首尾帧)、多模态参考生视频,最高 2K 输出。
提示:若需要使用 MiniMax H3 或 MiniMax H3 Max,请点击 按量购买 API。
{
"task_id": "424010985738629"
}{
"type": "error",
"error": {
"type": "bad_request_error",
"message": "invalid params, content must include a non-empty text item (prompt is required) (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"
}授权
请求头
请求体的媒介类型,请设置为 application/json。
application/json 请求体
模型名称。当前可用值:MiniMax-H3、MiniMax-H3-Max。
MiniMax-H3:支持文生视频、图生视频(首帧 / 尾帧)与多模态参考生视频;分辨率768P/2K,时长 4~15 秒。MiniMax-H3-Max:极速生成版本。仅支持文生视频与图生视频(首帧 / 尾帧),不支持多模态参考(参考图 / 参考视频 / 参考音频);分辨率480P/768P,不支持2K;时长 5~15 秒。
MiniMax-H3, MiniMax-H3-Max 多模态输入内容数组,描述用于生成视频的信息。每个元素通过 type 区分类型(text / image_url / video_url / audio_url),并可通过 role 标注用途。
每次请求必须包含一个非空 text 项(prompt 必填);缺失会返回参数错误。
支持的输入组合(对应不同生成场景):
- 文生视频:仅一个
text元素。 - 图生视频-首帧:
text+ 1 张image_url(role=first_frame或不填)。 - 图生视频-尾帧:
text+ 1 张image_url(role=last_frame)。 - 图生视频-首尾帧:
text+ 2 张image_url(role分别为first_frame、last_frame)。 - 多模态参考生视频:
text+ 参考图片(role=reference_image)+ 参考视频(role=reference_video)+ 参考音频(role=reference_audio)的组合。
图生视频与多模态参考生视频互斥:content 中出现
reference_image/reference_video/reference_audio任一 role,就不能再出现first_frame/last_frame(反之亦然),二者不可混用。
输入媒体限制(请求体总大小 ≤ 64 MB,大文件请用公网 URL,勿用 Base64)
图片 image_url:
| 项 | 限制 |
|---|---|
| 格式 | JPG、JPEG、PNG、WEBP、HEIC、HEIF |
| 单文件大小 | ≤ 30 MB |
| 宽高范围 | [256, 5760] px |
| 长宽比(宽/高) | [0.4, 2.5] |
| 数量 | 首帧 ≤ 1、尾帧 ≤ 1、参考图 ≤ 9 |
视频 video_url(仅多模态参考场景):
| 项 | 限制 |
|---|---|
| 容器 / 格式 | MP4(.mp4)、MOV(.mov) |
| 编码 | 视频 H.264/AVC、H.265/HEVC;音频 AAC、MP3 |
| 单文件大小 | ≤ 50 MB |
| 个数 | ≤ 3 |
| 单段时长 | [2, 15] s;总时长 ≤ 15 s |
| 宽高范围 | [256, 5760] px |
| 长宽比(宽/高) | [0.4, 2.5] |
| 帧率 | [23.976, 60] |
音频 audio_url(仅多模态参考场景):
| 项 | 限制 |
|---|---|
| 格式 | WAV、MP3 |
| 单文件大小 | ≤ 15 MB |
| 个数 | ≤ 3 |
| 单段时长 | [2, 15] s;总时长 ≤ 15 s |
Show child attributes
Show child attributes
视频分辨率。不同模型支持的档位不同:
MiniMax-H3:768P、2KMiniMax-H3-Max:480P、768P(默认768P,不支持2K)
480P, 768P, 2K 生成视频时长(秒),必选,整数。不同模型可用值不同:
MiniMax-H3:4~15MiniMax-H3-Max:5~15(不支持 4 秒)
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 生成视频的宽高比,默认 adaptive(自动,由输入自适应选择最合适的宽高比,实际比例可在查询接口的 ratio 字段获取)。可用值:adaptive、21:9、16:9、4:3、1:1、3:4、9:16。
文生视频(t2va,content 仅含 text):ratio 必填,且不能为 adaptive;可用值 21:9、16:9、4:3、1:1、3:4、9:16。
图生视频(i2va,content 含 first_frame / last_frame 图片):宽高比由输入图片决定,ratio 恒为 adaptive;传入其他合理值不会报错,但会被忽略并按 adaptive 处理。
多模态参考生视频(r2va,content 含 reference_image / reference_video / reference_audio):ratio 可选,默认 adaptive;也可显式指定上述任一具体比例。
adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 是否在生成视频中添加 AIGC 标识水印,默认 false。
响应
创建成功后返回 task_id。使用该 task_id 调用查询任务接口获取任务状态与结果。
查询任务成功响应示例
{ "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" } }
任务 ID,用于后续查询任务状态与结果。
此页面对您有帮助吗?