Error Codes
The API returns standard HTTP status codes with structured error details.
| HTTP | Code | Description |
|---|---|---|
| 400 | IDEMPOTENCY_KEY_REQUIRED | Missing Idempotency-Key header |
| 401 | API_KEY_MISSING | Authorization header not provided |
| 401 | API_KEY_INVALID | API key not recognized |
| 402 | CREDITS_INSUFFICIENT | Not enough credits—top up in dashboard |
| 403 | SCOPE_DENIED | Key lacks required scope |
| 409 | IDEMPOTENCY_CONFLICT | Same idempotency key + different body |
| 409 | IDEMPOTENCY_IN_PROGRESS | Job already running |
| 500 | renderer_unavailable | Render engine temporarily down—retry |
{
"error": {
"code": "CREDITS_INSUFFICIENT",
"message": "Generation credits depleted."
}
}