Developer docs
Errors
The error envelope and every error code you can receive.
All errors share one shape:
json
{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Not enough credits.",
"details": { "required": 120, "balance": 40 },
"requestId": "a1b2c3"
}
}| HTTP | code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | Bad or missing field; message names it |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 402 | INSUFFICIENT_CREDITS | Balance lower than the job price |
| 403 | FORBIDDEN | Key cannot access this endpoint |
| 403 | ADULT_VERIFICATION_REQUIRED | Uncensored model without verification |
| 403 | NSFW_DISABLED | Verified, but uncensored models are off in Settings |
| 404 | NOT_FOUND | Unknown id |
| 409 | CONFLICT | State does not allow the action (e.g. cancel a running job) |
| 409 | ALREADY_SUBSCRIBED | Billing: already on that plan |
| 422 | PROMPT_BLOCKED | Prompt violates the content policy |
| 422 | CARD_REQUIRED | Billing: no card on file |
| 402 | PAYMENT_FAILED | Billing: card declined (details.code from the processor) |
| 423 | MODEL_UNAVAILABLE | Model paused or provider down |
| 429 | RATE_LIMITED | More than 60 requests/min on this key |
| 429 | CONCURRENCY_LIMIT | Too many running jobs for your plan (details.limit) |
| 502 | PROVIDER_ERROR | Upstream failed synchronously |
| 500 | INTERNAL | Our fault; include requestId when contacting support |
Retry 429 and 5xx with exponential backoff. Never retry 4xx without changing the request.