MiniMax-H3 创建 H3-Context-IR 任务
深度理解多模态上下文并生成结构化、语义更丰富的视频提示词。该接口只返回增强后的视频提示词,不会创建视频生成任务。
接口地址
http
POST /minimax/v2/h3_context_ir请求头
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
Content-Type | string | 是 | application/json | 请求体媒介类型 |
Authorization | string | 是 | - | 鉴权信息,格式为 Bearer <API_KEY> |
请求体
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 固定为 MiniMax/MiniMax-H3-Context-IR |
content | object[] | 是 | 多模态上下文输入数组 |
duration | integer | 是 | 目标视频时长(秒),取值 4~15 的整数 |
ratio | string | 条件必填 | 目标视频宽高比,规则同创建视频生成任务 |
callback_url | string | 否 | 任务状态变更回调通知地址 |
content数组元素的类型、role、输入组合及媒体限制与 创建视频生成任务 完全一致,此处不再赘述。输入素材可先通过 文件上传接口 上传,再以
mm_file://{file_id}形式引用。
使用流程
- 创建任务:POST 到
/v2/h3_context_ir,获取task_id - 查询结果:使用
task_id调用 查询任务 接口 - 获取增强提示词:任务成功后从
content.prompt字段提取 - (可选)集成到视频生成工作流:将增强提示词用于后续视频生成
请求示例
bash
# 文生视频(t2va)
curl --request POST \
--url https://neolink.com/api/minimax/v2/h3_context_ir \
--header 'Authorization: Bearer <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax/MiniMax-H3-Context-IR",
"content": [
{
"type": "text",
"text": "史诗级太空歌剧院线预告:女舰长独自站在巨大观景窗前,最后一支舰队正在集结并跃迁离去,强光爆闪、舰桥震动,她被留在原地。"
}
],
"duration": 5,
"ratio": "16:9"
}'
# 图生视频(i2va)
curl --request POST \
--url https://neolink.com/api/minimax/v2/h3_context_ir \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax/MiniMax-H3-Context-IR",
"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"
}
'
# 多模态参考生视频(r2va)
curl --request POST \
--url https://neolink.com/api/minimax/v2/h3_context_ir \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax/MiniMax-H3-Context-IR",
"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"
}
'成功响应(HTTP 200)
json
{
"task_id": "424010985738629"
}| 字段 | 类型 | 说明 |
|---|---|---|
task_id | string | 任务 ID,用于后续查询任务状态与结果 |
查询任务响应示例
json
{
"task": {
"id": "426586401755526",
"model": "MiniMax-H3",
"status": "succeeded",
"created_at": 1785702855,
"updated_at": 1785702884,
"content": {
"prompt": "integrated_multimodal_description: [Shot 1] Cinematic, wide shot ..."
},
"duration": 5,
"usage": {
"total_tokens": 9090,
"prompt_tokens": 5664,
"completion_tokens": 3426
},
"ratio": "16:9",
"task_type": "h3_context_ir",
"modality": "text"
}
}| 字段 | 说明 |
|---|---|
task.content.prompt | 增强后的视频提示词(核心输出) |
task.task_type | 固定为 h3_context_ir |
task.modality | 固定为 text |
错误响应
| HTTP 状态码 | 错误类型 | 错误码 | 说明 |
|---|---|---|---|
| 400 | bad_request_error | 2013 | 参数无效,content 必须包含非空 text 项 |
| 401 | authorized_error | 1004 | 认证失败 |
| 402 | insufficient_balance_error | 1008 | 余额不足 |
| 422 | unprocessable_entity_error | 1026 | 视频描述包含敏感内容 |
| 429 | rate_limit_error | 1002 | 速率限制,请稍后重试 |
| 500 | server_error | 1000 | 内部错误 |
