Overview
Generate a realistic preview of a person wearing a specific garment from a product image - no physical samples required.
Primary Endpoint
POST
/api/v1/virtualTryOn/startStart virtual try-on task
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | No | Name of the virtual try-on task |
| image_urls | array<string> | Yes | Array of 2 image URLs - [0] person image, [1] clothing image |
| timeout | number | No | Processing timeout in seconds |
| webhook_url | string | No | HTTPS URL to receive task.completed / task.failed notifications. Best-effort delivery, single attempt, no retries; clients should treat the detail API as the source of truth. |
| webhook_token | string | No | Optional plaintext token returned in the X-A2e-Webhook-Token header so receivers can verify the request originated from a2e. |
Request Example
curl -X POST "https://www.a2e.com.cn/api/v1/virtualTryOn/start" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Summer Dress Try-On",
"image_urls": [
"https://example.com/person.jpg",
"https://example.com/dress.jpg"
],
"timeout": 120,
"webhook_url": "https://your-server.example.com/a2e/webhook",
"webhook_token": "a-shared-secret"
}'Related Endpoints
POST
/api/v1/virtualTryOn/startStart virtual try-on task
GET
/api/v1/virtualTryOn/allRecordsGet all virtual try-on records
POST
/api/v1/virtualTryOn/batchDetailBatch query task details
GET
/api/v1/virtualTryOn/{_id}Get virtual try-on task detail
DELETE
/api/v1/virtualTryOn/{_id}Delete virtual try-on task
Responses
200
Virtual try-on task started successfully
400
Bad Request - Invalid parameters
401
Unauthorized - Invalid or missing bearer token