Products (optional)
Upsert Product (optional)
Explicit catalog endpoint. Optional — most callers should use the inline form of POST /try-on instead.
POST
You probably don’t need this endpoint. The recommended path is the inline
product field on POST /try-on — same upsert semantics, one less call. Use this endpoint only when you want:- a lifetime TTL by default (inline upserts default to 15 days),
- the product listed in
GET /productsand visible in the dashboard, - to pre-register a catalog without immediately running a generation.
(account, externalId). The same endpoint handles both — pass full fields the first time, then partial fields to edit later. Products created via this endpoint default to lifetime (no expiry); pass validForDays to opt into a TTL.
Content types
application/json— when all images are URLs.multipart/form-data— when you ship image bytes inline. The JSON payload arrives in adataform field; eachimages[].fileKeyreferences a file field by name.
Request
Your product ID. Reused on subsequent calls to update the same product. Don’t start it with
_anon_ — that prefix is
reserved for IDs we generate.Optional. Helps the AI classify the product category more accurately. Preserved on updates if omitted.
Optional. Helps the AI classify the product category more accurately. Preserved on updates if omitted.
Replaces the full image list on update. Each entry has a
source object holding exactly one of:url— remote URL.fileKey— name of a multipart file field in the same request.
classifications object can sit alongside source.The old flat shape —
{ url } / { fileKey, classifications } with the fields at the top level — is still accepted but deprecated. Prefer { source: { url | fileKey }, classifications? }.How long the product lives between uses, in days. Defaults to
null (kept forever) when created via this endpoint.
Pass a number (1–365) to set a custom lifetime, null to opt back into “kept forever” on an existing product, or omit
to preserve the existing value.Free-form JSON returned on
GET /products/:externalId.Legacy alias for
images: [{ source: { url } }, …]. Still accepted; will be removed in the next major. Prefer images.
