API

Try-On API

Two calls per generation. Async by default.

Base URL https://api.genfashion.app/tryon/v1. Every request carries x-api-key. Generation is asynchronous: POST /try-on returns immediately, and you poll or take a webhook.

Endpoints

MethodPathPurpose
POST/images/uploadUpload a person photo, get a reusable imageId
POST/try-onRun a generation. Returns generationId
GET/generations/:idPoll status; resultImageUrl when COMPLETED
GET/productsList products
DELETE/products/:externalIdDelete a product
GET/account/creditsRemaining credit balance
DELETE/customers/:externalUserIdRight-to-erasure for one end user

The products array

products takes exactly one item today; the array shape is reserved for multi-garment outfits. Each item works three ways.

ShapeBodyProduct lifetime
Reference{ "externalId": "shirt-42" }unchanged
Inline upsert{ externalId, title, description, images }15 days from last use
One-shot{ title, description, images } — no id7 days from last use

Every generation refreshes the timer, so an actively used product never expires.

The recommended integration is reference-first, upsert on miss: send the cheap reference form, and when you get PRODUCT_NOT_FOUND, retry with the full inline body. It is the whole integration in one pattern, and it self-heals when a TTL lapses.

The person image

person.image.source holds exactly one of:

FieldWhenTrade-off
idRecommended. From a prior uploadReusable; the only path that controls cropping
urlOne-shot from a remote URLRe-downloaded and re-cropped every call
fileKeyBytes in this multipart requestAlways 4:5 cropped

Output controls

FieldDefaultNotes
output.watermarktrueNo-op without a configured logo
output.aiLabelaccount defaultThe visible AI MODIFIED badge. Machine-readable provenance metadata is always written and is not configurable
output.keepForDaysaccount default1, 3 or 7
externalUserIdOpaque, no PII. The attribution and erasure key

Testing

Send a product whose title is mock and the generation runs the full pipeline but returns the person image unchanged — fast and deterministic. It still consumes a credit, which keeps the test path honest about cost.