Skip to main content
POST
使用此端点可根据角色图像和一段 参考视频创建 Motion Control 任务。
本页介绍兼容的 Motion Control 路由。Kling Video 3.0 Motion Control 使用独立的 API 合约。

所需媒体

image_url 接受公共 URL 或原始 Base64 字符串。
  • 使用不超过 10 MB 的 JPG、JPEG 或 PNG 图像。
  • 将每个图像维度设为 300 至 65,536 像素。
  • 使用 1:2.5 至 2.5:1 的宽高比。
  • 将 Base64 作为原始编码字符串发送,不要添加 data:image/...;base64, 前缀。
  • 展示一名无遮挡的角色,身体取景应与动作 参考相匹配。
video_url 接受公共 MP4 或 MOV URL。
  • 使用不超过 100 MB 的视频。
  • 将短边设为至少 340 像素。
  • 将长边设为不超过 3850 像素。
  • 使用仅有一名可见角色的连续镜头。
  • 避免剪辑、镜头变化和过快的动作。
请遵守时长限制,并检查嵌套的终态 task_status。外层 HTTP 200 或响应 code: 0 确认的是查询响应,而不是 成功的生成结果。

设置 orientation 值

character_orientation 为必填项,且接受 imagevideo 如果使用 element_list,则将 character_orientation 设为 video

选择模型和模式

兼容路由接受 kling-v2-6kling-v3。这两个模型值 均接受以下两种模式值: 如省略 model_name,请求将使用 kling-v2-6。如省略 mode, 请求将使用 stdkling-v3 值会保持兼容请求结构 如本页所述;它不会选择独立的 Kling 3.0 路径版本 合约。 兼容合约不保证固定的输出分辨率。如果应用需要特定尺寸,请检查 每个返回的视频。 keep_original_sound 接受 yesno。如果省略此字段,请求 将使用 yes

任务流程

1

提交 Motion Control 请求

发送源图像、参考视频和 orientation 值。选择一个 模型、模式和声音值,或使用其文档中指定的默认值。存储返回的 task_id
2

轮询任务

使用 获取 Kling 任务 ,并传入返回的 task_id。 持续查询,直至状态为 succeedfailed
3

存储结果

及时下载并存储结果。Kling 的兼容 API 文档指出,生成的视频会在 30 天后清除。请勿 依赖返回的 URL 在整整 30 天内始终可访问。

可选字段

回调结构

旧版回调架构具有以下结构:
回调状态可以是 submittedprocessingsucceedfailed。 终态结果字段仅会在返回终态时出现。

结果字段

任务状态为 submittedprocessingsucceedfailed
请参阅 Kling Motion Control API 参考Kling 回调协议 ,了解 API 详细信息。

授权

Authorization
string
header
必填

Bearer authentication. Use your CometAPI API key.

请求体

application/json
image_url
string
必填

Character image as a public URL or a raw Base64 string. Send raw Base64 without a data:image/...;base64, prefix; data-URI input is outside the compatible contract. Supported formats are JPG, JPEG, and PNG. The image must be 10 MB or smaller. Its width and height must each be from 300 through 65,536 pixels, and its aspect ratio must be between 1:2.5 and 2.5:1.

video_url
string<uri>
必填

Public reference motion video URL. Use an MP4 or MOV file that is 100 MB or smaller. The short edge must be at least 340 pixels, and the long edge must not exceed 3850 pixels. The video must be at least 3 seconds long. The maximum duration depends on character_orientation.

character_orientation
enum<string>
必填

Required compatible string enum. With image, the reference video can be 3 to 10 seconds long. With video, the reference video can be 3 to 30 seconds long.

可用选项:
image,
video
model_name
enum<string>
默认值:kling-v2-6

Model ID for this compatible Motion Control request. Omit this field to use kling-v2-6. The kling-v3 value keeps this compatible request shape; it does not select the separate Kling 3.0 path-version contract.

可用选项:
kling-v2-6,
kling-v3
prompt
string

Optional text field in the compatible request structure. Maximum 2500 characters.

Maximum string length: 2500
keep_original_sound
enum<string>
默认值:yes

Compatible string enum. Accepted values are yes and no. Omitted requests use yes.

可用选项:
yes,
no
mode
enum<string>
默认值:std

Both compatible models accept std and pro. Omitted requests use std.

可用选项:
std,
pro
callback_url

Optional callback field in the compatible structure. Provide a URI, or omit the field or send an empty string when no callback URI is configured.

external_task_id
string

Optional ID for correlation in your application. The value must be unique for your account. Store the returned task_id for CometAPI status queries.

element_list
object[]

Optional compatible Element structure. Provide at most one object, and combine this field only with character_orientation: video.

Maximum array length: 1
watermark_info
object

Optional compatible watermark structure.

响应

200 - application/json

Task accepted.

code
integer
必填

Response code. A value of 0 indicates that the request was accepted.

message
string
必填

Response message.

data
object
必填
最后修改于 2026年7月31日