Skip to main content
POST
Upload a customer photo using a 3-step signed-URL flow. Returns a fileId used when creating try-ons.
On JavaScript, the @genlook/storefront SDK is the recommended integration: it calls this endpoint for you, along with the rest of the try-on flow.
With the SDK, one call runs the whole 3-step flow below, validating the photo first:
SDK

Overview


Step 1: Prepare Upload

No body required.

Response

string
required
Short-lived signed URL for uploading directly to cloud storage.
string
required
Opaque key identifying this upload. Pass it in the path of the complete step.

Step 2: Upload to Storage

PUT the raw file directly to the signed URL. This goes to cloud storage, not through the Genlook API.
Send raw bytes with Content-Type: application/octet-stream. Supported formats: JPEG, PNG, WebP, HEIC/HEIF. Max size: 20 MB.

Step 3: Complete Upload

Notify the backend to validate and process the image. Processing includes HEIC-to-JPEG conversion, HDR-to-SDR, and auto-crop to 4:5 aspect ratio centered on the detected person.
string
required
The uploadKey from Step 1. It can contain slashes, so URL-encode it before putting it in the path.

Response

string
required
Unique identifier for the processed file. Use this when creating try-ons. Treat it as an opaque string and pass it back exactly as received.
string
required
Signed URL for previewing the processed image.
string
required
Status message.