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.

StatusMeaning
400Bad request — missing required field, unknown modelId, invalid option.
401Missing or revoked API key, or wrong header name (use x-api-key).
403Key doesn't have the required permission on the generations module.
404generationId not found (or not owned by your key's project).
429Rate limit exceeded — back off and retry.
500Server 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.