curl -X POST "https://api.genlook.app/tryon/v1/products" \
-H "x-api-key: gk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"externalId": "shirt-42",
"title": "Red cotton t-shirt",
"description": "Regular fit crew neck tee, short sleeves, hip length.",
"images": [
{ "source": { "url": "https://cdn.example.com/front.jpg" } },
{ "source": { "url": "https://cdn.example.com/back.jpg" } }
]
}'
curl -X POST "https://api.genlook.app/tryon/v1/products" \
-H "x-api-key: gk_your_api_key" \
-F 'data={
"externalId": "shirt-42",
"title": "Red cotton t-shirt",
"images": [{ "source": { "fileKey": "front" } }]
}' \
-F "front=@front.jpg"
curl -X POST "https://api.genlook.app/tryon/v1/products" \
-H "x-api-key: gk_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "externalId": "shirt-42", "title": "Red cotton t-shirt, restocked" }'
const product = await client.products.upsert({
externalId: "shirt-42",
title: "Red cotton t-shirt",
description: "Regular fit crew neck tee, short sleeves, hip length.",
images: [{ source: { url: "https://cdn.example.com/front.jpg" } }],
// validForDays: 90,
});
{
"externalId": "shirt-42",
"title": "Red cotton t-shirt",
"description": "Regular fit crew neck tee, short sleeves, hip length.",
"images": [{ "sourceUrl": "https://cdn.example.com/front.jpg", "classifications": {}, "order": 0 }],
"metadata": null,
"validForDays": null,
"expiresAt": null,
"lastUsedAt": null,
"createdAt": "2026-05-13T10:00:00.000Z",
"updatedAt": "2026-05-13T10:00:00.000Z"
}
{
"code": "PRODUCT_IMAGES_REQUIRED",
"message": "Product 'shirt-42' does not exist yet; at least one image is required to create it.",
"status": 400
}
{
"code": "RESERVED_EXTERNAL_ID",
"message": "externalId '_anon_foo' is reserved: the '_anon_' prefix is for server-generated IDs.",
"status": 409
}
Products (optional)
Upsert Product (optional)
Create or update a product outside a try-on. Most integrations don’t need it.
POST
/
tryon
/
v1
/
products
curl -X POST "https://api.genlook.app/tryon/v1/products" \
-H "x-api-key: gk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"externalId": "shirt-42",
"title": "Red cotton t-shirt",
"description": "Regular fit crew neck tee, short sleeves, hip length.",
"images": [
{ "source": { "url": "https://cdn.example.com/front.jpg" } },
{ "source": { "url": "https://cdn.example.com/back.jpg" } }
]
}'
curl -X POST "https://api.genlook.app/tryon/v1/products" \
-H "x-api-key: gk_your_api_key" \
-F 'data={
"externalId": "shirt-42",
"title": "Red cotton t-shirt",
"images": [{ "source": { "fileKey": "front" } }]
}' \
-F "front=@front.jpg"
curl -X POST "https://api.genlook.app/tryon/v1/products" \
-H "x-api-key: gk_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "externalId": "shirt-42", "title": "Red cotton t-shirt, restocked" }'
const product = await client.products.upsert({
externalId: "shirt-42",
title: "Red cotton t-shirt",
description: "Regular fit crew neck tee, short sleeves, hip length.",
images: [{ source: { url: "https://cdn.example.com/front.jpg" } }],
// validForDays: 90,
});
{
"externalId": "shirt-42",
"title": "Red cotton t-shirt",
"description": "Regular fit crew neck tee, short sleeves, hip length.",
"images": [{ "sourceUrl": "https://cdn.example.com/front.jpg", "classifications": {}, "order": 0 }],
"metadata": null,
"validForDays": null,
"expiresAt": null,
"lastUsedAt": null,
"createdAt": "2026-05-13T10:00:00.000Z",
"updatedAt": "2026-05-13T10:00:00.000Z"
}
{
"code": "PRODUCT_IMAGES_REQUIRED",
"message": "Product 'shirt-42' does not exist yet; at least one image is required to create it.",
"status": 400
}
{
"code": "RESERVED_EXTERNAL_ID",
"message": "externalId '_anon_foo' is reserved: the '_anon_' prefix is for server-generated IDs.",
"status": 409
}
Optional. Create Try-On already creates products inline. Use this endpoint
only to register products ahead of time, keep them forever, or list them in
GET /products.externalId. Products created here never expire unless you set validForDays. On update, omitted fields keep their value.
The product is analyzed right away, so its first try-on skips that step and returns faster. Registering products before shoppers or users reach them is the quickest setup.
Send JSON, or multipart/form-data with the JSON in a data field when you upload image bytes.
Body
string
required
Your product ID. Can’t start with
_anon_.string
Product name. Send the full title: it helps the AI.
string
Product description (cut, fit, length). Helps the AI.
array
[{ source: { url } }] or [{ source: { fileKey } }]. Required on create. Replaces the whole list on update.integer | null
default:"null"
Lifetime after last use, 1 to 365 days.
null keeps it forever.object
Any JSON, returned on
GET /products/:externalId.curl -X POST "https://api.genlook.app/tryon/v1/products" \
-H "x-api-key: gk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"externalId": "shirt-42",
"title": "Red cotton t-shirt",
"description": "Regular fit crew neck tee, short sleeves, hip length.",
"images": [
{ "source": { "url": "https://cdn.example.com/front.jpg" } },
{ "source": { "url": "https://cdn.example.com/back.jpg" } }
]
}'
curl -X POST "https://api.genlook.app/tryon/v1/products" \
-H "x-api-key: gk_your_api_key" \
-F 'data={
"externalId": "shirt-42",
"title": "Red cotton t-shirt",
"images": [{ "source": { "fileKey": "front" } }]
}' \
-F "front=@front.jpg"
curl -X POST "https://api.genlook.app/tryon/v1/products" \
-H "x-api-key: gk_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "externalId": "shirt-42", "title": "Red cotton t-shirt, restocked" }'
const product = await client.products.upsert({
externalId: "shirt-42",
title: "Red cotton t-shirt",
description: "Regular fit crew neck tee, short sleeves, hip length.",
images: [{ source: { url: "https://cdn.example.com/front.jpg" } }],
// validForDays: 90,
});
Response
The product. Fields are listed on List, Get & Delete Products.{
"externalId": "shirt-42",
"title": "Red cotton t-shirt",
"description": "Regular fit crew neck tee, short sleeves, hip length.",
"images": [{ "sourceUrl": "https://cdn.example.com/front.jpg", "classifications": {}, "order": 0 }],
"metadata": null,
"validForDays": null,
"expiresAt": null,
"lastUsedAt": null,
"createdAt": "2026-05-13T10:00:00.000Z",
"updatedAt": "2026-05-13T10:00:00.000Z"
}
{
"code": "PRODUCT_IMAGES_REQUIRED",
"message": "Product 'shirt-42' does not exist yet; at least one image is required to create it.",
"status": 400
}
{
"code": "RESERVED_EXTERNAL_ID",
"message": "externalId '_anon_foo' is reserved: the '_anon_' prefix is for server-generated IDs.",
"status": 409
}
Was this page helpful?

