Error Reference
Error Reference
Section titled “Error Reference”All error responses return JSON with an error field describing the problem:
{ "error": "Human-readable description of what went wrong"}Error Codes
Section titled “Error Codes”400 — Bad Request
Section titled “400 — Bad Request”The request was missing required input data or contained invalid values.
Common causes:
- The
inputsfield is missing from the request body - A required input field is not present
What to do: Check that your request body includes all required fields. Confirm the expected fields with your administrator.
401 — Unauthorized
Section titled “401 — Unauthorized”The API key is missing, invalid, expired, or inactive.
Common causes:
- No
AuthorizationorX-API-Keyheader included - Key format is wrong (should start with
ila_) - Key has been disabled or expired by your administrator
What to do: Verify your API key is correct and active. Contact your administrator if the key needs to be reissued.
403 — Forbidden
Section titled “403 — Forbidden”Your API key is valid but is not authorized to access the requested product.
Common causes:
- Wrong product slug for the API key you’re using
- Key was not set up with access to this product
What to do: Confirm the correct product slug with your administrator.
404 — Not Found
Section titled “404 — Not Found”The product slug does not exist or the product is inactive.
Common causes:
- Typo in the product slug
- Product has been deactivated
What to do: Verify the exact product slug with your administrator.
429 — Too Many Requests
Section titled “429 — Too Many Requests”Your API key has exceeded its rate limit (per-minute or per-day).
Response headers:
Retry-After: 30X-RateLimit-Limit: 60X-RateLimit-Remaining: 0What to do: Wait for the number of seconds specified in the Retry-After header before retrying. See Rate Limits for details.
500 — Internal Server Error
Section titled “500 — Internal Server Error”An unexpected error occurred on the server.
What to do: If this persists, contact your administrator with the timestamp of the failed request.
502 — Bad Gateway
Section titled “502 — Bad Gateway”The upstream service returned an authentication error. This is a configuration issue, not a problem with your request.
What to do: Contact your administrator — the API configuration needs to be updated.
503 — Service Unavailable
Section titled “503 — Service Unavailable”The upstream service is temporarily unavailable.
What to do: Retry the request with exponential backoff. If the issue persists, contact your administrator.
Retry Strategy
Section titled “Retry Strategy”For transient errors (429, 503), use exponential backoff:
async function callWithRetry(inputs, maxRetries = 3) { for (let attempt = 0; attempt < maxRetries; attempt++) { const response = await fetch(`${BASE_URL}/api/${PRODUCT_SLUG}`, { method: 'POST', headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ inputs }), })
if (response.status === 429) { const retryAfter = parseInt(response.headers.get('Retry-After') || '60') await new Promise(resolve => setTimeout(resolve, retryAfter * 1000)) continue }
if (response.status === 503 && attempt < maxRetries - 1) { await new Promise(resolve => setTimeout(resolve, Math.pow(2, attempt) * 1000)) continue }
return response }}Summary Table
Section titled “Summary Table”| Code | Name | Retryable | Action |
|---|---|---|---|
400 | Bad Request | No | Fix your request body |
401 | Unauthorized | No | Check your API key |
403 | Forbidden | No | Contact administrator |
404 | Not Found | No | Verify product slug |
429 | Too Many Requests | Yes | Wait for Retry-After seconds |
500 | Internal Server Error | Sometimes | Retry once; contact support if persistent |
502 | Bad Gateway | No | Contact administrator |
503 | Service Unavailable | Yes | Retry with exponential backoff |