Skip to main content
POST
/
kling
/
v1
/
images
/
kolors-virtual-try-on
cURL
curl https://api.cometapi.com/kling/v1/images/kolors-virtual-try-on \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model_name": "kolors-virtual-try-on-v1",
  "human_image": "https://your-image-host/person.jpg",
  "cloth_image": "https://your-image-host/garment.jpg"
}'
{
  "code": 123,
  "message": "<string>",
  "data": {
    "task_id": "<string>",
    "created_at": 123,
    "updated_at": 123,
    "task_status_msg": "<string>",
    "task_info": {
      "external_task_id": "<string>"
    },
    "task_result": {}
  },
  "request_id": "<string>"
}
Use this endpoint to generate a virtual try-on image from one person image and one garment image.

Before you call it

  • Provide one human_image and one cloth_image
  • Start with kolors-virtual-try-on-v1 or kolors-virtual-try-on-v1-5
  • Use clean clothing product shots or white-background garment images for the first test

Task flow

1

Submit the try-on task

Send the person image and clothing image, then save the returned task id.
2

Poll the task

Poll the matching Kling image query path until the task reaches a terminal state and returns the rendered image.
3

Persist the result

Save the finished image into your own storage if the try-on result needs longer retention.
For the complete parameter reference, see the official Kling documentation.

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your CometAPI key.

Headers

Content-Type
string
default:application/json

Must be application/json.

Body

application/json
human_image
string
required

Person image to dress. Image URL or raw Base64 string without a data: prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1.

cloth_image
string
required

Clothing image for the try-on. Image URL or raw Base64 string without a data: prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1. Supports tops, bottoms, and one-piece dresses.

model_name
enum<string>
default:kolors-virtual-try-on-v1

Virtual try-on model version. Defaults to kolors-virtual-try-on-v1.

Available options:
kolors-virtual-try-on-v1,
kolors-virtual-try-on-v1-5
callback_url
string

Webhook URL for task status notifications.

external_task_id
string

Optional user-defined task ID for your own tracking. Must be unique per account.

Response

200 - application/json

Task request accepted or an error response returned by the API.

code
required

Response code. 0 means the task request was accepted.

message
string
required

Response message.

data
object
required
request_id
string

Request identifier returned when present.