This guide walks you through the full try-on flow: creating a product, uploading a customer photo, and generating a try-on result.
Prerequisites
- An API key (contact support@genlook.app)
- At least 1 credit on your account
- A product image URL (publicly accessible)
- A customer photo (JPEG, PNG, or WebP)
Step 1: Create a Product
Register your product with at least one image URL:
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": "product-001",
"title": "Classic Blue T-Shirt",
"description": "A comfortable cotton t-shirt in navy blue",
"imageUrls": ["https://example.com/images/blue-tshirt.jpg"]
}'
Save the externalId — you will use it to request try-ons.
Step 2: Upload a Customer Photo
Upload the customer’s photo as a multipart form:
curl -X POST "https://api.genlook.app/tryon/v1/images/upload" \
-H "x-api-key: gk_your_api_key" \
-F "file=@customer-photo.jpg"
Save the imageId from the response.
Step 3: Request a Try-On
Combine the product and customer photo:
curl -X POST "https://api.genlook.app/tryon/v1/try-on" \
-H "x-api-key: gk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"productId": "product-001",
"customerImageId": "your-image-id-from-step-2"
}'
Save the generationId from the response.
Step 4: Poll for the Result
The generation runs asynchronously. Poll every 2 seconds until the status is COMPLETED:
curl "https://api.genlook.app/tryon/v1/generations/your-generation-id" \
-H "x-api-key: gk_your_api_key"
When status is COMPLETED, the resultImageUrl field contains a signed URL to the try-on result image.
Result image URLs are temporary signed URLs. Download or display them promptly. You can re-fetch the generation to get a fresh URL.
Full Python Script
For a complete, runnable Python script that ties all steps together, see the Full Example (Python) page.