Skip to content

MiniMax-H3 创建 H3-Context-IR 任务 ​

深度理解多模态上下文并生成结构化、语义更丰富的视频提示词。该接口只返回增强后的视频提示词,不会创建视频生成任务。

接口地址 ​

http
POST /minimax/v2/h3_context_ir

请求头 ​

参数名类型必填默认值说明
Content-Typestring是application/json请求体媒介类型
Authorizationstring是-鉴权信息,格式为 Bearer <API_KEY>

请求体 ​

参数名类型必填说明
modelstring是固定为 MiniMax/MiniMax-H3-Context-IR
contentobject[]是多模态上下文输入数组
durationinteger是目标视频时长(秒),取值 4~15 的整数
ratiostring条件必填目标视频宽高比,规则同创建视频生成任务
callback_urlstring否任务状态变更回调通知地址

content 数组元素的类型、role、输入组合及媒体限制与 创建视频生成任务 完全一致,此处不再赘述。

输入素材可先通过 文件上传接口 上传,再以 mm_file://{file_id} 形式引用。

使用流程 ​

  1. 创建任务:POST 到 /v2/h3_context_ir,获取 task_id
  2. 查询结果:使用 task_id 调用 查询任务 接口
  3. 获取增强提示词:任务成功后从 content.prompt 字段提取
  4. (可选)集成到视频生成工作流:将增强提示词用于后续视频生成

请求示例 ​

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_idstring任务 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 状态码错误类型错误码说明
400bad_request_error2013参数无效,content 必须包含非空 text 项
401authorized_error1004认证失败
402insufficient_balance_error1008余额不足
422unprocessable_entity_error1026视频描述包含敏感内容
429rate_limit_error1002速率限制,请稍后重试
500server_error1000内部错误