Errors
The HTTP status tells you whether to retry; the code tells you why. Branch on the code and show the message to people.
API Army
Errors follow OpenAI’s shape, so every OpenAI SDK raises them as API errors: {"error": {"code": "…", "type": "…", "message": "…"}}.
| Status | Code | What to do |
|---|---|---|
| 400 | invalid_request | A field is missing or not valid. Read error.message. |
| 400 | unsupported_content | Images and audio are not supported yet. Send text. |
| 400 | tools_unsupported | No source of this model can call tools. Use a model from an OpenAI-format source or a ChatGPT account. |
| 400 | group_mismatch | A group key was sent with the name of another group. |
| 401 | invalid_api_key | The key is missing, turned off or not an army_ key. |
| 404 | model_not_found | The model is not served for this key or group. List models first. |
| 404 | group_not_found | No group has this API name. |
| 404 | no_provider | provider.only or provider.ignore left no source for the model. |
| 429 | rate_limited | A request, parallel or monthly token limit was reached. Wait for Retry-After. |
| 502 | provider_error | Every eligible source failed. Try again. |
| 503 | group_disabled | The application or group is paused, or no source is available now. |
AI Voice
Allowance and service errors arrive as {"error": {"code": "…", "message": "…"}}. Request errors arrive as {"message": "…", "code": "…"}, and invalid fields as {"message": "…", "errors": {"field": ["…"]}}.
| Status | Code | What to do |
|---|---|---|
| 401 | authentication_required | The key is missing or revoked. Send a current bv_ key. |
| 402 | allowance_exhausted | The allowance has been used. allowance_expired means the plan has ended. |
| 403 | application_suspended | The application is suspended. Contact the administrator. |
| 409 | idempotency_conflict | The same Idempotency-Key was sent with different input. Use a new key for new input. |
| 410 | connection_ended | The call, session or saved result has ended. Start a new one. |
| 422 | invalid_request | A field, the audio or the Idempotency-Key is not valid. Audio problems use codes such as no_speech or audio_too_long. |
| 429 | rate_limited | Too many requests. Wait for Retry-After seconds. |
| 503 | voice_unavailable | Temporarily unavailable. Retry after Retry-After with the same Idempotency-Key. |
Retrying
- Retry 429, 502 and 503 after
Retry-Afterseconds, or after a short growing wait when it is missing. - Send the same
Idempotency-Keywhen you retry a voice request, so you are not charged twice. - Do not retry other 4xx answers without changing the request.