# Virtual Try-On, 3D Asset Generation & Estimated Size Fitting for Developers

> Build fashion commerce with the WEARFITS Virtual Try-On API: reusable digital twins, estimated size fitting, 3D product assets, and hosted storefront integration.

## Overview

- POST /api/v1/digital-twin pairs faceImage with a body photo, silhouette, clothing size, or body measurements to create a reusable avatar.
- Use POST /api/v1/virtual-fitting to create or reuse a digital twin, or POST /api/v1/tryon/clothing for photo try-on without generating a twin.
- Generate 3D shoe and handbag assets from shop product imagery, with optional AR upload and texture enhancement.
- Digital twins are cached for 30 days. Batch digitization accepts up to 500 products with up to 10 images per product.
- POST /api/v1/size-fitting provides estimated clothing size guidance from eligible measurements/clothing-size twins and merchant body-range charts; photo/direct twins are unavailable.
- For storefronts, the hosted iframe is the recommended full UI and size-fitting path; follow https://tryon.wearfits.com/docs/integration.html for READY/INIT and base products. Put the optional sizeChart sibling field on each WEARFITS_INIT.payload.products[] item; SET_PRODUCTS uses the same product shape. The chart requires version 1 with body basis, cm or in units, and height/chest/waist/hip/inseam ranges. Demo: https://tryon.wearfits.com/demo_tryon.html.

## API capabilities

### Twin-backed try-on

Product categories: CLOTHING & SHOES.

POST /api/v1/virtual-fitting

Create a digital twin from the body input or reuse a digitalTwinId, then apply clothing or shoes to it.

