Docs/Errors and recovery
Errors and recovery
Error responses include actionable codes. If an execution already exists, keep querying its original record.
The API limits requests per client IP. The business API allows 20 requests/s with a burst of 40. MCP and the OAuth token endpoint each allow 10/s with a burst of 20. On 429, wait for Retry-After or use increasing delays when it is absent.
Error format
{"error":{"code":"insufficient_balance","message":"insufficient balance"}}| HTTP | Error | Action |
|---|---|---|
| 400 | invalid_input | Correct the request using the parameter definitions |
| 401 / 403 | unauthorized / forbidden | Check credentials and workspace permissions |
| 402 | insufficient_balance | Check your balance and calls in progress |
| 409 | conflict / cancel_unsupported | Check the original request; if cancellation is unsupported, keep polling the task |
| 429 | rate_limited | Wait the number of seconds in Retry-After. Preserve the original request and idempotency key. |
| 410 | quote_expired | Request a new quote only after the original execution is explicitly rejected |
| 503 | dispatch_unconfirmed / authentication_unavailable | Keep the original request. Query an existing execution_id first; replay the original POST for dispatching, and monitor other states. |
Upstream errors
The execution’s error_code is separate from HTTP errors. Upstream timeouts, invalid responses, interrupted streams or uncertain charges move the execution to unknown. Keep the execution and request IDs, and reconcile before deciding what to do next.