# Virtual Try-On API

> Use the WEARFITS Virtual Fitting endpoint to apply garments and shoes onto reusable digital twins.

- POST /api/v1/virtual-fitting is the recommended endpoint for production try-on flows.
- Inputs support garment packshots plus optional on-model references for fit and drape guidance.
- Result caching and digital twin caching reduce latency for repeat customer sessions.

## How to apply a garment to a digital twin

1. **Reuse or create a twin** — Pass digitalTwinId to reuse a saved avatar, or body input to create one inline.
2. **Supply garments** — Send topGarment, bottomGarment, fullBodyGarment, or productImage as packshot URLs.
3. **Submit the fitting** — POST /api/v1/virtual-fitting and read the returned jobId and statusUrl.
4. **Read the result** — Poll GET /api/v1/jobs/{jobId} and render results[0].url when status is completed.

## Key questions

### Can the same customer avatar be reused?

Yes. Save the returned digitalTwinId and pass it in later requests to skip twin generation.

### Which product categories are supported?

Tops, bottoms, and full-body garments such as dresses or jumpsuits. Every virtual fitting request needs at least one of those, and shoes can be added on top of an outfit. Standalone footwear try-on is a separate pipeline: the shoe-3d endpoint generates a 3D shoe model and an AR shoe try-on.

### Does the API return synchronously?

Virtual fitting creates an asynchronous job. Poll GET /api/v1/jobs/{jobId} or use signed webhooks.

## Related pages

- [Home](https://api.wearfits.com/)
- [Digital Twin API](https://api.wearfits.com/digital-twin-api)
- [Shoe 3D API](https://api.wearfits.com/shoe-3d-api)
- [Glossary](https://api.wearfits.com/glossary)

## Reference

- OpenAPI 3.1 spec: https://api.wearfits.com/doc
- Swagger UI: https://api.wearfits.com/reference
- Agent context: https://api.wearfits.com/llms-full.txt
