Try-On
Upload Customer Image
Upload a customer photo and get back an imageId you can reuse across generations.
POST
Upload a customer photo. The server validates the image, normalizes orientation and color, optionally applies a 4:5 person-aware crop, and stores the result. The returned
imageId is an opaque token — pass it to POST /try-on as person.image.source.id to run as many generations as you want against the same image.
This is the recommended path. The /try-on endpoint also accepts inline person.image.source.url and person.image.source.fileKey — convenient for one-shots, but they re-download/re-upload on every call. Pre-uploading is cheaper if you’ll run more than one generation against the same photo.
Supported formats: JPEG, PNG, WebP, HEIC. Max file size: 10 MB.
Request
Send asmultipart/form-data.
The customer photo.
Apply the 4:5 person-aware crop. Set to
false for studio shots, model previews, or any case where you want to preserve the original framing.Optional opaque identifier for the end user this image belongs to. No PII. When set, the upload is tracked server-side so you can later wipe it with
DELETE /customers/:customerId (GDPR / right-to-erasure — pass the same value as the path segment).Optional retention preset for this upload. One of
1, 3, 7. Defaults to your account’s configured customer-retention window. After this many days the underlying file is deleted automatically.The previous form fields
customerId and retentionDays are still accepted but deprecated (not a breaking change). Use externalUserId and keepForDays.Response
Opaque token. Pass to
POST /try-on as person.image.source.id.Temporary URL pointing to the processed image. Use it for previews; the URL expires after a short window, so re-fetch the upload response if you need a fresh one.
Retention
Uploaded images are auto-deleted afterkeepForDays (or your account’s default window if you omit it; default 7 days). The imageId is valid for that window — after that, you’ll need to re-upload. If you set externalUserId, the image can also be wiped on demand via DELETE /customers/:customerId.
