Skip to main content

Common errors and recovery

Record the HTTP status and request path before choosing a recovery step.

401 Unauthorized

The Key is missing, inactive, incomplete, or sent with the wrong authentication header.

Copy the Key again, remove surrounding whitespace, and verify Bearer, x-api-key, or x-goog-api-key for the selected protocol.

403 Forbidden

The current Key, account state, or model access does not permit the request.

Confirm that the Key is active and choose a currently accessible model on the models and pricing page.

404 Not found

The Base URL, protocol path, or HTTP method does not match; the client may also append /v1 twice.

Compare the full method and path with the protocol guide and enter only the documented Base URL level.

429 Too many requests

Requests are arriving too quickly, or the currently available balance is insufficient.

Reduce concurrency, retry with increasing delays, and confirm account state in the portal before continuing.

5xx Service error

An upstream service or the gateway cannot complete the request temporarily.

Keep the timestamp and status, then retry later. If it continues, run the minimal curl request to isolate client configuration.

Network interruption

A local network, proxy, or long-lived connection closed before the response completed.

Confirm the domain is reachable. Reconnect streams with backoff and do not automatically repeat non-idempotent operations.

If the issue continues

Keep the timestamp, protocol, HTTP method, path, status, and a redacted response excerpt. Never include the full Key.