Errors and retries
Error response shape, common codes, rate limiting, and retry behavior.
Errors and retries
Error envelope
Failed Integration API responses use a consistent JSON body:
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable message",
"status": 400,
"details": [{ "path": "field", "message": "…" }]
}
}details is optional (used for validation issues). Always branch on error.code / HTTP status in clients; do not parse free-text message as a contract.
Common codes
| Code | Typical HTTP | When |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid API key |
VALIDATION_ERROR | 400 | Invalid or parameters failed validation |
NOT_FOUND | 404 | Resource missing (e.g. unknown generation id) |
INSUFFICIENT_CREDITS | 402 | Not enough credits to accept a generation |
RATE_LIMIT_EXCEEDED | 429 | Too many requests for this API key |
COOLDOWN_ACTIVE | 429 | Shopper cooldown (when using end_user_id) |
MONTHLY_LIMIT_EXCEEDED | 429 | Shopper monthly cap (when using end_user_id) |
FORBIDDEN | 403 | Not allowed (e.g. blocked account contexts) |
SERVICE_UNAVAILABLE | 503 | Temporary inability to complete the request |
INTERNAL_ERROR | 500 | Unexpected server error |
Additional codes may appear; treat unknown codes as generic failures.
Rate limiting
Integration routes are rate-limited per API key and split into separate buckets by HTTP method class:
- Read routes (
GET,HEAD): Sized for polling job status and fetching resources. - Write routes (
POST,DELETE, etc.): Separate tighter budget reserved for state-changing operations and GPU generation triggers.
Exhausting your budget on read routes will not block write requests, and vice versa. When limited, responses use RATE_LIMIT_EXCEEDED (HTTP 429) and include standard rate-limiting headers:
X-RateLimit-Limit— Max capacity for the route classX-RateLimit-Remaining— Capacity remaining in the current windowX-RateLimit-Reset— Unix timestamp (seconds) when the window resetsRetry-After— Exact seconds to wait before retrying
Published numeric limits are environment-specific and respect the response headers when present.
Generation processing
If try-on processing fails transiently, the platform may retry the job automatically. Do not assume a fixed number of processing attempts in client logic unless you have a separate public SLA.
When a job ends as failed, poll/webhook surfaces failed / generation.failed, and reserved credits are returned. See Credits.
Webhook delivery retries
Outbound webhooks to your URL are retried with backoff on network errors and most non-2xx responses. Certain client HTTP statuses stop delivery retries immediately (400, 401, 403, 404, 410, 501). Details: Webhooks and API Reference — Webhooks.
Client recommendations
- Retry idempotent GETs with backoff on
503/ network errors. - Do not blindly retry
POST /v1/generationswithout your own idempotency strategy — each accept reserves a credit. - For webhooks, process idempotently and return 2xx after durable accept.