API / Reliability
Handle errors deliberately
Correct contract and credential failures immediately; retry only transient requests with bounded exponential backoff.Status codes
- 401 means the API key is missing or invalid.
- 403 means the key lacks the required scope or project access.
- 404 means the requested resource or model was not found.
- 409 means the request conflicts with current resource state.
- 422 means the JSON payload failed contract validation.
- 429 and 503 may be retried with jitter; respect Retry-After when present.