Skip to main content
The pattern to use in production:
  1. Upload the customer photo once, reuse the imageId.
  2. Reference the product by externalId. It’s faster: the product is already analyzed.
  3. On PRODUCT_NOT_FOUND (first time, or expired after 15 unused days), resend the full product.
tryon.py

Tips

  • Product images as URLs are cached. Uploaded bytes are sent again on every inline call: send them once, then reference by externalId.
  • One-shot products (no externalId) suit single use. They’re deleted after 7 unused days.
  • Updating a product: send it inline again with the new fields.
TypeScript version: the SDK and the Next.js example app.