
Virtual Try-On API Reference
This page covers all steps to integrate virtual try-on API into your system.
Get your API keys
Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.
You can generate an API key from your user dashboard in Miragic website anytime.

Authentication
All requests must include the X-API-Key header containing your assigned API key.
How To Create VTO Process
POST /api/v1/virtual-try-on
This API starts the virtualtry-on process by creating a task that generates an image of the model wearing the specified clothing. It supports both single-item try-ons and combo try-ons (upper and lower body clothing combined).
Try-on Options
Single Item Try-on:
Upper Body: Try on shirts, t-shirts, jackets, etc.Lower Body: Try on pants, shorts, skirts, etc.Full Body: Try on dresses, jumpsuits, etc.
Combo Try-on:
Try on upper and lower body clothing simultaneously.
Particularly useful for coordinating complete outfits.
Requires a compatible model pose for both items.
Request
Form Data (Case 1: Single Clothing Try-on)
humanImage
File
Yes
Human image (recommended size: 2048px)
clothImage
File
Yes
Garment image to try on (recommended size: 1024px)
garmentType
String
Yes
Type of garment: upper_body, lower_body, or full_body
Form Data (Case 2: Combo Try-on)
garmentType
String
Yes
Can be any text for this case
clothImage
File
Yes
Upper garment image (recommended size: 1024px)
bottomClothImage
File
Yes
Lower garment image (recommended size: 1024px)
humanImage
File
Yes
Human image (recommended size: 2048px)
The best way to interact with our API is to use one of our official libraries:
Request Example (Case 1: Single Clothing Try-on)
Request Example (Case 2: Combo Try-on)
Response (Case 1: Single Clothing Try-on)
Response (Case 2: Combo Try-on)
Response Field
jobId
String
A unique identifier used to track task status and retrieve results.
status
String
The initial status will be PENDING. Use the Get Task Status API to track progress.
mode
String
String to indicate single clothing try-on(SINGLE) or combo try-on(TOP_BOTTOM).
createdAt
String
Date
success
Logic
true or false to indicate whether task is successful or not.
How To Get Process Status
GET /api/v1/virtual-try-on/:jobId
This API lets you check the status of a try-on task and retrieve the final result. Because the try-on process runs asynchronously, you’ll need to poll this endpoint until the task is finished.
Task Status:
PENDING
Task is currently being processed.
0~99%
Continue polling
COMPLETED
Task has finished successfully.
100%
Download result using download_signed_url
FAILED
Task processing failed.
N/A
Check error details and retry if needed
Request:
URL Parameters
JobId
String
Yes
This value indicates task ID assigned by requesting VTO process API
Request Example
Response Example
Completed Status (200):
Response Fields
id
String
Unique identifier of the task
status
String
Current status of the task (PENDING/COMPLETED/FAILED)
mode
String
String to indicate single clothing try-on(SINGLE) or combo try-on(TOP_BOTTOM).
humanImagePath
String
URL to human image
bottomClothImagePath
String
URL to lower garment image
clothImagePath
String
URL to uppper garment image
resultImagePath
String
URL to result image
createdAt
Number
Unix timestamp when processing is created
processingStartedAt
Number
Unix timestamp when processing is started
processingCompletedAt
Number
Unix timestamp when processing is completed
errorMessage
String
Error message
Rate Limits
To maintain service stability and fair usage, the API enforces the following rate limit:
60requests per minute perAPIkey
If this limit is exceeded, an error (Too Many Requests) will be returned. Please ensure your application includes proper retry logic with exponential backoff.
Full Code Example
The following code lines are quick example to use our API in multiple languages.
Case 1: Single Clothing Try-on
Case 2: Combo Try-on
Last updated