# WEARFITS Shoe & Bag 3D Generation

Last updated: 2026-11-06.

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

POST /api/v1/shoe-3d converts 2D product photos into a 3D GLB asset and,
optionally, an AR try-on published to the WEARFITS viewer.

## Inputs and product types

- Provide images: an array of 1–10 public image URLs or base64 data URLs. Validation can select a suitable image; use clear product packshots.
- `options.productType`: `shoe` (default), `other` (bags/handbags), or `auto` (auto-detect).
- `options.longestSideCm` (bags/other only): the real length of the product's longest horizontal side (width or depth, never the height) in centimetres, 5–150 with 0.1 cm precision. The AR try-on shows the product at that size. Out-of-range values return 400 before a job is created. Omitted: the try-on keeps the model's own scale when it is plausible for a bag (between 10 and 100 cm across) and shows it at 40 cm otherwise. Ignored for shoes.
- `glbInput`: a public GLB URL or data URL skips 3D generation. Images may be omitted, but provide reference images for texture enhancement. Very dense models may be simplified before processing (best effort; not an enforced limit). Enhancement, smoothing and upload depend on options. The input size limit is 100 MB.

## Processing

The API prepares the product photos, generates the 3D model (with automatic
fallback to an alternate model), optionally enhances its texture and optionally
publishes it to WEARFITS AR.

## Options and results

For a single request, options.uploadToWearFits defaults to false. correctImage,
enhanceTexture and smoothNormals default to true; refineLogo and skipCache default
to false. genaiQuality defaults to high (fuller texture coverage, slower); default is faster.
pipelineVariant defaults to A; B is an opt-in beta. The models array accepts one
primary model; the supported primary/fallback chain is defined in /doc. A fallback
can change the actual model, so inspect requestedModel and model in results.

```json
{"images":["https://example.com/shoe.jpg"],"options":{"uploadToWearFits":true}}
```

Poll GET /api/v1/jobs/{jobId}. On completion, results[].url contains generated
assets; shoe3dModelResults contains per-model outcomes and enhancedGlbUrl when
available. Successful publication adds wearfitsTryOn.viewerUrl. AR upload may
fail while a usable GLB succeeds: inspect wearfitsError and per-model errors,
rather than assuming completed guarantees a viewer. Follow result expiresAt;
download assets you need to retain.

## Real size of a published bag

POST /api/v1/wearfits/models/{modelId}/size sets or removes the real size of a
published bag or other non-shoe model (`modelId` = `wearfitsTryOn.modelId`).
Body `{"longestSideCm":32.5}` sets it (5–150 cm), `{"longestSideCm":null}`
removes it (then the try-on keeps the model's own scale when it is plausible for a bag (between 10 and 100 cm across) and shows it at 40 cm otherwise); the call is idempotent. It acts as the account behind your
credential and changes only models that account owns: 403 `FORBIDDEN` for
another account's model, 403 `MODEL_PROTECTED`, 404 `MODEL_NOT_FOUND`, 400
`UNSUPPORTED_OBJECT_TYPE` for a shoe, 400 `VALIDATION_ERROR` for a bad body,
and 503 `WEARFITS_UNAVAILABLE` when temporarily unavailable (retry later).

## Caching

Identical submissions can reuse an existing job within 30 minutes (not for
options.productType other: every bag submission creates its own job). Geometry and
texture assets are cached for 30 days across API keys; WEARFITS viewer links are
scoped to the submitting ownership. A different owner can reuse geometry but
requires its own publication. options.skipCache bypasses reuse and refreshes
caches. Custom glbInput assets are not stored in the geometry/link cache.

## Reference

- OpenAPI 3.1 spec: https://api.wearfits.com/doc
- Shoe 3D overview: https://api.wearfits.com/shoe-3d-api
- AR shoe try-on (main site): https://wearfits.com/product/shoes
