# WEARFITS Virtual Try-On API

Base URL: https://api.wearfits.com

The recommended endpoint for production try-on flows is `POST /api/v1/virtual-fitting`.

## Minimal Request

```json
{
  "faceImage": "https://example.com/customer-face.jpg",
  "silhouetteImage": "https://example.com/customer-silhouette.png",
  "topGarment": "https://example.com/products/shirt.jpg",
  "bottomGarment": "https://example.com/products/pants.jpg",
  "gender": "female"
}
```

## Reuse A Digital Twin

```json
{
  "digitalTwinId": "saved-twin-id",
  "topGarment": "https://example.com/products/new-shirt.jpg"
}
```

## Garment Fields

- `topGarment`
- `bottomGarment`
- `fullBodyGarment`
- `shoes`
- `productImage`

Slot fields accept a URL string or an array of one or two URLs. The first URL is the product packshot. The second URL is an optional on-model reference image. At least one of topGarment, bottomGarment, fullBodyGarment, or productImage is required; `shoes` can only be added on top of an outfit.

For single-product try-on, send `productImage` with optional `productCategory` (`auto`, `top`, `bottom`, `full-body`, `shoe`). This explicitly opts into the direct 2-image path (no garment grid): the generation model receives only the person/digital twin and that product image. For standalone footwear with AR output, use the shoe-3d endpoint — it generates a 3D shoe model and an AR shoe try-on.

## Status

The endpoint returns a job. Poll `GET /api/v1/jobs/{jobId}` or subscribe through signed webhooks.

## OpenAPI

Machine-readable OpenAPI is available at https://api.wearfits.com/doc.
