Integrate AI-powered virtual try-on functionality into your e-commerce platform using StyleSense’s secure and scalable API.
https://localhost:7241
All requests must include your API key in the request header. Requests without a valid key will be rejected.
X-API-KEY
Required Header
/api/v1/virtual-try-on/generate
| Key | Type | Description |
|---|---|---|
| PersonImage | File | High-resolution image of the human model. |
| ProductImage | File | Clean image of the clothing item. |
| Status | Message | Description |
|---|---|---|
| 200 | Success | Try-on image generated successfully. |
| 401 | Unauthorized | Invalid or missing API key. |
| 403 | Forbidden | License inactive or expired. |
| 429 | Quota Exceeded | Monthly limit reached. |
| 400 | Bad Request | Invalid image or AI detection failed. |
| 500 | Server Error | Unexpected server failure. |
const fd = new FormData();
fd.append('PersonImage', personFile);
fd.append('ProductImage', productFile);
fetch('/api/v1/virtual-try-on/generate', {
method: 'POST',
headers: { 'X-API-KEY': 'your_key_here' },
body: fd
});