PopNowAPI 文档
正文

MiniMax H3 Character Swap API 调用参考

按角色图替换视频里的一个人,保留原来的表演

用一个 PopNow API 密钥,就能在自己的代码里调用 MiniMax H3 Character Swap。下面列出要填的调用名、这个型号接受的每个输入字段、每次请求花多少美元(USD),以及一段可以直接粘进终端运行的请求。

参数说明直接取自型号的输入 schema,暂时只有英文。

一览

出品方
MiniMax
产出
视频
起价
$0.06 USD 每秒成片
一般耗时
约 116 秒

价格以 USD 显示,从你的 PopNow 余额扣款。任务受理时预留可能的最高费用,完成后按实际用量结算并释放余款;失败任务不收费。运行前可调用 POST /api/v1/jobs/quote 获取准确报价。

视频换脸

minimax/h3-character-swap/video-edit

价格

选项USD
480p$0.06 每秒成片
540p$0.09 每秒成片
768p$0.12 每秒成片
1080p$0.24 每秒成片

参数

字段类型默认值取值范围作用
video_url必填string (uri)——Source clip whose performance is kept. Up to 15 seconds are used; one continuous shot works best.
image_url必填string (uri)——One image of the new character: a photo, a 3D render or a drawing. Full body works best.
prompt可选string—最多 7000 个字符Full character-swap instruction passed through verbatim to the model (use <Video 1> for the source clip and <Picture 1> for the character image). Leave empty to use the default main-person replacement template.
aspect_ratio可选string16:916:9, 9:16, 1:1, 4:3, 3:4, 21:9, 9:21Output aspect ratio; match your source clip.
resolution可选string480p480p, 540p, 768p, 1080pOutput resolution.
duration_seconds可选integer53 到 15Output length in whole seconds, from 3 to 15; match your source clip.
seed可选integer—0 到 2147483647Random seed for controlled comparisons, not a frame-identical guarantee.

请求示例

这段请求原样就能运行,没写的字段都用默认值。运行前先把密钥放进环境变量 POPNOW_API_KEY。

示例里的 image_url, video_url 用的是 PopNow 的示例素材,换成你自己的公开 HTTPS 链接、上传文件或已保存的素材即可。

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "minimax/h3-character-swap/video-edit",
  "input": {
    "prompt": "Replace the main person in <Video 1> with the character in <Picture 1>. Keep the reference character'\''s face, hair and clothing. Follow the source performance'\''s pose, gaze, expression and movement. Preserve the scene and the other people.",
    "video_url": "https://media.popnow.ai/effects/flower-bloom-1abd6efb.mp4",
    "image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
    "duration_seconds": 5,
    "resolution": "480p"
  }
}'

响应里会立刻带回 taskId。之后用 GET /api/v1/jobs/recordInfo 取结果,或者在请求里加上 callBackUrl 等通知。

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

接下来

本页内容