How do I handle errors?
Errors use the OpenAI envelope {"error": {"message", "type", "code"}}. 401 missing or invalid key · 402 insufficient_balance · 404 model_not_found · 400 wrong_endpoint (for example a speech model sent to chat) · 413 input too large · 503 model_unavailable (model being enabled) · 502 upstream error. Retry 502 and 503 with backoff; the others are deterministic.
