Core API
Errors
Errors are JSON with a standard HTTP status. Failed jobs are never billed.
Error shape#
4xx / 5xx
{ "error": "invalid or missing API key" }Status codes#
| Field | Type | Description |
|---|---|---|
| 400 | Bad Request | Malformed body, missing model, or an engine that isn’t available. |
| 401 | Unauthorized | Missing or invalid API key (or the key was revoked). |
| 402 | Payment Required | The key reached its monthly spend cap. Raise it in Settings → API keys. |
| 404 | Not Found | Task id doesn’t exist, or isn’t owned by this key’s account. |
| 502 | Bad Gateway | The upstream engine failed to accept or complete the job. Not billed. |
| 503 | Unavailable | The service isn’t configured to serve this request right now. |
A job that fails after it started is reported as a task with status: "failed" and an error field — and costs nothing.
