Create a virtual try-on generation job. This endpoint returns immediately with a job ID. The actual generation happens asynchronously - use the generation status endpoint to check progress.
Rate limit: 10 generations per week per users. If you would like to change this limit please send us an email
Request
The file ID from a previous image upload. This identifies which customer photo to use for the try-on.
Shopify product ID in the format gid://shopify/Product/{id}. The product to try on.
Shopify variant ID in the format gid://shopify/ProductVariant/{id}. Optional - if not provided, the default variant is used.
curl -X POST "https://your-store.myshopify.com/apps/proxy_genlook-x/public/fitting-room" \
-H "Content-Type: application/json" \
-d '{
"userImageId": "file_abc123xyz",
"productId": "gid://shopify/Product/456789",
"variantId": "gid://shopify/ProductVariant/123456"
}'
Response
Unique identifier for the generation job. Use this ID to check generation status and retrieve results.
Status message indicating whether the job was created successfully or why it was blocked.
Error code if generation was not allowed. Possible values:
QUOTA_EXCEEDED - Monthly generation quota has been reached
RATE_LIMIT_EXCEEDED - Too many generations in the time period
BILLING_NOT_ALLOWED - Billing issue or plan expired
Success
Quota Exceeded
Rate Limit Exceeded
Billing Issue
{
"jobId" : "gen_xyz789abc" ,
"message" : "Generation job created successfully"
}
Generation Process
When you create a generation:
Validation : The system validates that the user image exists and the product is available
Quota Check : Checks if you have available credits/quota
Job Creation : Creates an asynchronous generation job
Product Image Fetching : Automatically fetches the appropriate product image
AI Processing : The generation happens in the background
Always check the code field in the response. If it’s present, the generation was blocked and you should show an appropriate error message to the user.
The generation job is created immediately, but processing happens asynchronously. Use the generation status endpoint to poll for completion.
Error Responses
400 Bad Request
400 Bad Request
429 Too Many Requests
500 Internal Server Error
{
"message" : "User image not found"
}
Next Steps
After creating a generation job:
Store the jobId from the response
Poll the Generation Status endpoint every 2 seconds
Display the result when status is COMPLETED
Handle errors if status is FAILED