{
  "Create Task": "Create Task\nPOST\n/v1/videos/motion-control\ncURL\nCopy\nCollapse\ncurl --request POST \\\n--url https://api-singapore.klingai.com/v1/videos/motion-control \\\n--header 'Authorization: Bearer <token>' \\\n--header 'Content-Type: application/json; charset=utf-8' \\\n--data-raw '{\n\"model_name\": \"kling-v2-6\",\n\"image_url\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png\",\n\"prompt\": \"The girl is wearing a loose gray T-shirt and denim shorts\",\n\"video_url\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4\",\n\"keep_original_sound\": \"yes\",\n\"character_orientation\": \"image\",\n\"mode\": \"pro\",\n\"callback_url\": \"\",\n\"external_task_id\": \"xxx\"\n}'\n200\nCopy\nCollapse\n{\n\"code\": 0, // Error codes; Specific definitions can be found in \"Error Code\"\n\"message\": \"string\", // Error information\n\"request_id\": \"string\", // Request ID, generated by the system, used to track requests and troubleshoot problems\n\"data\": {\n\"task_id\": \"string\", // Task ID, generated by the system\n\"task_info\": { //Task creation parameters\n\"external_task_id\": \"string\" //Customer-defined task ID\n},\n\"task_status\": \"string\", // Task status, Enum values: submitted, processing, succeed, failed\n\"created_at\": 1722769557708, // Task creation time, Unix timestamp, unit: ms\n\"updated_at\": 1722769557708 //Task update time, Unix timestamp, unit: ms\n}\n}\nRequest Header\nContent-Type\nstring\nRequired\nDefault to application/json\nData Exchange Format\nAuthorization\nstring\nRequired\nAuthentication information, refer to API authentication\nRequest Body\nmodel_name\nstring\nOptional\nDefault to kling-v2-6\nModel Name\nEnum values：\nkling-v2-6\nkling-v3\nprompt\nstring\nOptional\nText prompt, can include positive and negative descriptions\nCan add elements to the scene, achieve camera movement effects, etc. See Kling \"Motion Control\" User Guide\nCannot exceed 2500 characters\nimage_url\nstring\nRequired\nReference image. Characters, background and other elements in generated video will follow this reference.\nVideo content requirements:\nCharacter proportions should match the reference motion as much as possible; avoid driving half-body characters with full-body motions\nCharacter should show clear upper body or full body including limbs and head, avoid occlusion\nAvoid extreme orientations (upside down, lying flat, etc.). Character should occupy sufficient screen area\nSupports realistic/stylized characters (including humans/humanoid animals/some pure animals/some humanoid body proportion characters)\nSupports image Base64 encoding or image URL (ensure accessibility)\nImportant: When using Base64, do NOT add any prefix like data:image/png;base64,. Submit only the raw Base64 string.\nCorrect Base64 format:\niVBORw0KGgoAAAANSUhEUgAAAAUA...\nIncorrect Base64 format (with data: prefix):\ndata:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...\nSupported image formats: .jpg / .jpeg / .png\nFile size: ≤10MB, dimensions: 300px ~ 65536px, aspect ratio: 1:2.5 ~ 2.5:1\nvideo_url\nstring\nRequired\nURL of reference video. Character actions in generated video will follow this reference.\nVideo content requirements:\nCharacter should show clear upper body or full body including all limbs and head, avoid occlusion\nRecommend uploading single-person action video; for 2+ people, actions will be taken from the character with largest screen proportion\nRecommend using real person actions; some stylized characters/humanoid body proportions may work\nVideo should be single continuous shot with character always visible, avoid cuts or camera movements (will be truncated otherwise)\nAvoid overly fast actions; relatively stable actions produce better results",
  "Parameters": "\"task_info\": { //Task creation parameters\n\"external_task_id\": \"string\" //Customer-defined task ID\n},\n\"task_status\": \"string\", // Task status, Enum values: submitted, processing, succeed, failed\n\"created_at\": 1722769557708, // Task creation time, Unix timestamp, unit: ms\n\"updated_at\": 1722769557708 //Task update time, Unix timestamp, unit: ms\n}\n}\nRequest Header\nContent-Type\nstring\nRequired\nDefault to application/json\nData Exchange Format\nAuthorization\nstring\nRequired\nAuthentication information, refer to API authentication\nRequest Body\nmodel_name\nstring\nOptional\nDefault to kling-v2-6\nModel Name\nEnum values：\nkling-v2-6\nkling-v3\nprompt\nstring\nOptional\nText prompt, can include positive and negative descriptions\nCan add elements to the scene, achieve camera movement effects, etc. See Kling \"Motion Control\" User Guide\nCannot exceed 2500 characters\nimage_url\nstring\nRequired\nReference image. Characters, background and other elements in generated video will follow this reference.\nVideo content requirements:\nCharacter proportions should match the reference motion as much as possible; avoid driving half-body characters with full-body motions\nCharacter should show clear upper body or full body including limbs and head, avoid occlusion\nAvoid extreme orientations (upside down, lying flat, etc.). Character should occupy sufficient screen area\nSupports realistic/stylized characters (including humans/humanoid animals/some pure animals/some humanoid body proportion characters)\nSupports image Base64 encoding or image URL (ensure accessibility)\nImportant: When using Base64, do NOT add any prefix like data:image/png;base64,. Submit only the raw Base64 string.\nCorrect Base64 format:\niVBORw0KGgoAAAANSUhEUgAAAAUA...\nIncorrect Base64 format (with data: prefix):\ndata:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...\nSupported image formats: .jpg / .jpeg / .png\nFile size: ≤10MB, dimensions: 300px ~ 65536px, aspect ratio: 1:2.5 ~ 2.5:1\nvideo_url\nstring\nRequired\nURL of reference video. Character actions in generated video will follow this reference.\nVideo content requirements:\nCharacter should show clear upper body or full body including all limbs and head, avoid occlusion\nRecommend uploading single-person action video; for 2+ people, actions will be taken from the character with largest screen proportion\nRecommend using real person actions; some stylized characters/humanoid body proportions may work\nVideo should be single continuous shot with character always visible, avoid cuts or camera movements (will be truncated otherwise)\nAvoid overly fast actions; relatively stable actions produce better results\nSupported formats: .mp4 / .mov, file size: ≤100MB, dimensions: 340px ~ 3850px. Validation failures will return error codes.\nDuration limits: minimum 3 seconds, maximum depends on character_orientation:\nWhen character_orientation is \"video\": maximum 30 seconds\nWhen character_orientation is \"image\": maximum 10 seconds\nThe duration range of the uploaded motion reference is from 3 to 30 seconds, in which the generated video length will align with the duration of the uploaded video. If motions are complex or fast-paced, there is a chance that the output may be shorter than the uploaded video duration, as the model can only extract the valid action duration for generation. The minimum extractable continuous action duration is 3 seconds. Please note that in such cases, the consumed credits cannot be refunded. It is recommended to adjust the complexity and speed of the actions accordingly.\nSystem will validate video content and return error codes if issues are found\nelement_list\narray\nOptional\nReference Element List based on element ID configuration\nLoad with key:value format as follows:\n\"element_list\":[\n{ \"element_id\": 829836802793406551 }\n]\nWhen referencing the element, the generated video can only temporarily refer to the orientation of the person in the video.\nCurrently, only one element can be introduced.\n▾\nHide child attributes\nelement_id\nlong\nRequired\nElement ID from element library\nkeep_original_sound\nstring\nOptional\nDefault to yes\nWhether to keep the original sound of the video\nEnum values：\nyes\nno",
  "Callback Protocol": "For specific message schema, see Callback Protocol\nexternal_task_id\nstring\nOptional\nCustomized Task ID\nWill not overwrite system-generated task ID, but supports querying task by this ID\nMust be unique within a single user account\nQuery Task (Single)\nGET\n/v1/videos/motion-control/{id}\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url https://api-singapore.klingai.com/v1/videos/motion-control/{task_id} \\\n--header 'Authorization: Bearer <token>'\n200\nCopy\nCollapse\n{\n\"code\": 0, // Error codes; Specific definitions can be found in \"Error Code\"\n\"message\": \"string\", // Error information\n\"request_id\": \"string\", // Request ID, generated by the system, used to track requests and troubleshoot problems\n\"data\": {\n\"task_id\": \"string\", // Task ID, generated by the system\n\"task_status\": \"string\", // Task status, Enum values: submitted, processing, succeed, failed\n\"task_status_msg\": \"string\", // Task status information, displaying the failure reason when the task fails (such as triggering the content risk control of the platform, etc.)\n\"task_info\": { //Task creation parameters\n\"external_task_id\": \"string\" //Customer-defined task ID\n},\n\"task_result\": {\n\"videos\": [\n{\n\"id\": \"string\", // Generated video ID; globally unique\n\"url\": \"string\", // URL for generating videos, anti-leech format (To ensure information security, generated images/videos will be cleared after 30 days. Please make sure to save them promptly.)\n\"watermark_url\": \"string\", // Watermarked video download URL, anti-leech format\n\"duration\": \"string\" //Total video duration, unit: s (seconds)\n}\n]\n},\n\"watermark_info\": {\n\"enabled\": boolean\n},\n\"final_unit_deduction\": \"string\", // The deduction units of task\n\"created_at\": 1722769557708, // Task creation time, Unix timestamp, unit: ms\n\"updated_at\": 1722769557708 //Task update time, Unix timestamp, unit: ms\n}\n}\nRequest Header\nContent-Type\nstring\nRequired\nDefault to application/json\nData Exchange Format\nAuthorization\nstring\nRequired\nAuthentication information, refer to API authentication\nPath Parameters\ntask_id\nstring\nOptional\nTask ID for Motion Control. Fill the value directly in the request path. Choose either task_id or external_task_id for querying.\nexternal_task_id\nstring\nOptional\nCustomized Task ID for Motion Control. Fill the value directly in the request path. Choose either task_id or external_task_id for querying.\nQuery Task (List)\nGET\n/v1/videos/motion-control\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url 'https://api-singapore.klingai.com/v1/videos/motion-control?pageNum=1&pageSize=30' \\\n--header 'Authorization: Bearer <token>'\n200\nCopy\nCollapse\n{\n\"code\": 0, // Error codes; Specific definitions can be found in \"Error Code\"\n\"message\": \"string\", // Error information\n\"request_id\": \"string\", // Request ID, generated by the system, used to track requests and troubleshoot problems\n\"data\": [\n{\n\"task_id\": \"string\", // Task ID, generated by the system\n\"task_status\": \"string\", // Task status, Enum values: submitted, processing, succeed, failed\n\"task_status_msg\": \"string\", // Task status information, displaying the failure reason when the task fails (such as triggering the content risk control of the platform, etc.)\n\"task_info\": { //Task creation parameters\n\"external_task_id\": \"string\" //Customer-defined task ID"
}