Output: Try-on image + reusable digital twin. [Read more](https://api.wearfits.com/virtual-try-on-api)

### Photo-to-photo try-on

Product categories: CLOTHING & SHOES.

POST /api/v1/tryon/clothing

Use personImages and productImage for a direct product preview, including a shoe. This endpoint never creates a new twin. For multiple shoe angles, use /api/v1/tryon/shoes with shoeImages.

Output: Try-on image from a person photo. [Read more](https://api.wearfits.com/reference)

### Reusable digital twins

Product categories: CLOTHING & SHOES.

POST /api/v1/digital-twin

Pair a face photo with a full-body photo, silhouette, clothing size, or body measurements. Twins are cached for 30 days; reuse the digitalTwinId for later try-ons.

Output: Avatar image + digitalTwinId. [Read more](https://api.wearfits.com/digital-twin-api)

### Estimated size fitting

Product categories: CLOTHING.

POST /api/v1/size-fitting

Compare a measurements/clothing-size twin with body-range size charts. Synchronous and non-billable; photo/direct twins are not eligible. Recommendations are estimates.

Output: Availability, fit scores + size recommendations. [Read more](https://api.wearfits.com/docs/virtual-try-on-api.md)

### Shoe & bag 3D

Product categories: SHOES & BAGS.

POST /api/v1/shoe-3d

Turn product photos into GLB assets. Add optional AI texture enhancement and WEARFITS upload for an AR viewer link. For bags, set options.productType to other or auto.

Output: GLB model + optional AR viewer link. [Read more](https://api.wearfits.com/shoe-3d-api)

### Catalog digitization

Product categories: SHOES & BAGS.

POST /api/v1/digitization/batches

Submit up to 500 products per request, with up to 10 images per product. Track asynchronous processing for a whole catalog.

Output: Batch progress + product results. [Read more](https://api.wearfits.com/docs/digitization.md)

## Choose an integration path

### Hosted iframe — Recommended for storefronts

WEARFITS hosts the complete try-on UI and size-fitting overlay. The storefront does not expose an API key. Follow READY/INIT and product handoff in the guide.

- [Integration guide](https://tryon.wearfits.com/docs/integration.html)
- [Open hosted demo](https://tryon.wearfits.com/demo_tryon.html)

### Direct API — Your backend. Your interface.

Build a custom experience with documented REST endpoints. Keep your API key private on your server, submit jobs, then poll or receive a signed webhook.

- [API reference](https://api.wearfits.com/reference)
- [OpenAPI JSON](https://api.wearfits.com/doc)

### Lightweight widget — A smaller modal integration

Load /widget/tryon.js for an API-backed modal. It does not include the hosted size-fitting overlay. Use a server-side proxy to keep your API key private.

- [Widget integration guide](https://api.wearfits.com/docs/shopify-modal.md)
- [Widget script](https://api.wearfits.com/widget/tryon.js)

### Hosted size-fitting contract

Embed https://tryon.wearfits.com/?sizeFitting=true. Put the optional sizeChart sibling field on each WEARFITS_INIT.payload.products[] item; SET_PRODUCTS uses the same product shape. The chart requires version: 1, basis: "body", unit: "cm" or "in", and body ranges for height, chest, waist, hip, or inseam. Size guidance requires a measurements/clothing-size twin with a stored body profile. A full-body/photo input can still produce try-on results but does not produce size guidance. For a direct integration, call POST /api/v1/size-fitting with the eligible digitalTwinId and chart after the twin job completes.

## Submit a photo try-on

Run on your backend. Replace example.com URLs with accessible images you are authorized to use, set WEARFITS_API_KEY, then use the returned jobId. The response below is an illustrative excerpt. Poll with the same API key that created the job.

```bash
curl https://api.wearfits.com/api/v1/tryon/clothing \
  -H "X-API-Key: $WEARFITS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "personImages": ["https://example.com/person.jpg"],
    "productImage": "https://example.com/shirt.jpg",
    "productCategory": "top"
  }'
```

Response excerpt:
```json
{
  "jobId": "YOUR_JOB_ID",
  "statusUrl": "https://api.wearfits.com/api/v1/jobs/YOUR_JOB_ID"
}
```

Poll:
```bash
curl https://api.wearfits.com/api/v1/jobs/YOUR_JOB_ID \
  -H "X-API-Key: $WEARFITS_API_KEY"
```

## API at a glance

- 30 days: Digital twin cache for repeat try-ons.
- 500 products: Maximum per digitization batch.
- 10 images: Maximum per batch product.
- OpenAPI 3.1: Published API contract.

### Reusable digital twins

Digital twins are cached for 30 days and can be reused across virtual-fitting requests using digitalTwinId.

### High-volume batch digitization

Submit up to 500 products per request with up to 10 images each, then track catalog processing through the batch API.

### Asynchronous jobs

Submit image and 3D generation work, then poll GET /api/v1/jobs/{id} with the creating API key or receive a signed webhook. Size fitting is synchronous.

### Signed webhooks

Webhooks use HMAC-SHA256. Ordinary API-key requests use SHA-256 of that key as the signing secret; account and storefront flows use account-derived ownership. Job and batch callbacks use different JSON signing formats; follow the integration playbook.

## Dashboard and account workspace

### API keys

Manage the credentials your backend uses to call WEARFITS services.

### Product catalog

Organize product images and 3D assets in your account workspace.

### Usage overview

Review account usage and allowances. Available features depend on your account.

[Open dashboard](https://dash.wearfits.com/)

## Plan your integration

### AI API usage

AI workflows

Plan for the try-on, digital twin, and 3D generation operations your application uses. Check the current commercial terms for your account.

### AR storefront integration

Storefront experiences

AR viewer and storefront plans are a separate product decision. Choose the catalog and interaction allowances that match your store.

### Integration support

Your implementation

Discuss your storefront, catalog size, and technical requirements with WEARFITS to choose an appropriate integration and access arrangement.

[Current pricing](https://wearfits.com/pricing) · [Contact WEARFITS](https://wearfits.com/contact?s=support)

## Related platform integrations

Explore separate WEARFITS platform integrations for live AR and Gaussian-splat experiences.

[AR shoes](https://wearfits.com/product/shoes) · [AR bags](https://wearfits.com/product/bags) · [3D product digitization](https://wearfits.com/lp2/onboarding/photo-to-3d/)

## Developer and AI agent resources

- [API reference](https://api.wearfits.com/reference): Explore operations and request schemas.
- [OpenAPI JSON](https://api.wearfits.com/doc): Generate clients from the published contract.
- [llms.txt](https://api.wearfits.com/llms.txt): Concise API context and link map.
- [Full agent context](https://api.wearfits.com/llms-full.txt): Expanded endpoint and integration guidance.
- [Integration playbooks](https://api.wearfits.com/skills): Skills for AI coding assistants.
- [Markdown overview](https://api.wearfits.com/index.md): This page in a retrieval-friendly format.
- [API summary](https://api.wearfits.com/docs/openapi-summary.md): A compact guide to the API surface.
- [Try-on guide](https://api.wearfits.com/docs/virtual-try-on-api.md): Twin-backed and direct photo workflows.
- [Digital twin guide](https://api.wearfits.com/docs/digital-twin.md): Inputs, reuse, and eligibility.
- [3D generation guide](https://api.wearfits.com/docs/shoe-3d.md): Product photos to GLB assets.
- [Batch guide](https://api.wearfits.com/docs/digitization.md): Digitize a product catalog.
- [Glossary](https://api.wearfits.com/glossary): Precise definitions of API concepts.
- [Frequently asked questions](https://api.wearfits.com/docs/faq.md): Answers to common integration questions.

## How to add WEARFITS virtual try-on

1. **Choose an integration path** — Use the hosted iframe for a storefront and the complete try-on plus size-fitting UI; use the direct API when you own the backend and UI; choose the lightweight widget only when its API-backed modal is sufficient.
2. **Start with the hosted guide** — Follow https://tryon.wearfits.com/docs/integration.html for READY/INIT and base product handoff. Put the optional sizeChart sibling field on each WEARFITS_INIT.payload.products[] item; SET_PRODUCTS uses the same product shape. The chart requires version 1, basis "body", unit "cm" or "in", and body ranges for height, chest, waist, hip, or inseam. Test https://tryon.wearfits.com/demo_tryon.html. The hosted storefront integration does not expose a service API key.
3. **Authenticate a direct integration** — For a custom backend and UI, check each operation and its security overrides at https://api.wearfits.com/doc and keep required credentials server-side.
4. **Run and track direct jobs** — Submit the documented digital-twin or virtual-fitting operation, then poll GET /api/v1/jobs/{jobId} or use a signed webhook until completion.

## Key questions

### Which endpoint should I use for virtual try-on?

POST /api/v1/virtual-fitting always creates or reuses a digital twin. POST /api/v1/tryon/clothing uses a person photo, or the image of an existing digitalTwinId, without generating a new twin. Both support productImage for a direct two-image try-on.

### Which digital twin inputs are supported, and how long are twins cached?

For POST /api/v1/digital-twin, supply faceImage plus exactly one body input: bodyPhotoUrl, silhouetteImage, clothingSize, or bodyMeasurements. Inline POST /api/v1/virtual-fitting photo mode requires faceImage plus photoUrl for new generation. Digital twins are cached for 30 days; save the completed job’s digitalTwinId to reuse the avatar.

### Does virtual try-on provide an exact size recommendation?

No. A try-on image is a visual preview. POST /api/v1/size-fitting separately returns estimated size guidance using an eligible measurements/clothing-size twin and merchant body-range charts. Photo/direct twins return available: false. This synchronous operation is non-billable.

### How do I receive generated results?

Generation runs asynchronously; cache hits may already be completed. Poll GET /api/v1/jobs/{jobId} with the same authentication ownership. Merchant and bare service keys must use the submitting key and support private-key-derived HMAC webhook verification. Prefer authenticated polling for account-attributed and storefront requests; see /llms-full.txt for callback limitations and verification.

### Can I generate 3D shoes and bags for AR?

POST /api/v1/shoe-3d generates GLB assets from product photos, with optional texture enhancement and WEARFITS AR upload. For bags, set options.productType to "other" or "auto". POST /api/v1/digitization/batches accepts up to 500 products and 10 images per product. Live AR is a separate viewer experience, not the photo try-on endpoint.

### Should I use the hosted iframe, REST API, or widget?

For storefronts, use the hosted iframe for the complete try-on and size-fitting UI. Use the REST API from your backend when building your own UI. The lightweight /widget/tryon.js modal does not include the hosted size-fitting overlay. Keep merchant and service API keys server-side; use a storefront token or backend proxy for browser integrations.

### Where is the machine-readable API specification?

The OpenAPI 3.1 specification is available at https://api.wearfits.com/doc, with an interactive reference at /reference. AI agents can start at /llms.txt, read /llms-full.txt, and use the Markdown guides under /docs/.

## Related pages

- [Virtual Try-On API](https://api.wearfits.com/virtual-try-on-api)
- [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
