APIMaster.ai

Kling v3 Motion Control 视频生成 API

使用 APIMaster.ai 调用 kling-v3-motion-control 动作控制视频生成。参考图 + 参考视频,按秒计费。

Kling v3 Motion Control 视频生成

通过 APIMaster 调用 Kling 动作控制模型 kling-v3-motion-control:上传参考图片与参考视频,让生成结果跟随参考视频中的动作,可选提示词补充镜头与风格。

Base URLhttps://apimaster.ai/v1https://apimaster.ai/v1。路径写 https://apimaster.ai/v1/videos/...不要再拼一层 /v1

价格(按秒计费)

计费时长由服务端探测 video_url 的真实时长决定(非客户端估算)。预扣费按 mode 与参考视频时长上限估算。

模式 单价
std(标准) $0.10288 / 秒
pro(高质量) $0.13712 / 秒

示例:std 模式、参考视频 8 秒$0.82304($0.10288 × 8)。

提交任务

POST https://apimaster.ai/v1/videos/generations

字段 类型 必填 说明
model string 固定 kling-v3-motion-control
image_url string 参考图片公网 URL
video_url string 参考视频公网直链(建议 mp4/mov,≤100MB)
character_orientation string image(参考图朝向,视频 3–10s)或 video(参考视频朝向,3–30s)
mode string stdpro
prompt string 补充动作、镜头、风格
keep_original_sound string yes(默认)/ no
watermark_info object {"enabled": false}
duration integer 可选,用于预扣费估算秒数;实际结算以服务端探测为准
curl -s "https://apimaster.ai/v1/videos/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-v3-motion-control",
    "prompt": "保持人物面部特征一致,按参考视频完成转身挥手动作,电影感光影",
    "image_url": "https://example.com/ref-image.png",
    "video_url": "https://example.com/ref-video-8s.mp4",
    "keep_original_sound": "yes",
    "character_orientation": "image",
    "mode": "std",
    "watermark_info": {"enabled": false}
  }'

提交响应

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_xxxxxxxx"
    }
  ]
}

参考视频时长规则

character_orientation 允许的参考视频时长
image 3s ~ 10s
video 3s ~ 30s

查询任务

GET https://apimaster.ai/v1/videos/{task_id}

curl -s "https://apimaster.ai/v1/videos/task_xxxxxxxx" \
  -H "Authorization: Bearer YOUR_API_KEY"

完成示例:

{
  "id": "task_xxxxxxxx",
  "status": "completed",
  "url": "https://..."
}

若返回 url 为 APIMaster 代理地址,也可使用 GET https://apimaster.ai/v1/videos/{task_id}/content 下载 MP4。

使用场景示例

image 朝向(10 秒内)

{
  "model": "kling-v3-motion-control",
  "prompt": "保持人物朝向与参考图一致,完成转身和挥手动作",
  "image_url": "https://example.com/ref-image.png",
  "video_url": "https://example.com/ref-video-8s.mp4",
  "character_orientation": "image",
  "mode": "std",
  "keep_original_sound": "yes"
}

video 朝向 + pro 模式

{
  "model": "kling-v3-motion-control",
  "prompt": "跟随参考视频的人物朝向和节奏,保持动作连贯",
  "image_url": "https://example.com/ref-image.png",
  "video_url": "https://example.com/ref-video-12s.mp4",
  "character_orientation": "video",
  "mode": "pro",
  "keep_original_sound": "no"
}

错误码

HTTP 说明
400 参数无效(缺少 image_url / video_url、朝向或模式错误等)
401 API Key 无效
402 余额不足
429 请求过于频繁