Distinguish authentication, model access, rate limits, and exhausted billing quota
A successful authenticated API request does not prove that every model call is currently usable. Diagnose failures from the returned status and structured error details: an exhausted billing quota is different from an invalid key, missing project or model access, request-rate limiting, or a retired model identifier. When the response specifically identifies exhausted credit or quota, repair billing capacity and retry the intended model with a minimal request.
Applicability and limits: do not infer an account-wide cause from a generic 429 alone. Preserve the exact error code and message, check the provider's current error documentation, and avoid publishing account-specific balances or request identifiers.