Errors
Errors use a consistent JSON shape and standard HTTP status codes:
{ "error": { "code": "insufficient_tokens", "message": "Job costs 1200 tokens; balance is 300." } }| Status | Code | Meaning |
|---|---|---|
| 400 | bad_request |
Malformed request |
| 401 | unauthorized |
Missing / invalid key |
| 402 | insufficient_tokens |
Balance below the job quote |
| 403 | forbidden |
Key lacks permission |
| 404 | not_found |
Unknown job id, or not yours |
| 409 | conflict |
e.g. cancelling a terminal job |
| 413 | payload_too_large |
Request body over the size limit |
| 422 | unprocessable |
Body failed validation (e.g. script too short) |
| 429 | rate_limit_exceeded |
Slow down; see X-RateLimit-* |
| 500 | internal |
Unexpected server error |
Every response carries an X-Request-Id — include it when contacting support.