Virtual Try-On Integration Guide
Submit a task through POST /kling/virtual-try-on, and use the existing POST /kling/tasks to query the platform task status.
¶ Input
You must provide exactly one product_image and one person_image. keep_face, keep_pose, and keep_background default to true and can be disabled independently. The longest side of the input image must not exceed 2048px, the shortest side must be greater than 300px, and the file must not exceed 10MB.
The following is an example of the request structure. Please replace the asset URLs before calling.
{
"contents": [
{
"type": "product_image",
"url": "https://your-cdn.example/product.jpg"
},
{
"type": "person_image",
"url": "https://your-cdn.example/person.jpg"
}
],
"async": true
}
¶ Results and Billing
Synchronous mode returns the generated result; asynchronous mode first returns task_id, and the completed result includes video or image links in data and server-calculated usage. callback_url is used for completion notifications; requests with watermark=true return a watermarked version at the same time.
1.12 Credits/image, billed based on the actual number of output images. Videos are charged based on the actual generated duration, and the per-second base price before generation does not represent the total price of the entire task. Failed tasks are not charged generation fees.