API Errors
What each error means and exactly how to fix it
| Code | Meaning | Quick fix |
|---|---|---|
| 400 | Invalid request format | Check your request body and model name |
| 401 | Authentication failed | Check your API key |
| 402 | Out of credits | Top up on the Credits page |
| 405 | Method not allowed | Use POST (or GET for /models) |
| 429 | Too many requests | Wait a few seconds, then retry |
| 502 | Upstream hiccup | Auto-retried upstream; retry shortly |
| 503 | No capacity available | Transient — retry in 2-5 seconds |
| 504 | Upstream timed out | Retry; split very long tasks |
| 529 | Model provider overloaded | Wait 5-10 seconds, then retry |
401Missing API key
The request has no key. The OpenAI endpoint reads Authorization: Bearer <key>; the Anthropic endpoint reads x-api-key: <key> (either header works on both).
✓ Add your InferKey API key to the request header.
401Invalid API key
The key does not exist or was deleted.
✓ Check your keys on the API Keys page and create a new one if needed — deleted keys stop working immediately.
400Your credit balance is too low to access the API
This account has never purchased credits.
✓ Buy a credit pack on the Credits page — the key starts working immediately after purchase.
402Your credit balance is exhausted
The credits you purchased have been fully spent.
✓ Top up on the Credits page. Requests resume immediately — nothing else to change.
429Requests-per-minute limit exceeded
More requests in the last minute than the model allows (typical defaults: Claude models ~30/min, GPT models ~200/min).
✓ Wait a few seconds and retry. Need sustained higher throughput? Contact us.
429Concurrency limit exceeded
Too many requests in flight at once for the model (typical defaults: Claude ~2 concurrent, GPT ~10 concurrent).
✓ Let in-flight requests finish, or add a small queue to your client.
400model is required / model not available
The request body is missing the "model" field, or names a model that is not offered.
✓ Use a model from the pricing table, or call GET /openai/v1/models to list what is live.
400Other request errors
Prompt too long, invalid tool schema, bad parameter values, etc.
✓ These pass through from the model API with the original message — fix the request as the message describes.
503No capacity available right now
Serving capacity for the model is momentarily saturated or rotating.
✓ Transient — a retry with a 2-5 second delay almost always succeeds.
504Upstream timed out
The model did not finish responding in time (usually very long generations).
✓ Retry. For very long tasks, prefer streaming and consider splitting the work.
529Model provider overloaded
Anthropic's or OpenAI's servers are under heavy load.
✓ Wait 5-10 seconds and retry — this is on the model provider side.
// Anthropic style (/proxy)
{
"type": "error",
"error": {
"type": "...",
"message": "..."
}
}// OpenAI style (/openai/v1)
{
"error": {
"type": "...",
"message": "...",
"code": "..."
}
}Still stuck? Contact us — include the model, endpoint, status code, and rough time of the failing request.