Virtual Try-On
Use these APIs to Upload Human/Garment Photos, and perform Virtual Try-on.

Upload Image
API to send Human/Garment Image for Pre-Processing.
all image file types are supported
model
or garment
model
male
or female
male
private
or public
private
Successful response
POST /api/v1/experiment_image/ HTTP/1.1
Host: prod.server.tryonlabs.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 68
{
"image": "binary",
"type": "model",
"gender": "male",
"access": "private"
}
Successful response
{
"id": "xxxxxxxxxx",
"image_url": "api/v1/ei/6307170380/d?token=xxxxx-xxxxx-xxxxx-xxxxx",
"created_on": "2024-08-29T00:12:07.228977Z",
"image": "/media/uploaded_images/xxxx.png",
"type": "model",
"gender": "male",
"model_type": "null",
"garment_type": "null",
"garment_brand": "Unknown",
"file_url": "null",
"access": "private",
"shopify_product_id": "null",
"shopify_product_handle": "null",
"images_dir": "6307170380",
"token": "xxxxx-xxxxx-xxxxx-xxxxx",
"token_expiry": "2024-08-30T00:12:07.238254Z",
"preprocessing": "pending",
"user": "7476083494"
}
Get Status of Uploaded Image
API to get status of pre-processing of Human/Garment
ID of experiment image
Successful response
unexpected error
GET /api/v1/experiment_image/{id}/ HTTP/1.1
Host: prod.server.tryonlabs.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "xxxxxxxxxx",
"image_url": "api/v1/ei/6307170380/d?token=xxxxx-xxxxx-xxxxx-xxxxx",
"created_on": "2024-08-29T00:12:07.228977Z",
"image": "/media/uploaded_images/xxxx.png",
"type": "model",
"gender": "male",
"model_type": "null",
"garment_type": "null",
"garment_brand": "Unknown",
"file_url": "null",
"access": "private",
"shopify_product_id": "null",
"shopify_product_handle": "null",
"images_dir": "6307170380",
"token": "xxxxx-xxxxx-xxxxx-xxxxx",
"token_expiry": "2024-08-30T00:12:07.238254Z",
"preprocessing": "completed",
"user": "7476083494"
}
Start Virtual Try-on
API to start the Try-on using previously uploaded Human and Garment Image IDs
Id you get after uploading human image for pre-processing
xxxxxxxxxx
Id you get after uploading garment image for pre-processing
xxxxxxxxxx
name of model to be used, for current use case use virtual_try_on
virtual_try_on
Successful response
No content
unexpected error
POST /api/v1/experiment/ HTTP/1.1
Host: prod.server.tryonlabs.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 78
{
"person_id": "xxxxxxxxxx",
"garment_id": "xxxxxxxxxx",
"action": "virtual_try_on"
}
No content
Get Status of Virtual Try-on
API to get status of Try-on(Takes About 30 Seconds)
ID of experiment image
Successful response
No content
unexpected error
GET /api/v1/experiment/{id}/ HTTP/1.1
Host: prod.server.tryonlabs.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Download Image
API to Download Images
ID of experiment image
Image Token from Human
/Garment
/Try-on
Image
Successful response
unexpected error
GET /api/v1/ei/{id}/d HTTP/1.1
Host: prod.server.tryonlabs.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "binary"
}
Last updated