{
  "Create Task": "Create Task\nPOST\n/v1/general/ai-multi-shot\ncURL\nCopy\nCollapse\ncurl --request POST \\\n--url https://api-singapore.klingai.com/v1/general/ai-multi-shot \\\n--header 'Authorization: Bearer <token>' \\\n--header 'Content-Type: application/json' \\\n--data '{\n\"element_frontal_image\": \"https://v1-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-1.png\",\n\"external_task_id\": \"\",\n\"callback_url\": \"\"\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\"task_info\": { //Task creation parameters\n\"external_task_id\": \"string\" //Customer-defined task ID\n},\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\nelement_frontal_image\nstring\nRequired\nThe frontal side of element image\nSupports inputting image Base64 encoding or image URL (ensure accessibility).\nSupported image formats: .jpg / .jpeg / .png\nImage file size cannot exceed 10MB, and the width and height dimensions shall not be less than 300px, and the aspect ratio should be between 1:2.5 ~ 2.5:1\ncallback_url\nstring\nOptional\nThe callback notification address for the result of this task. If configured, the server will actively notify when the task status changes\nFor the specific message schema, see Callback Protocol\nexternal_task_id\nstring\nOptional\nCustomized Task ID\nUsers can provide a customized task ID, which will not overwrite the system-generated task ID but can be used for task queries\nPlease note that the customized task ID must be unique within a single user account\nQuery Task (Single)\nGET\n/v1/general/ai-multi-shot/{id}\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url https://api-singapore.klingai.com/v1/general/ai-multi-shot/{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, displaying the failure reason when the task fails (such as triggering the platform's content risk control, etc.)\n\"task_info\": { // Task creation parameters\n\"external_task_id\": \"string\" // Customer-defined task ID\n},\n\"task_result\": {\n\"images\": [\n{\n\"index\": 0, // Image result index, 0-2\n\"url_1\": \"string\", // URL for generated image, anti-hotlinking format (To ensure information security, generated images/videos will be cleared after 30 days. Please make sure to save them promptly.)\n\"url_2\": \"string\", // URL for generated image, anti-hotlinking format (To ensure information security, generated images/videos will be cleared after 30 days. Please make sure to save them promptly.)",
  "Parameters": "\"task_info\": { //Task creation parameters\n\"external_task_id\": \"string\" //Customer-defined task ID\n},\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\nelement_frontal_image\nstring\nRequired\nThe frontal side of element image\nSupports inputting image Base64 encoding or image URL (ensure accessibility).\nSupported image formats: .jpg / .jpeg / .png\nImage file size cannot exceed 10MB, and the width and height dimensions shall not be less than 300px, and the aspect ratio should be between 1:2.5 ~ 2.5:1\ncallback_url\nstring\nOptional\nThe callback notification address for the result of this task. If configured, the server will actively notify when the task status changes\nFor the specific message schema, see Callback Protocol\nexternal_task_id\nstring\nOptional\nCustomized Task ID\nUsers can provide a customized task ID, which will not overwrite the system-generated task ID but can be used for task queries\nPlease note that the customized task ID must be unique within a single user account\nQuery Task (Single)\nGET\n/v1/general/ai-multi-shot/{id}\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url https://api-singapore.klingai.com/v1/general/ai-multi-shot/{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, displaying the failure reason when the task fails (such as triggering the platform's content risk control, etc.)\n\"task_info\": { // Task creation parameters\n\"external_task_id\": \"string\" // Customer-defined task ID\n},\n\"task_result\": {\n\"images\": [\n{\n\"index\": 0, // Image result index, 0-2\n\"url_1\": \"string\", // URL for generated image, anti-hotlinking format (To ensure information security, generated images/videos will be cleared after 30 days. Please make sure to save them promptly.)\n\"url_2\": \"string\", // URL for generated image, anti-hotlinking format (To ensure information security, generated images/videos will be cleared after 30 days. Please make sure to save them promptly.)\n\"url_3\": \"string\" // URL for generated image, anti-hotlinking format (To ensure information security, generated images/videos will be cleared after 30 days. Please make sure to save them promptly.)\n}\n]\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\nRequired\nTask ID for AI Multi-Shot. Fill the value directly in the request path.\nQuery Task (List)",
  "Callback Protocol": "For the specific message schema, see Callback Protocol\nexternal_task_id\nstring\nOptional\nCustomized Task ID\nUsers can provide a customized task ID, which will not overwrite the system-generated task ID but can be used for task queries\nPlease note that the customized task ID must be unique within a single user account\nQuery Task (Single)\nGET\n/v1/general/ai-multi-shot/{id}\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url https://api-singapore.klingai.com/v1/general/ai-multi-shot/{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, displaying the failure reason when the task fails (such as triggering the platform's content risk control, etc.)\n\"task_info\": { // Task creation parameters\n\"external_task_id\": \"string\" // Customer-defined task ID\n},\n\"task_result\": {\n\"images\": [\n{\n\"index\": 0, // Image result index, 0-2\n\"url_1\": \"string\", // URL for generated image, anti-hotlinking format (To ensure information security, generated images/videos will be cleared after 30 days. Please make sure to save them promptly.)\n\"url_2\": \"string\", // URL for generated image, anti-hotlinking format (To ensure information security, generated images/videos will be cleared after 30 days. Please make sure to save them promptly.)\n\"url_3\": \"string\" // URL for generated image, anti-hotlinking format (To ensure information security, generated images/videos will be cleared after 30 days. Please make sure to save them promptly.)\n}\n]\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\nRequired\nTask ID for AI Multi-Shot. Fill the value directly in the request path.\nQuery Task (List)\nGET\n/v1/general/ai-multi-shot\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url 'https://api-singapore.klingai.com/v1/general/ai-multi-shot?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, displaying the failure reason when the task fails (such as triggering the platform's content risk control, etc.)\n\"task_info\": { //Task creation parameters\n\"external_task_id\": \"string\" //Customer-defined task ID\n},\n\"task_result\": {\n\"images\": [\n{\n\"index\": 0, // Image result index, 0-2\n\"url_1\": \"string\", // URL for generated image, anti-hotlinking format (Please note that for information security, generated images/videos will be deleted after 30 days. Please save them promptly.)\n\"url_2\": \"string\", // URL for generated image, anti-hotlinking format (Please note that for information security, generated images/videos will be deleted after 30 days. Please save them promptly.)"
}