Skip to main content

Kevin Kling Motion Control

POST 

/open/aigw/gateway/generations

Replicate the motion trajectory from a reference video onto the subject in an image to generate a new video.

Call Flow

  1. Call this endpoint to submit a motion control task and obtain a taskNo
  2. Upon completion, the system will POST callback notification results to your callbackUrl
  3. You can also poll via GET /open/aigw/gateway/generationTask?taskNo=xxx

Request

Responses

任务提交成功

Callback Notification Format

Upon completion, the system will POST the following data to your callbackUrl:

On success:

{
"taskNo": "a1b2c3d4...",
"status": "success",
"model": "kling_2.6_motion_control",
"timestamp": 1234567890,
"data": {
"task_id": "6928de47-2e53-4ee6-901b-be05a8bf7669",
"status": "SUCCESS",
"request_id": "7d8d7f71a7314779b6947eed659085fa",
"result": {
"video_url": "https://cdn.example.com/result_video.mp4"
},
"error_info": "",
"traceback": ""
},
"usage": { "totalPoints": 10 },
"sign": "sha256hex..."
}

On failure:

{
"taskNo": "a1b2c3d4...",
"status": "failed",
"model": "kling_2.6_motion_control",
"timestamp": 1234567890,
"error": "Error message",
"sign": "sha256hex..."
}

Signature verification: sign = SHA256(taskNo + timestamp + apiKey)

Query Generation Task Status

GET /open/aigw/gateway/generationTask?taskNo={taskNo}

It is recommended to use the callback method first; this endpoint serves as a polling fallback.

Request parameters:

ParameterTypeRequiredDescription
taskNostringYesThe task number returned when the task was submitted

Response example (success):

{
"code": 1000,
"message": "success",
"data": {
"taskNo": "a1b2c3d4...",
"model": "kling_2.6_motion_control",
"status": "success",
"createTime": "2025-01-01 12:00:00",
"data": {
"result": {
"video_url": "https://cdn.example.com/result_video.mp4"
}
},
"usage": { "totalPoints": 10 }
}
}

Response example (failure):

{
"code": 1000,
"message": "success",
"data": {
"taskNo": "a1b2c3d4...",
"model": "kling_2.6_motion_control",
"status": "failed",
"error": "Failure reason"
}
}

status values: pending (queued), processing (in progress), success (completed), failed (failed)