Skip to content
EN

动作控制

方法: POST路径: /kling/v1/videos/motion-control

本文档不实时更新,完整版请查看官方文档:https://app.klingai.com/cn/dev/document-api/apiReference/model/motionControl

请求参数

Header 参数

text
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}

Body 参数 application/json

text
prompt
string
必需
image_url
string
必需
video_url
string
必需
示例
{
"prompt"
:
""
,
"image_url"
:
""
,
"video_url"
:
""
}

请求示例代码

Shell

bash
curl --location --request POST '/kling/v1/videos/motion-control' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "prompt": "",
    "image_url": "",
    "video_url": ""
}'

返回响应

🟢 200 成功

内容类型: application/json

响应结构

text
code
integer
必需
错误码;具体定义错误码
message
string
错误信息
必需
request_id
string
必需
请求ID,系统生成,用于跟踪请求、排查问题
data
object
必需
task_id
string
必需
任务ID,系统生成
task_status
enum<string>
必需
任务状态,枚举值:submitted(已提交)、processing(处理中)、succeed(成功)、failed(失败)
枚举值:
submitted(已提交
processing(处理中)
succeed(成功)
failed(失败)
created_at
integer
必需
任务创建时间,Unix时间戳、单位ms
updated_at
integer
必需
任务更新时间,Unix时间戳、单位ms

示例

json
{
    "code": 0,
    "message": "string",
    "request_id": "string",
    "data": {
        "task_id": "string",
        "task_status": "string",
        "created_at": 0,
        "updated_at": 0
    }
}