Skip to main content
Two API calls and you’re done: upload the customer photo, run the try-on. This guide shows the recommended pattern: pre-upload the customer image, ship the product inline. You don’t need a separate “create product” step.

Prerequisites

  • An API key: create an account on platform.genlook.app. New accounts start with 5 free credits, so you can run this whole guide without paying.
  • A product image (URL or local file)
  • A customer photo (JPEG, PNG, WebP, or HEIC, max 10 MB)

Step 1: Upload the customer photo

Pass 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 by externalId, or upsert one inline. The inline form is great for first-time products; the reference form is the cheap repeat-call shape.
The next time you generate against 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
The 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”: no POST /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-on handles that. The dedicated POST /products endpoint is an opt-in alternative for catalog-management cases (see Upsert Product).
  • No catalog sync. Products created inline keep refreshing for 15 days from their last use, so actively used products never expire.
  • No image bytes on every call. URLs are cached server-side; uploaded person photos live as imageId for reuse.

What’s next

  • TypeScript? The @genlook/api SDK 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 the Full Example for the ref-first / upsert-on-miss pattern, error handling, and what to do when a product expires.
  • All endpoints: see the API Reference in the left nav.
  • Try-On options: pre-uploaded vs URL vs multipart customer images, crop control, role hints, and anonymous one-shots, all on POST /try-on.