Skip to main content
POST
/
public
/
fitting-room
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"
  }'
{
  "jobId": "gen_xyz789abc",
  "message": "Generation job created successfully"
}
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

userImageId
string
required
The file ID from a previous image upload. This identifies which customer photo to use for the try-on.
productId
string
required
Shopify product ID in the format gid://shopify/Product/{id}. The product to try on.
variantId
string
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

jobId
string
required
Unique identifier for the generation job. Use this ID to check generation status and retrieve results.
message
string
required
Status message indicating whether the job was created successfully or why it was blocked.
code
string
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
{
  "jobId": "gen_xyz789abc",
  "message": "Generation job created successfully"
}

Generation Process

When you create a generation:
  1. Validation: The system validates that the user image exists and the product is available
  2. Quota Check: Checks if you have available credits/quota
  3. Job Creation: Creates an asynchronous generation job
  4. Product Image Fetching: Automatically fetches the appropriate product image
  5. 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

{
  "message": "User image not found"
}

Next Steps

After creating a generation job:
  1. Store the jobId from the response
  2. Poll the Generation Status endpoint every 2 seconds
  3. Display the result when status is COMPLETED
  4. Handle errors if status is FAILED