Errors
Every error comes back as JSON with a status, a reason and a message.
Errors come back as JSON: {"error": {"code": 401, "reason": "invalid_token", "message": "..."}}.
| 401 | missing_token, invalid_token | The key is missing, wrong or revoked. Make a new one. |
|---|
| 402 | api_balance_empty | Add credits on the API page. |
|---|
| 403 | unknown_model | Use an id from /v1/models. |
|---|
| 429 | key_rate, key_tokens, spend_velocity | A key or spend limit. Wait for the Retry-After seconds, then retry. |
|---|
| 429 | session, weekly | A plan window is used up. Wait for X-Ghost-Reset, or pay with credits. |
|---|
| 429 | rate, concurrency | Too many requests a minute, or at once, for your plan. Slow down and retry. |
|---|
| 502 | empty_upstream | The model sent no reply. Retry, or try another model. |
|---|