{
  "Create Task": "Create Task\nPOST\n/v1/images/kolors-virtual-try-on\ncURL\nCopy\nCollapse\ncurl --request POST \\\n--url https://api-singapore.klingai.com/v1/images/kolors-virtual-try-on \\\n--header 'Authorization: Bearer <token>' \\\n--header 'Content-Type: application/json' \\\n--data '{\n\"model_name\": \"kolors-virtual-try-on-v1-5\",\n\"human_image\": \"https://p1-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/tryon-human.webp\",\n\"cloth_image\": \"https://p1-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/suite.webp\",\n\"callback_url\": \"\",\n\"external_task_id\": \"\"\n}'\n200\nCopy\nCollapse\n{\n\"code\": 0, // Error codes; specific definitions see Error codes\n\"message\": \"string\", // Error information\n\"request_id\": \"string\", // Request ID, generated by the system, for tracking and troubleshooting\n\"data\": {\n\"task_id\": \"string\", // Task ID, generated by the system\n\"task_status\": \"string\", // Task status: submitted, processing, succeed, failed\n\"created_at\": 1722769557708, // Task creation time, Unix timestamp, ms\n\"updated_at\": 1722769557708 // Task update time, Unix timestamp, 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 kolors-virtual-try-on-v1\nModel Name\nEnum values：\nkolors-virtual-try-on-v1\nkolors-virtual-try-on-v1-5\nhuman_image\nstring\nRequired\nReference human Image\nSupports inputting 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\nThe image file size cannot exceed 10MB, and the width and height dimensions of the image shall not be less than 300px\ncloth_image\nstring\nRequired\nReference clothing image\nSupport uploading clothing product images or clothing image with white background; Supports single clothing (upper, lower, and dress) try-on\nSupports inputting image Base64 encoding or image URL (ensure accessibility)\nBase64 Encoding Note:\nPlease note, if you use the Base64 method, make sure all image data parameters you pass are in Base64 encoding format. When using Base64, do NOT add any prefix like data:image/png;base64,. Only provide the Base64-encoded string.\nCorrect:\niVBORw0KGgoAAAANSUhEUgAAAAUA...\nIncorrect:\ndata:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...\nSupported image formats: .jpg / .jpeg / .png\nFile size: ≤10MB, dimensions: min 300px\nThe kolors-virtual-try-on-v1-5 model not only supports single clothing input, but also supports \"upper + lower\" combination input:\nInput a single clothing image (upper, lower, or dress) → Generate a try-on image of the single item\nInput a combination clothing image (merge multiple items into one image with white background):\n\"upper + lower\" → Success\n\"upper + upper\" → Fails\n\"lower + lower\" → Fails\n\"dress + dress\" → Fails\n\"upper + dress\" → Fails\n\"lower + dress\" → Fails\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",
  "Parameters": "Please note, if you use the Base64 method, make sure all image data parameters you pass are in Base64 encoding format. When using Base64, do NOT add any prefix like data:image/png;base64,. Only provide the Base64-encoded string.\nCorrect:\niVBORw0KGgoAAAANSUhEUgAAAAUA...\nIncorrect:\ndata:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...\nSupported image formats: .jpg / .jpeg / .png\nFile size: ≤10MB, dimensions: min 300px\nThe kolors-virtual-try-on-v1-5 model not only supports single clothing input, but also supports \"upper + lower\" combination input:\nInput a single clothing image (upper, lower, or dress) → Generate a try-on image of the single item\nInput a combination clothing image (merge multiple items into one image with white background):\n\"upper + lower\" → Success\n\"upper + upper\" → Fails\n\"lower + lower\" → Fails\n\"dress + dress\" → Fails\n\"upper + dress\" → Fails\n\"lower + dress\" → Fails\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\nWill not overwrite system-generated task ID, but supports querying task by this ID\nPlease note that the customized task ID must be unique within a single user account.\nQuery Task (Single)\nGET\n/v1/images/kolors-virtual-try-on/{id}\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url https://api-singapore.klingai.com/v1/images/kolors-virtual-try-on/{id} \\\n--header 'Authorization: Bearer <token>' \\\n--header 'Content-Type: application/json'\n200\nCopy\nCollapse\n{\n\"code\": 0, // Error codes; specific definitions see Error codes\n\"message\": \"string\", // Error information\n\"request_id\": \"string\", // Request ID, generated by the system, for tracking and troubleshooting\n\"data\": {\n\"task_id\": \"string\", // Task ID, generated by the system\n\"task_status\": \"string\", // Task status: submitted, processing, succeed, failed\n\"task_status_msg\": \"string\", // Task status information, displaying the failure reason when the task fails (e.g. content risk control)\n\"final_unit_deduction\": \"string\", // The deduction units of task\n\"created_at\": 1722769557708, // Task creation time, Unix timestamp, ms\n\"updated_at\": 1722769557708, // Task update time, Unix timestamp, ms\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 Number\n\"url\": \"string\" // URL for generating images (To ensure information security, generated images/videos will be cleared after 30 days. Please save them promptly.)\n}\n]\n}\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\nid\nstring\nRequired\nTask ID for virtual try-on. Request path parameter, directly fill the value in the request path.\nexternal_task_id\nstring\nOptional\nCustomized Task ID for audio generation\nThe external_task_id filled in when creating the task. You can choose to query by external_task_id or task_id\nWhen creating a task, you can choose to query by external_task_id or task_id.\nQuery Task (List)\nGET\n/v1/images/kolors-virtual-try-on\ncURL\nCopy",
  "Callback Protocol": "For the 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\nPlease note that the customized task ID must be unique within a single user account.\nQuery Task (Single)\nGET\n/v1/images/kolors-virtual-try-on/{id}\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url https://api-singapore.klingai.com/v1/images/kolors-virtual-try-on/{id} \\\n--header 'Authorization: Bearer <token>' \\\n--header 'Content-Type: application/json'\n200\nCopy\nCollapse\n{\n\"code\": 0, // Error codes; specific definitions see Error codes\n\"message\": \"string\", // Error information\n\"request_id\": \"string\", // Request ID, generated by the system, for tracking and troubleshooting\n\"data\": {\n\"task_id\": \"string\", // Task ID, generated by the system\n\"task_status\": \"string\", // Task status: submitted, processing, succeed, failed\n\"task_status_msg\": \"string\", // Task status information, displaying the failure reason when the task fails (e.g. content risk control)\n\"final_unit_deduction\": \"string\", // The deduction units of task\n\"created_at\": 1722769557708, // Task creation time, Unix timestamp, ms\n\"updated_at\": 1722769557708, // Task update time, Unix timestamp, ms\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 Number\n\"url\": \"string\" // URL for generating images (To ensure information security, generated images/videos will be cleared after 30 days. Please save them promptly.)\n}\n]\n}\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\nid\nstring\nRequired\nTask ID for virtual try-on. Request path parameter, directly fill the value in the request path.\nexternal_task_id\nstring\nOptional\nCustomized Task ID for audio generation\nThe external_task_id filled in when creating the task. You can choose to query by external_task_id or task_id\nWhen creating a task, you can choose to query by external_task_id or task_id.\nQuery Task (List)\nGET\n/v1/images/kolors-virtual-try-on\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url 'https://api-singapore.klingai.com/v1/images/kolors-virtual-try-on?pageNum=1&pageSize=30' \\\n--header 'Authorization: Bearer <token>' \\\n--header 'Content-Type: application/json'\n200\nCopy\nCollapse\n{\n\"code\": 0, // Error codes; specific definitions see Error codes\n\"message\": \"string\", // Error information\n\"request_id\": \"string\", // Request ID, generated by the system, for tracking and troubleshooting\n\"data\": [\n{\n\"task_id\": \"string\", // Task ID, generated by the system\n\"task_status\": \"string\", // Task status: submitted, processing, succeed, failed\n\"task_status_msg\": \"string\", // Task status information, displaying the failure reason when the task fails (e.g. content risk control)\n\"final_unit_deduction\": \"string\", // The deduction units of task\n\"created_at\": 1722769557708, // Task creation time, Unix timestamp, ms\n\"updated_at\": 1722769557708, // Task update time, Unix timestamp, ms"
}