Prerequisites
- An API key ( create account on app.genlook.app )
- At least 1 credit on your account
- A product image (URL or local file)
- A customer photo (JPEG, PNG, WebP, or HEIC, max 10 MB)
Step 1 — Upload the customer photo
crop=false in the form data if you want to keep the original framing (default is a 4:5 person-aware crop).
You get back an imageId. Reuse it across as many try-ons as you want against the same photo.
Step 2 — Run the try-on
Reference an existing product byexternalId, or upsert one inline. The inline form is great for first-time products; the reference form is the cheap repeat-call shape.
shirt-42, just send { products: [{ externalId: "shirt-42" }], person: { image: { source: { id } } } }. The server already has the product cached.
Step 3 — Poll for the result
Python
resultImageUrl is a temporary URL — download or display it promptly. You can re-fetch the generation later for a fresh URL.
What you skipped
You went straight from “I have an image” to “I have a try-on result” — noPOST /products call, no sync loop, no per-product housekeeping. Inline upsert is the default path for a reason:
- No separate “create product” step. The inline
products[]field in/try-onhandles that. The dedicatedPOST /productsendpoint is an opt-in alternative for catalog-management cases (see Upsert Product). - No catalog sync, no TTL anxiety. Products created inline keep refreshing for 15 days from their last use — keep using them and they stay alive forever.
- No image-bytes-on-every-call. URLs are cached server-side; uploaded person photos live as
imageIdfor reuse.
What’s next
- TypeScript? — the
@genlook/apiSDK wraps all three steps in typed methods with automatic retries and a one-line poller, and the Next.js example app is a clonable working integration. - Recommended workflow — see Full Example for the ref-first / upsert-on-change pattern, error handling, and what to do when a product expires.
- All endpoints — see the API Reference (left nav).
- Try-On options — pre-uploaded vs URL vs multipart customer images, crop control, role hints, anonymous one-shots, all on
POST /try-on.

