API reference
Errors & status codes
2 min read
All responses follow the same envelope. On success: { success: 1, data: ... }. On failure: { success: 0, message: "..." } plus an HTTP error code.
| Status | Meaning |
|---|---|
| 400 | Bad request — missing required field, unknown modelId, invalid option. |
| 401 | Missing or revoked API key, or wrong header name (use x-api-key). |
| 403 | Key doesn't have the required permission on the generations module. |
| 404 | generationId not found (or not owned by your key's project). |
| 429 | Rate limit exceeded — back off and retry. |
| 500 | Server error. Safe to retry the same request. |
Generation jobs that fail mid-run return HTTP 200 with status: "failed" and an errorMessage field — they're not protocol errors.