curl -X POST "https://api.genlook.app/tryon/v1/images/upload" \
-H "x-api-key: gk_your_api_key" \
-F "file=@customer.jpg"
curl -X POST "https://api.genlook.app/tryon/v1/images/upload" \
-H "x-api-key: gk_your_api_key" \
-F "file=@customer.jpg" \
-F "crop=false"
with open("customer.jpg", "rb") as f:
r = requests.post(
"https://api.genlook.app/tryon/v1/images/upload",
headers={"x-api-key": API_KEY},
files={"file": ("customer.jpg", f, "image/jpeg")},
)
image_id = r.json()["imageId"]
const { imageId } = await client.images.upload(await readFile("./customer.jpg"), {
mimeType: "image/jpeg",
// crop: false,
// customerId: "user-123", // API field externalUserId
// retentionDays: 7, // API field keepForDays
});
{
"imageId": "ephemeral/customer/ttl-7d/acc_1a2b3c/20260708-9f86d081.jpeg",
"imageUrl": "https://storage.googleapis.com/..."
}
{
"code": "UNSUPPORTED_IMAGE_TYPE",
"message": "Unsupported image format: accepted formats are JPEG, PNG, WebP, and HEIC.",
"status": 400
}
Try-On
Upload Customer Image
Upload a customer photo once, reuse the imageId for every try-on.
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.jpg"
curl -X POST "https://api.genlook.app/tryon/v1/images/upload" \
-H "x-api-key: gk_your_api_key" \
-F "file=@customer.jpg" \
-F "crop=false"
with open("customer.jpg", "rb") as f:
r = requests.post(
"https://api.genlook.app/tryon/v1/images/upload",
headers={"x-api-key": API_KEY},
files={"file": ("customer.jpg", f, "image/jpeg")},
)
image_id = r.json()["imageId"]
const { imageId } = await client.images.upload(await readFile("./customer.jpg"), {
mimeType: "image/jpeg",
// crop: false,
// customerId: "user-123", // API field externalUserId
// retentionDays: 7, // API field keepForDays
});
{
"imageId": "ephemeral/customer/ttl-7d/acc_1a2b3c/20260708-9f86d081.jpeg",
"imageUrl": "https://storage.googleapis.com/..."
}
{
"code": "UNSUPPORTED_IMAGE_TYPE",
"message": "Unsupported image format: accepted formats are JPEG, PNG, WebP, and HEIC.",
"status": 400
}
Uploads a customer photo and returns an
imageId. Pass it to Create Try-On as person.image.source.id, as many times as you want until it expires.
JPEG, PNG, WebP or HEIC. 10 MB max. Send as multipart/form-data.
Body
file
required
The customer photo.
boolean
default:"true"
Crop to 4:5 around the person. Set
false to keep the original framing.string
Your own user ID, for GDPR deletion. No PII.
integer
1, 3 or 7. The image is deleted after that. Defaults to your account setting (7 days).curl -X POST "https://api.genlook.app/tryon/v1/images/upload" \
-H "x-api-key: gk_your_api_key" \
-F "file=@customer.jpg"
curl -X POST "https://api.genlook.app/tryon/v1/images/upload" \
-H "x-api-key: gk_your_api_key" \
-F "file=@customer.jpg" \
-F "crop=false"
with open("customer.jpg", "rb") as f:
r = requests.post(
"https://api.genlook.app/tryon/v1/images/upload",
headers={"x-api-key": API_KEY},
files={"file": ("customer.jpg", f, "image/jpeg")},
)
image_id = r.json()["imageId"]
const { imageId } = await client.images.upload(await readFile("./customer.jpg"), {
mimeType: "image/jpeg",
// crop: false,
// customerId: "user-123", // API field externalUserId
// retentionDays: 7, // API field keepForDays
});
Response
string
required
Opaque token. Pass it back exactly as received.
string
required
Short-lived preview URL of the processed image.
{
"imageId": "ephemeral/customer/ttl-7d/acc_1a2b3c/20260708-9f86d081.jpeg",
"imageUrl": "https://storage.googleapis.com/..."
}
{
"code": "UNSUPPORTED_IMAGE_TYPE",
"message": "Unsupported image format: accepted formats are JPEG, PNG, WebP, and HEIC.",
"status": 400
}
Deprecated but still accepted:
customerId and retentionDays form fields.Was this page helpful?

