Virtual Try-On
Transfer any garment onto a person photo with realistic fit, drape and lighting. Upper, lower and full-body garments supported.
STYLR AI API
The same engine that powers the Stylr app — realistic garment try-on, background-free garment extraction, auto-labeling, visual product matching and outfit recommendations — behind a single REST API.
# 1. Start a try-on — returns a job (202 Accepted)
curl -X POST https://api.stylrapp.io/tryon \
-H "Authorization: Bearer $STYLR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tryOnPhotoId": "5f9b…",
"garmentId": "b31c…",
"garmentSource": "extracted"
}'CAPABILITIES
Transfer any garment onto a person photo with realistic fit, drape and lighting. Upper, lower and full-body garments supported.
Compose a full look — up to 8 garments — onto one photo in a single pass, from an explicit list or a saved outfit.
Turn a worn or messy photo into a clean, background-free flat-lay of just the garment, ready for catalog or try-on.
Return structured attributes — category, subtype, colors, material, pattern — from a single garment image, vocabulary-aware.
Detect the garments in an image and return shoppable product matches with links, powered by visual recognition + product search.
Get outfit picks from a wardrobe, ranked by weather, occasion and wear history — the daily-look engine behind the app.
QUICK START
Try-on runs asynchronously: kick off a job, then poll it until the render is ready.
# 1. Start a try-on — returns a job (202 Accepted)
curl -X POST https://api.stylrapp.io/tryon \
-H "Authorization: Bearer $STYLR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tryOnPhotoId": "5f9b…",
"garmentId": "b31c…",
"garmentSource": "extracted"
}'{
"id": "8ad2c0…",
"type": "tryon",
"status": "pending",
"outputs": []
}# 2. Poll the job until status is "done"
curl https://api.stylrapp.io/jobs/8ad2c0… \
-H "Authorization: Bearer $STYLR_API_KEY"
{
"id": "8ad2c0…",
"status": "done",
"outputs": [
{ "url": "https://cdn.stylrapp.io/…/output-0.jpg",
"small": "https://cdn.stylrapp.io/…/out-0-small.jpg",
"medium": "https://cdn.stylrapp.io/…/out-0-medium.jpg" }
]
}API REFERENCE
Base URL https://api.stylrapp.io · every request takes a Bearer token.
/tryonStart a single-garment try-on. Returns a job you poll for the result.
tryOnPhotoIduuidreqgarmentIduuidreqgarmentSource"uploaded" | "extracted"optReturns · 202 Accepted — a job object (status: pending).
/tryon/outfitTry a full outfit (multiple garments) on one photo in a single pass.
tryOnPhotoIduuidreqgarmentIdsuuid[]optoutfitIduuidoptReturns · 202 Accepted — a job object. Provide garmentIds or outfitId.
/jobs/{id}Poll a try-on job until status is done, then read outputs[].
iduuidreqReturns · 200 — job with status and outputs: [{ url, small, medium }].
/garments/{id}/extractExtract a clean, background-free flat-lay from a garment photo.
iduuidreqpromptstringoptReturns · 200 — { ok: true }. Poll the garment for extractedUrl.
/garments/{id}/labelAI-label a garment into structured, vocabulary-aware attributes.
iduuidreqReturns · 200 — the garment with a structured labels object.
/shop-the-lookDetect garments in an image and return shoppable product matches.
garmentIduuidreqReturns · 200 — { imageUrl, garmentCount, results: [{ garment, query, products }] }.
/recommendRecommend outfits from a wardrobe by weather, occasion and history.
latnumberoptlongnumberoptdayOffsetnumberoptReturns · 200 — recommended outfits with the garments and reasoning.
HOW IT BEHAVES
Auth
Bearer token on every request
Try-on / extraction
Async — 202 + poll GET /jobs/{id}
Input images
JPEG, PNG or WebP via HTTPS URL
Outfit try-on
Up to 8 garments per request
Output
Rehosted on Stylr CDN with small/medium variants
Footwear
Excluded from body try-on (422)
PRICING
Every AI call spends from a credit pool. Start free, refresh monthly, or go usage-based at scale.
120 credits / month
Try-on and extraction are asynchronous. You POST a request and get back a job with status: pending (HTTP 202). Poll GET /jobs/{id} until status is done, then read the outputs array — each output includes the full image plus small and medium variants rehosted on our CDN.
Send public HTTPS URLs to JPEG, PNG or WebP images — a person photo (the try-on target) and a garment image (the source). Extraction turns a worn or busy photo into a clean flat-lay you can reuse for try-on.
Yes. POST /tryon/outfit accepts up to 8 garments — an explicit garmentIds list or a saved outfitId — and renders them onto the photo in a single pass.
Every AI call spends credits: 2 for a try-on or extraction, 1 for recognition or labeling. Recommendations are free. Plans refresh your credit pool monthly; volume plans are usage-based.
Request an API key and start rendering looks today — or grab the Stylr app to see the engine in action.