Widget API Reference
Create Generation
Request a virtual try-on generation combining a customer photo with a product
POST
Create a virtual try-on generation job. Returns immediately with a
jobId. Poll Generation Status for the result.
Request
string
required
The
fileId from a previous upload.string
required
Shopify product ID (
gid://shopify/Product/{id}).string
Shopify variant ID (
gid://shopify/ProductVariant/{id}). Uses the default variant if omitted.Response
string
required
Generation job ID. Use it to poll status.
string
required
Status message or reason the generation was blocked.
string
Present when generation was blocked:
QUOTA_EXCEEDED: Monthly quota reachedRATE_LIMIT_EXCEEDED: Too many requestsBILLING_NOT_ALLOWED: Plan expiredCREATION_FAILED: Job could not be created
Next Steps
- Store the
jobId - Poll Generation Status every 2 seconds
- Display the result when status is
COMPLETED

