Skip to main content
POST
/
tryon
/
v1
/
images
/
upload
curl -X POST "https://api.genlook.app/tryon/v1/images/upload" \
  -H "x-api-key: gk_your_api_key" \
  -F "file=@customer-photo.jpg"
{
  "imageId": "img_9f86d081ab",
  "imageUrl": "https://storage.googleapis.com/..."
}

Documentation Index

Fetch the complete documentation index at: https://docs.genlook.app/docs/llms.txt

Use this file to discover all available pages before exploring further.

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 customer.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 customer.url and customer.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 as multipart/form-data.
file
file
required
The customer photo.
crop
boolean
default:"true"
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.
customerId
string
Optional opaque identifier for the end user this image belongs to. When set, the upload is tracked server-side so you can later wipe it with DELETE /customers/:customerId (GDPR / right-to-erasure).
retentionDays
integer
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.
curl -X POST "https://api.genlook.app/tryon/v1/images/upload" \
  -H "x-api-key: gk_your_api_key" \
  -F "file=@customer-photo.jpg"

Response

imageId
string
required
Opaque token. Pass to POST /try-on as customer.id.
imageUrl
string
required
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.
{
  "imageId": "img_9f86d081ab",
  "imageUrl": "https://storage.googleapis.com/..."
}

Retention

Uploaded images are auto-deleted after retentionDays (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 customerId, the image can also be wiped on demand via DELETE /customers/:customerId.