Skip to main content
POST
/
v1
/
try-on
Try On (Beta)
curl --request POST \
  --url https://api.developer.pixelcut.ai/v1/try-on \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "person_image_url": "https://cdn3.pixelcut.app/virtual-try-on/person.png",
  "garment_image_url": "https://cdn3.pixelcut.app/virtual-try-on/garment.png",
  "garment_mode": "auto",
  "preprocess_garment": "true",
  "remove_background": "false",
  "wait_for_result": "true"
}
'
{
  "result_url": "https://assets.pixelcut.app/public/result/a16646be-91c8-4e3a-b359.jpg"
}

Authorizations

X-API-KEY
string
header
required

All API requests require a valid api key. Include your token as a HTTP request header in the following format: X-API-Key: skXXXXXXXXXXXXXXXX. You can obtain an api key by signing up for developer access in your Pixelcut account.

Headers

Accept
string

Acceptable response media type(s). application/json.

Body

person_image_url
string<url>

URL of the person's image.

Example:

"https://cdn3.pixelcut.app/virtual-try-on/person.png"

garment_image_url
string<url>

URL of the garment image.

Example:

"https://cdn3.pixelcut.app/virtual-try-on/garment.png"

garment_mode
enum<string>
default:auto
deprecated

⚠️ DEPRECATED: This parameter is deprecated and will be removed in a future version.

The API now automatically detects garment type without requiring manual specification.

Indicates the garment type for the try-on service. Determines how the garment is applied on the person image.
- auto: Automatically detects if the garment is full-body, upper-body, or lower-body.
- full: Garment covers the full body (e.g., dresses, jumpsuits).
- upper: Garment covers the upper body (e.g., shirts, jackets).
- lower: Garment covers the lower body (e.g., pants, skirts).

Available options:
auto,
full,
upper,
lower
preprocess_garment
enum<string>
default:true

When true, the garment will be preprocessed to remove background. Defaults to true. In some cases results of model will be improved by skipping pre-processing.

Available options:
true,
false
remove_background
enum<string>
default:false

When true, the background will be removed from the final result. Defaults to false.

Available options:
true,
false
wait_for_result
enum<string>
default:true

When true, the API will wait for processing to complete and return the result directly. When false, it returns a job ID for polling.

Available options:
true,
false

Response

Success - returned when wait_for_result is true and processing completes successfully.

result_url
string

A URL to access the resultant image which is valid for 1 hour. File format will be jpeg.

Example:

"https://assets.pixelcut.app/public/result/a16646be-91c8-4e3a-b359.jpg"