接口地址: POST https://gw.hbapis.com/minimax/v2/h3_context_ir
Bearer Token
在 Header 添加参数 Authorization。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
Authorization | string | 是 | Bearer <token> |
Content-Type | string | 否 | application/json |
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | enum | 必填 | 模型名称。当前可用值: MiniMax-H3 。 |
content | object[] | 必填 | 多模态上下文输入数组,用于描述目标视频及各类素材之间的关系。每个元素通过 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 |
content[].type | str | 是 | 请求参数 |
content[].text | str | 是 | 请求参数 |
duration | enum | 必填 | 目标视频时长(秒),必选,整数。可用值: 4 ~ 15 。 |
ratio | enum | 否 | 目标视频的宽高比,默认 adaptive 。可用值: 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 ;也可显式指定上述任一具体比例。 |
{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "史诗级太空歌剧院线预告:女舰长独自站在巨大观景窗前,最后一支舰队正在集结并跃迁离去,强光爆闪、舰桥震动,她被留在原地。"
}
],
"duration": 5,
"ratio": "16:9"
}
curl --request POST \
--url 'https://gw.hbapis.com/minimax/v2/h3_context_ir' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "史诗级太空歌剧院线预告:女舰长独自站在巨大观景窗前,最后一支舰队正在集结并跃迁离去,强光爆闪、舰桥震动,她被留在原地。"
}
],
"duration": 5,
"ratio": "16:9"
}
'
curl --request POST \
--url 'https://gw.hbapis.com/minimax/v2/h3_context_ir' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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://cdn.hailuoai.com/prod/hailuo_demo/testsets/H3_AA_I2VA/gallery/sr_v17_variants_seed42_43_20260724/inputs/4a3a90bf9100_KDmcbkhzYo5sjjxr9FqcVmWVnzb.png"
},
"role": "first_frame"
}
],
"duration": 5,
"ratio": "adaptive"
}
'
curl --request POST \
--url 'https://gw.hbapis.com/minimax/v2/h3_context_ir' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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://cdn.hailuoai.com/prod/hailuo_demo/testsets/h3_promo_eval_ref2va/gallery/sr_v2p26_trio_seed42_20260724/inputs/297573323635_00_%E8%A7%86%E9%A2%911_YnyRbxEwio_video_20260525_163755_1927e9d3.mp4"
},
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://cdn.hailuoai.com/prod/hailuo_demo/testsets/h3_promo_eval_ref2va/gallery/sr_v2p26_trio_seed42_20260724/inputs/f463d523c5ce_01_%E9%9F%B3%E9%A2%911_RSLcbpzJPo_6%E6%9C%885%E6%97%A5(1).mp3"
},
"role": "reference_audio"
}
],
"duration": 5,
"ratio": "adaptive"
}
'
{
"task_id": "424010985738629"
}
来源: https://platform.minimaxi.com/docs/api-reference/video-generation-v2-h3-context-ir