Errors and troubleshooting
Handle invalid parameters, rate limits, temporary failures, and billing checks.
400: invalid parameters or input
Check the model, protocol, parameters, and input type. GR_UNSUPPORTED_IMAGE_INPUT indicates unsupported image input; GR_UNSUPPORTED_REASONING_EFFORT indicates an unsupported reasoning setting. Correct the request instead of retrying unchanged.
401 / 403 / 402: account and access
For 401/403, check key validity, permissions, and model access. For 402, check your balance and billing status. Never put a key in a URL, shared screenshot, or support message.
429: rate and capacity limits
Reduce concurrency and use bounded exponential backoff with jitter. Avoid amplifying rate limits with many concurrent retries.
500 / 502 / 503 / 504: temporary failures
A service or network failure may be temporary. Retry only when appropriate and with a limit. Do not blindly replay streams that already returned output.
Billing and investigation
Use the returned request ID to check status, usage, and balance history in your dashboard. A client timeout does not prove the server did not process a request, and partial output can incur usage. Share the request ID, model, time, and error code with support, never your key or sensitive bodies.
