Unaligned API
Errors
Standard HTTP status codes, with a short machine-readable code.
{
"error": {
"code": "insufficient_balance",
"message": "Your balance is too low for this request."
}
}| Status | code | What to do |
|---|---|---|
400 | invalid_request | Fix the request. The message says which field. |
401 | invalid_key | Check the key; it may have been revoked. |
402 | insufficient_balance | Add credit, then retry. |
404 | unknown_model | Check the ID in Models. |
429 | too_many_requests | Wait Retry-After seconds, then retry. |
500 / 503 | server_error, overloaded | Retry with exponential backoff. |
The OpenAI and Anthropic formats use the same status codes, with an error body in their own shape.
Limits
- Each account can run 4 requests at once and start 40 a minute, all keys together. Going over either returns a
429with aRetry-Afterheader. - A request must fit in the model’s context window: input plus
max_tokens. - There is no daily or monthly cap other than your balance.