Uwe for stores

A fitting room on every product page.

Shoppers add a photo and their measurements, see their size against your size chart, and see the piece on them — without leaving your store. Add the button in five minutes, or build your own flow on the API.

01 · Keys

Get your keys

Each key pair has a secret key (dru_sk_…) for your server and a publishable key (dru_pk_…) for the button, which only works on the domains you list.

Loading your keys…

02 · Button

Add the try-on button

Add the script once, then mark any element with data-dru-tryon. Leave it empty and Uwe draws a button for you.

  • data-product-image: a public product photo, front view on a plain background works best.
  • data-slot: top, bottom, outer, dress or shoes.
  • data-size-chart (optional): your chart, so “Find my size” uses your sizes. Without it Uwe uses a standard chart.
  • data-unit: cm or in for the chart. data-family: men or women.
  • Add data-dru-theme="dark" on the script for a dark fitting room.

Listen for dru:size, dru:completed and dru:error on the button to pre-select the size or track conversions.

HTML
<script src="https://uwe.style/v1/dru.js" data-dru-key="dru_pk_…" async></script>

<button data-dru-tryon
        data-product-image="https://your-store.com/images/oxford-shirt.jpg"
        data-product-name="Oxford Shirt"
        data-slot="top"
        data-unit="cm"
        data-size-chart='{"rows":{"S":{"chest":[88,94]},"M":{"chest":[95,100]},"L":{"chest":[101,106]}}}'>
  Try it on
</button>
Pre-select the recommended size
document.addEventListener('dru:size', (event) => {
  const size = event.detail.size;          // e.g. "M"
  document.querySelector(`[data-size="${size}"]`)?.click();
});

03 · API

API reference

Base URL https://uwe.style/api/v1. Send your key as Authorization: Bearer …. Requests and responses are JSON (try-on and scan also take multipart uploads). Lengths are in centimetres unless you say "unit": "in".

EndpointKeysCostWhat it does
POST /api/v1/lookbookSecret or publishableMeteredA selfie or full-body photo in; a new studio, runway or street photo of the shopper wearing the pieces.
POST /api/v1/tryonSecret or publishableMeteredDress a shopper’s photo in one or more garments.
POST /api/v1/fitSecret or publishableFreeMeasurements + size chart in, recommended size and per-size verdicts out.
POST /api/v1/size-chartSecretFreeRead the size table from a product page URL or its HTML.
POST /api/v1/scanSecretMeteredList the clothes, shoes and accessories in a photo.
GET /api/v1/meSecret or publishableFreeYour store, key and this month’s usage.

Try-on

person_image and each garment image can be an https URL or a data URI (up to 10 MB each, 4 garments). Garments are put on in a sensible order: bottoms, tops, then outerwear. Shoes come back in skipped. Takes about 15–25 seconds per garment; image_url is hosted for a limited time, so copy it if you keep it.

Request
curl https://uwe.style/api/v1/tryon \
  -H "Authorization: Bearer $DRU_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "person_image": "https://your-store.com/uploads/shopper.jpg",
    "garments": [
      { "image": "https://your-store.com/images/oxford-shirt.jpg", "slot": "top", "name": "Oxford Shirt" }
    ]
  }'
Response
{
  "image_url": "https://cdn.…/output.jpeg",
  "skipped": [],
  "took_ms": 17400
}

Lookbook

A new photo of the shopper wearing the pieces, in a fresh pose: style is studio, runway or street. A selfie works. Send a higher variation for another pose, and the shopper’s body (height in cm, weight in kg) and family so the photo matches their build. Takes about 15–20 seconds and counts as one try-on.

To show a particular size, add size and fit to the garment: fit is that size’s measurements from /api/v1/fit as { measure, verdict, difference }. A roomy L then looks roomy, a snug S looks snug.

Request
curl https://uwe.style/api/v1/lookbook \
  -H "Authorization: Bearer $DRU_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "person_image": "https://your-store.com/uploads/selfie.jpg",
    "garments": [{
      "image": "https://your-store.com/images/oxford-shirt.jpg",
      "name": "Oxford Shirt",
      "size": "L",
      "fit": [{ "measure": "chest", "verdict": "roomy", "difference": -3.5 }]
    }],
    "style": "studio",
    "body": { "height": 180, "weight": 75 }
  }'
Response
{
  "image_url": "https://cdn.…/output.jpeg",
  "took_ms": 16200
}

Fit check

slot is top, bottom, outer or shoes. Rows take a range [min, max] or a single number per measure: chest, waist, hips, inseam, foot. Leave out size_chart to use Uwe’s standard chart for family. Send size to get that size’s verdict in considered.

Request
curl https://uwe.style/api/v1/fit \
  -H "Authorization: Bearer $DRU_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "unit": "cm",
    "body": { "height": 180, "chest": 98, "waist": 84 },
    "garment": {
      "slot": "top",
      "size": "M",
      "size_chart": { "rows": { "S": { "chest": [88, 94] }, "M": { "chest": [95, 100] }, "L": { "chest": [101, 106] } } }
    }
  }'
Response (shortened)
{
  "recommended_size": "M",
  "chart_source": "store",
  "unit": "cm",
  "considered": {
    "size": "M",
    "overall": "fits",
    "measurements": [
      { "measure": "chest", "verdict": "fits", "difference_cm": 0, "note": "Fits", "body_cm": 98, "garment_cm": [95, 100] }
    ]
  },
  "sizes": [ { "size": "S", "overall": "tight", … }, … ]
}

Size chart & scan

size-chart reads the size table from a public product page (or HTML you send) and returns it in the shape fit takes. scan lists what’s in a photo, each item with a slot (including accessory), a one-word kind, a name and a colour.

Size chart
curl https://uwe.style/api/v1/size-chart \
  -H "Authorization: Bearer $DRU_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://your-store.com/products/oxford-shirt" }'
Scan
curl https://uwe.style/api/v1/scan \
  -H "Authorization: Bearer $DRU_SECRET_KEY" \
  -F "image=@outfit.jpg"

{ "outfit_name": "Red Plaid Casual",
  "items": [ { "slot": "top", "kind": "Shirt", "name": "Plaid Flannel Shirt", "colour": "red", "details": "…" } ] }

04 · Errors & limits

Errors and limits

Errors come back as { "error": { "code", "message" } }. Messages are written for shoppers, so you can show them as they are. Each store gets 100 try-ons and 300 scans a month; fit checks and size charts are free. Talk to us for more.

401INVALID_API_KEYMissing, malformed or revoked key.
403ORIGIN_NOT_ALLOWEDA publishable key used from a domain not on its list.
403SECRET_KEY_IN_BROWSERA secret key sent from a browser. Move it to your server.
403SECRET_KEY_REQUIREDThis endpoint only takes the secret key.
400INVALID_REQUEST · INVALID_SLOT · MEASUREMENTS_REQUIRED · …Something in the request needs fixing; the message says what.
429MONTHLY_LIMIT_REACHEDThe store has used this month’s allowance.
502 / 503TRYON_FAILED · TRYON_UNAVAILABLETry again shortly; the message is safe to show shoppers.

Privacy: shopper photos are sent to our image model for the try-on and are not kept by Uwe. Tell shoppers in your privacy notice that a fitting partner processes the photo they add.

Uwe for stores — try-on and fit API