{
  "Create Task": "Create Task\nPOST\n/v1/videos/multi-image2video\ncURL\nCopy\nCollapse\ncurl --request POST \\\n--url https://api-singapore.klingai.com/v1/videos/multi-image2video \\\n--header 'Authorization: Bearer <token>' \\\n--header 'Content-Type: application/json' \\\n--data '{\n\"model_name\": \"kling-v1-6\",\n\"image_list\": [\n{ \"image\": \"https://p1-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dog.png\" },\n{ \"image\": \"https://p1-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dog_cloth.png\" }\n],\n\"prompt\": \"A white Bichon Frise wearing a red Northeast-style floral cotton jacket, licking its paw\",\n\"negative_prompt\": \"\",\n\"mode\": \"pro\",\n\"duration\": \"5\",\n\"aspect_ratio\": \"16:9\",\n\"callback_url\": \"\",\n\"external_task_id\": \"\"\n}'\n200\nCopy\nCollapse\n{\n\"code\": 0, // Error code; Specific definitions can be found in \"Error Code\"\n\"message\": \"string\", // Error message\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\"created_at\": 1722769557708, // Task creation time, Unix timestamp, unit: ms\n\"updated_at\": 1722769557708 //Task update time, Unix timestamp, unit: ms\n}\n}\nGenerate video from multiple reference images (elements).\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-v1-6\nModel Name\nEnum values：\nkling-v1-6\nimage_list\narray\nRequired\nReference Image List\nSupport up to 4 images, load with key:value format as follows:\n\"image_list\":[\n{ \"image\":\"image_url\" },\n{ \"image\":\"image_url\" },\n{ \"image\":\"image_url\" },\n{ \"image\":\"image_url\" }\n]\nPlease directly upload the image with selected subject since there is no cropping logic on the API side\nSupports image input as either Base64-encoded string or URL (ensure the URL is publicly accessible)\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\nImage file size must not exceed 10MB. Image dimensions must be at least 300px. Aspect ratio must be between 1:2.5 and 2.5:1\n▾\nHide child attributes\nimage",
  "Parameters": "\"task_info\": { //Task creation parameters\n\"external_task_id\": \"string\" //User-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 (Please note that for security purposes, generated images/videos will be deleted after 30 days. Please save them promptly.)\n\"watermark_url\": \"string\", // Watermarked video download URL, anti-hotlinking 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\", // Final unit deduction for the 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 Multi-Image to Video\nRequest path parameter, fill the value directly in the request path\nYou can choose to query by external_task_id or task_id\nexternal_task_id\nstring\nOptional\nCustomized Task ID for Multi-Image to Video\nRequest path parameter, fill the value directly in the request path\nThe external_task_id filled in when creating the task. You can choose to query by external_task_id or task_id\nQuery Task (List)\nGET\n/v1/videos/multi-image2video\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url 'https://api-singapore.klingai.com/v1/videos/multi-image2video?pageNum=1&pageSize=30' \\\n--header 'Authorization: Bearer <token>'\n200\nCopy\nCollapse\n{\n\"code\": 0, // Error code; Specific definitions can be found in \"Error Code\"\n\"message\": \"string\", // Error message\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 message, displays failure reason when task fails (such as content moderation triggers)\n\"task_info\": { //Task creation parameters\n\"external_task_id\": \"string\" //User-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 (Please note that for security purposes, generated images/videos will be deleted after 30 days. Please save them promptly.)\n\"watermark_url\": \"string\", // Watermarked video download URL, anti-hotlinking format\n\"duration\": \"string\" //Total video duration, unit: s (seconds)\n}\n]\n},\n\"watermark_info\": {\n\"enabled\": boolean",
  "Callback Protocol": "The specific message schema of the notification can be found in Callback Protocol\nexternal_task_id\nstring\nOptional\nCustomized Task ID\nUser-defined task ID. It will not override the system-generated task ID, but supports querying tasks by this ID\nPlease note that it must be unique for each user\nQuery Task (Single)\nGET\n/v1/videos/multi-image2video/{id}\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url https://api-singapore.klingai.com/v1/videos/multi-image2video/{task_id} \\\n--header 'Authorization: Bearer <token>'\n200\nCopy\nCollapse\n{\n\"code\": 0, // Error code; Specific definitions can be found in \"Error Code\"\n\"message\": \"string\", // Error message\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 message, displays failure reason when task fails (such as content moderation triggers)\n\"task_info\": { //Task creation parameters\n\"external_task_id\": \"string\" //User-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 (Please note that for security purposes, generated images/videos will be deleted after 30 days. Please save them promptly.)\n\"watermark_url\": \"string\", // Watermarked video download URL, anti-hotlinking 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\", // Final unit deduction for the 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 Multi-Image to Video\nRequest path parameter, fill the value directly in the request path\nYou can choose to query by external_task_id or task_id\nexternal_task_id\nstring\nOptional\nCustomized Task ID for Multi-Image to Video\nRequest path parameter, fill the value directly in the request path\nThe external_task_id filled in when creating the task. You can choose to query by external_task_id or task_id\nQuery Task (List)\nGET\n/v1/videos/multi-image2video\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url 'https://api-singapore.klingai.com/v1/videos/multi-image2video?pageNum=1&pageSize=30' \\\n--header 'Authorization: Bearer <token>'"
}