OPTION 5 — REST API

JSON in. Personalized image out.

▶ View customer demo →

For retailers, agencies, and platforms who want full control over the UI. Hit one endpoint with the shopper's photo + a product image URL — get back a personalized try-on image.

Endpoint

POST https://www.fitmymirror.com/api/public/widget/tryon
Content-Type: application/json

{
  "shopperPhoto": "data:image/jpeg;base64,..."  // or https URL
  "clothingUrl":  "https://shop.example.com/img/blue-tee.jpg",
  "itemName":     "Blue Tee"   // optional, used for prompting
}

Response

200 OK
{ "image": "data:image/jpeg;base64,..."  // try-on result, ~1024px }

4xx / 5xx
{ "error": "Try-on failed: <reason>" }

curl

curl -X POST https://www.fitmymirror.com/api/public/widget/tryon \
  -H 'Content-Type: application/json' \
  -d '{
    "shopperPhoto": "https://example.com/me.jpg",
    "clothingUrl":  "https://shop.example.com/blue-tee.jpg",
    "itemName":     "Blue Tee"
  }'

Node / TypeScript

const res = await fetch("https://www.fitmymirror.com/api/public/widget/tryon", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    shopperPhoto: shopperPhotoDataUrl,
    clothingUrl:  product.imageUrl,
    itemName:     product.name,
  }),
});
const { image, error } = await res.json();
if (!res.ok) throw new Error(error);
return image; // render anywhere

Coming soon (B2B contracts)