Skip to content

Kling-2.6 motion-control ​

接口 ​

POST /videos/generations

完整 URL: https://modelfold.ai/v1/videos/generations

鉴权:所有请求都需要 Authorization: Bearer <API_KEY> 请求头。

模型参数直接放在 JSON 请求体中,不要套 input。请求等待生成完成后返回 data[].url;支持的媒体模型也可使用 异步创建、轮询及回调。示例素材地址须替换为自己的公开可访问文件。计费及错误说明见 API 网关。

生成任务的输入参数

请求参数 ​

请求体 (application/json) ​

参数类型必填说明
modelstring是用于生成任务的模型名称。必填字段。
- 此端点必须为 kling-2.6/motion-control 默认值:"kling-2.6/motion-control"。 可选值:kling-2.6/motion-control。 示例:kling-2.6/motion-control。
promptstring是本站网关要求传入 prompt,最长 2000 字。所需输出的文本描述。最大长度为 2500 个字符。(最大长度:2500 个字符) maxLength: 2000. 示例:卡通角色在跳舞。。
input_urlsarray&lt;string&gt;是包含单个图像 URL 的数组。照片必须清楚显示对象的头部、肩膀和躯干。(上传后的文件 URL,不是文件内容;接受的类型:image/jpeg, image/png, image/jpg;最大大小:10.0MB,尺寸需要大于 300px, 宽高比 1:2.5 to 2.5:1.) maxItems: 1.
video_urlsarray&lt;string&gt;是包含单个视频 URL 的数组。持续时间必须在 3 到 30 秒之间,视频必须清楚显示对象的头部、肩膀和躯干。(上传后的文件 URL,不是文件内容;接受的类型:video/mp4, video/quicktime;最大大小:100.0MB) maxItems: 1.
character_orientationstring是必填。生成视频中角色的方向。'image': 与图片中的人相同(最大 10 秒视频)。'video': 与视频中的人相同(最大 30 秒视频)。 可选值:image / video。 示例:video。
modestring是必填。输出分辨率模式。使用 '720p' 表示 720p 或 '1080p' 表示 1080p。 可选值:720p / 1080p。 示例:720p。

请求示例 ​

bash
curl -X POST "https://modelfold.ai/v1/videos/generations" \
  -H "Authorization: Bearer $MODELFOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kling-2.6/motion-control",
  "input_urls": [
    "https://example.com/reference.png"
  ],
  "video_urls": [
    "https://example.com/reference.mp4"
  ],
  "character_orientation": "video",
  "mode": "720p",
  "prompt": "卡通角色在跳舞。"
}'
json
{
  "model": "kling-2.6/motion-control",
  "input_urls": [
    "https://example.com/reference.png"
  ],
  "video_urls": [
    "https://example.com/reference.mp4"
  ],
  "character_orientation": "video",
  "mode": "720p",
  "prompt": "卡通角色在跳舞。"
}

响应 ​

200 — 生成完成。usage 返回实际计费明细;结果地址仅作结构示例。 ​

json
{
  "ok": true,
  "created": 1792134000,
  "data": [
    {
      "url": "https://modelfold.ai/uploads/outputs/result.mp4"
    }
  ],
  "usage": {}
}

ModelFold — 一个 API,接入所有主流 AI 模型。