SnapEditDocs
API Reference

Create virtual try-on task

virtual-tryon-clothes

Create an asynchronous virtual try-on task. Upload a model (person) image and one or two clothing images to generate the try-on result.

This API supports either:

  1. One clothing item of type upper, lower, or full
  2. Two clothing items simultaneously (upper and lower)

Poll the GET endpoint with the returned task_id to retrieve results.

post/v1/images/try-on

Credit cost: 17

AuthorizationThis endpoint requires an API key. Pass it in the api-key header on every request. See the quickstart

Body

NameTypeStatusDescription
model_image
fileRequiredModel/person image file or URL.
cloth_image
fileRequiredClothing image file or URL.
lower_cloth_image
fileOptionalLower clothing image file or URL.
cloth_type
stringRequiredClothing type.

Responses

Try-on task created successfullyTaskCreatedResponse

NameTypeDescription
task_idstringUnique task identifier. Poll GET /v1/tasks/{task_id} for results.
statusstring
created_atintegerUnix timestamp of task creation
curl -X POST "https://api.snapapi.ai/v1/images/try-on" \
  -H "api-key: YOUR_API_KEY" \
  -F "model_image=@./image.jpg" \
  -F "cloth_image=@./image.jpg" \
  -F "lower_cloth_image=@./image.jpg" \
  -F "cloth_type=value"
Response
{
  "task_id": "task_abc123",
  "status": "CREATED",
  "created_at": 1745827200
}

Examples

(2 examples)

Input

Input 1Input 2

Output

Output