MaasUnionMaasUnion
API Reference
AI Model APIImagesKling Image

Kling Virtual Try-On

Channel type: Kling Extended (66) Gateway path: POST https://maasunion.com/kling/v1/extended/images/kolors-virtual-try-on · GET .../kolors-virtual-try-on/{task_id} Official upstream: https://api-beijing.klingai.com (/v1/images/kolors-virtual-try-on)


Overview

The virtual try-on capability is based on a person image and a clothing image, generating an image of the person wearing the specified clothing.

Supported Models

model_nameDescription
kolors-virtual-try-on-v1-5Virtual try-on v1.5

Authentication

HeaderRequiredDescription
AuthorizationYesBearer {your_api_token}
Content-TypeRequired for POSTapplication/json

Create Task

POST https://maasunion.com/kling/v1/extended/images/kolors-virtual-try-on

Request Parameters

ParameterTypeRequiredDescription
model_namestringYesModel name: kolors-virtual-try-on-v1-5
human_imagestringYesPerson image URL
cloth_imagestringYesClothing image URL
callback_urlstringNoCallback URL
external_task_idstringNoCustom task ID

Request Example

curl --request POST \
  --url "https://maasunion.com/kling/v1/extended/images/kolors-virtual-try-on" \
  --header "Authorization: Bearer {your_api_token}" \
  --header "Content-Type: application/json" \
  --data '{
    "model_name": "kolors-virtual-try-on-v1-5",
    "human_image": "https://example.com/person.jpg",
    "cloth_image": "https://example.com/cloth.jpg"
  }'

Create Response

{
  "code": 0,
  "message": "string",
  "request_id": "string",
  "data": {
    "task_id": "gateway_public_task_id",
    "task_status": "submitted",
    "created_at": 1722769557708,
    "updated_at": 1722769557708
  }
}

Query Task

GET https://maasunion.com/kling/v1/extended/images/kolors-virtual-try-on/{task_id}

curl --request GET \
  --url "https://maasunion.com/kling/v1/extended/images/kolors-virtual-try-on/{task_id}" \
  --header "Authorization: Bearer {your_api_token}"

The query response returns the try-on result image in task_result.images, with the same structure as the standard image.


Task Status

task_statusMeaning
submittedSubmitted
processingProcessing
succeedSucceeded
failedFailed

For more general information, see Kling Gateway Overview.

How is this guide?