Errors and limits
Understand API errors and service limits.
Errors and service limits
Errors before response delivery use {error: {message, type, param, code}}. param is currently null. If a stream fails after headers arrive, the connection ends with a partial response; inspect request status before another completion.
| HTTP status | Meaning |
|---|---|
400 or 422 | Invalid JSON, unsupported fields, or invalid routing or generation settings. |
400 with code: "insufficient_balance" | Insufficient account USDC. X-Fossa-Needed-USDC gives the exact shortfall as a decimal string. |
401 | Missing, invalid, or revoked API key. |
403 | Operation unavailable for this account or service mode. |
404 | Request not found in this account. |
409 | Existing request ID or conflicting reservation ownership. Inspect request status. |
413 | Request exceeds the service payload limit. |
429 | Request-rate or concurrency limit reached. Keys share their account’s rate allowance. |
500 or 503 | Catalog, wallet, network, capacity, or provider unavailable; an existing reservation can still need recovery. |
Each key supports two active completions; each account supports four in total. Responses are bounded to 64 MiB and ten minutes, and can end earlier at the booking deadline. These limits do not change the booked usage caps. Check a request after any uncertain error or timeout; a new ID creates a separate paid request.