# Gemini API down? A runbook for the first 30 minutes

URL: https://infro.io/blog/gemini-api-down-a-runbook-for-the-first-30-minutes
Author: INFRO Editorial (https://infro.io/blog/editorial)
Publisher: INFRO
Published: 2026-11-26
Last modified: 2026-11-26
Last reviewed: 2026-11-26 (next review due 2026-12-26)
Topic: Routing and reliability
Format: Checklist

> To tell whether the Gemini API is down, read your own error codes first: a 503 UNAVAILABLE is the provider's capacity, a 429 RESOURCE_EXHAUSTED is a limit on your side [^infro-gemini-503]. Cap retries, fail over to Gemini on Vertex AI as the nearest fallback, use another tested model second, and read the request trace afterwards.

Key takeaways:
- Classify failures by status code on your own traffic before you trust any status page: 503 is capacity on Google's side, 429 is usually a limit on yours.
- Never fail over around a spend or quota limit; fail over on 5xx, timeouts and unreachable hosts.
- Gemini on Vertex AI is the nearest fallback because it is the same model on another host, but test it for your prompts and check its own quota first.
- A second model is a quality trade-off: use only one that has passed your evaluation for this task, and tell users when answers change.
- Failover happens before the first token, so a gateway shortens an outage for new requests but does not prevent one or rescue a stream cut mid-answer.
- Afterwards, read the trace: which connection served each request, how many attempts, what latency and estimated cost the fallback added.

## Minutes 0–5: is it Gemini, or is it your limit?

Start from your own traffic, not a status page. A status page updates after your users notice, so the earlier signal is your error rate by status code, per provider and model.[1] Google AI Studio's status page renders by script, so it is linked here rather than quoted: open [aistudio.google.com/status](https://aistudio.google.com/status) yourself, and read it as confirmation, not as the trigger. Google's own [troubleshooting page](https://ai.google.dev/gemini-api/docs/troubleshooting) lists the exact error messages; check it for the wording on the day.

Then sort the failures you see:

| You see | Reads as | Whose problem | First move |
| --- | --- | --- | --- |
| 503 UNAVAILABLE ("model is overloaded") | The model is short of capacity right now | Google's | One jittered retry, then fail over |
| 429 RESOURCE_EXHAUSTED | A limit on your project or key was reached | Usually yours | Find which limit; do not fail over around a spend cap |
| 500 | A server-side error | Probably Google's | Retry once, then compare requests (below) |
| Timeouts, connection resets | Host unreachable or stuck | Google or the network path | Retry once if the deadline allows, then fail over |
| 400, 401, 403 | The request, the key or permissions | Yours | Stop; fix it |

Table: First-pass triage by status code. The 503 and 429 meanings follow INFRO's Gemini 503 guide.[2]

The distinction that matters most is 503 against 429. A 503 says nothing in your request or account is wrong; a 429 says a limit on your side was reached, and often your own traffic caused it.[2] A deploy that doubled traffic produces 429s that look exactly like an outage on a dashboard that groups every non-200 together. For the 429 branch, see [Gemini API 429 RESOURCE_EXHAUSTED: which limit, and what to do](https://infro.io/blog/gemini-api-429-resource-exhausted-which-limit-and-what-to-do).

For a 500, I could not read Google's page, so treat the cause as open. A quick test: replay the failing prompt and a trivial one. If only the same prompt fails every time, suspect the request (size, tools, schema), not an outage.

- [ ] Group Gemini errors by status code and model for the last 15 minutes
- [ ] Separate 429s from 5xx and timeouts on the dashboard
- [ ] Compare against the previous hour and the last deploy time
- [ ] Open Google's status page and the troubleshooting page, and note what they say and when
- [ ] Replay one failing request and one trivial request to see whether the failure is general

## Minutes 5–10: stop making it worse

Retries are the main way your own code deepens an outage. During a capacity shortage every client is retrying into the same shortage, so retrying the same host mostly adds latency.[2] Three moves, in order:

1. **Cap retries.** One or two jittered attempts, bounded by the user's deadline, not only by a count. If a gateway already fails over for you, do not stack a client retry loop on top; retries at two layers multiply.[2]
2. **Shorten timeouts.** A request held for minutes is a user who has already left. Set a per-attempt timeout that leaves room for a fallback inside the whole deadline.
3. **Open the circuit, and pause background work.** Stop sending traffic to a target whose error rate is over your threshold and probe it on a timer. Only failures that say "unhealthy" (5xx, timeouts, broken connections) should count; a 429 means busy, not broken, and should not open the breaker.[1] Backfills, evaluation runs and re-indexing compete with user traffic, so stop them first.

```python
def classify(status: int | None) -> str:
    """Returns what the caller should do next. status None = timeout/connection error."""
    if status is None or status >= 500:
        return "retry_once_then_failover"   # provider unhealthy or unreachable
    if status == 429:
        return "check_limit"                # yours: do not fail over around a cap
    if status in (400, 401, 403, 404):
        return "stop"                       # the request or the key is the problem
    return "stop"
```

> **Example: Illustrative retry budget**
> These numbers are illustrative, not a Google recommendation. An interactive screen gives up after about 8 seconds. Allow one attempt plus at most one retry with a jittered delay capped at 1 second, and a 3-second per-attempt timeout. If both fail, you have spent about 7 seconds, which is exactly why the request should go to the fallback on the second failure and not the fourth.

## Minutes 10–20: Vertex AI first, another model second

Failover is only safe to a target you have tested for this workload. Prompts tuned for one model behave differently on another, and structured output, tool calling and context limits differ.[1] Choose in this order.

### First fallback: Gemini on Vertex AI

Gemini on Vertex AI is the nearest fallback: the same model family served from another host, so behaviour is closest. It is not free of work. Vertex AI is a separate Google Cloud project with its own credentials, model enablement and quota, and its 429s have their own causes; read [Vertex AI 429 resource exhausted: two causes, two fixes](https://infro.io/blog/vertex-ai-429-resource-exhausted-two-causes-two-fixes) before you rely on it. A Vertex AI connection in INFRO takes a service-account key and your Google Cloud project ID.[3] Do that connection, and one test request, before the incident, not during it.

With two connections that serve the same model, INFRO's connection failover tries the next connection when one fails before the first token, and your client sees only a slightly higher time to first token; with a single connection there is nothing to fail over to.[4] A connection can also list more API hosts for the same key, tried when the first cannot be reached.[2] That helps with unreachable hosts, not with a 503 from a host that is up and answering, where a second connection or model is the lever.[2]

### Second fallback: another model

When the whole Gemini model is unavailable, the next step is a different model. INFRO's model fallbacks take an ordered list of up to five catalog model IDs, tried once every connection for the primary model has failed before the first token.[4] The trade-off is quality and format: a different model changes tone, tool-call behaviour, JSON reliability and context limits. Use only a model that has passed your own evaluation for this task; [Is your fallback model good enough?](https://infro.io/blog/is-your-fallback-model-good-enough-test-fallback-equivalence) gives a method. Price differences also move your provider bill; see [what failover does to your bill](https://infro.io/blog/what-does-failover-do-to-your-bill-price-gaps-and-cold-caches).

### Never fail over around a limit

A 429 that is your own spend or quota cap says stop. Moving that traffic to another provider spends around the limit you set.[1] Note that INFRO's connection failover moves on provider 429s as well as 5xx and timeouts,[4] so decide per failure kind on the route. Routes carry failure rules that decide, per failure kind, whether to retry, move on or stop, and if-rules that send matching requests to their own targets by feature, streaming, prompt size and more.[5] A sensible Gemini policy:

| Failure | Rule |
| --- | --- |
| 503, timeout, connection error | One short retry, then next target |
| 429 from a provider-side or INFRO spend cap | Stop and alert a person |
| 429 from rate limits with headroom elsewhere | Next connection |
| 400, 401, 403 | Stop; the request or credential is wrong |

This is a policy to design against, not INFRO's configuration syntax; the schema is in the [routes documentation](https://infro.io/docs/routes).

- [ ] Send one request to the Vertex AI connection and confirm it answers
- [ ] Move a share of traffic first, and watch error rate before widening
- [ ] Route latency-sensitive features to the short-deadline target, batch work to the patient one
- [ ] Turn on a second-model fallback only for features that passed evaluation
- [ ] Decide per feature: degrade (cached or partial results), queue, or fail clearly

## Minutes 20–30: tell users and watch

Say what is affected, what still works, and what you are doing, in plain words. Avoid promising a recovery time you do not control.

> **Example: Illustrative status message**
> "Some AI features are slower or unavailable because our model provider is having problems. Search, billing and your saved work are unaffected. We have moved part of the traffic to a backup and will update this page at 14:30 UTC."

Then watch, because failover has limits. It acts before the first token, so a stream that breaks mid-answer is not rescued by it.[4] Expect some users to see a cut-off answer and give them a retry button. A gateway shortens an outage for new requests; it does not prevent one and cannot make Google's service available.

- [ ] Post the status message, with a time for the next update
- [ ] Watch the 503 rate on the primary and the success rate on the fallback separately
- [ ] Keep background jobs paused until the primary's error rate is back to normal
- [ ] Probe the primary on a timer and shift traffic back in steps, not all at once
- [ ] Write down timestamps: first error, failover, recovery

## After the incident: what to check in the request trace

The request log records the model, the selected provider connection, the outcome, timings, usage and estimated provider cost for each request, and the trace names the route and the connection that served it.[6] That answers the questions the incident left open:

- **Did failover work?** Filter for the incident window and look at which connection served each request. Requests that errored despite a fallback need a closer look.
- **What did it cost in latency?** Sort by slowest; the list endpoint supports `sort=slowest` and `status=error` filters.[6]
- **What did it cost in money?** Sort by costliest, and compare estimated provider cost on the fallback with the primary. Unpriced requests come last, never as $0.[6]
- **Were retries stacked?** Count attempts per request to find a client loop sitting on top of gateway failover.
- **Did a 429 hide inside the outage?** Check that limit errors were classified separately.

```bash
curl "https://api.infro.io/v1/requests?limit=25&status=error&sort=slowest" \
  -H "Authorization: Bearer $INFRO_API_KEY"
```

The history window depends on your plan, and prompt and completion bodies are off unless you turned logging on.[6] Then fix what the incident exposed: add the Vertex AI connection if it was missing, run a [failover drill](https://infro.io/blog/llm-failover-drills) so the next one is a rehearsal, and file the timestamps with the postmortem.

## Questions

### Is Gemini down right now?

Check two things in this order: your own error rate by status code for Gemini calls, then Google AI Studio's status page at https://aistudio.google.com/status. A status page updates after users notice, so your own 5xx and timeout rate is the earlier signal. A rise in 429s alone points at a limit, not an outage.

### Gemini API not working but only for some requests. Is that an outage?

Not necessarily. If one prompt or one feature fails every time while others succeed, suspect the request or a limit on your project, not Google's capacity. Replay the failing request and a trivial one side by side before you declare an incident.

### Should I switch every Gemini request to Vertex AI during an outage?

Only after one tested request succeeds there. Vertex AI is a different host with its own project, quota and model enablement, so a failover that has never run may fail for reasons unrelated to the outage. Move a share of traffic first, watch the error rate, then widen.

### Can a gateway stop a Gemini outage?

No. It can retry a request on another connection or model when a failure arrives before the response starts, which keeps new requests answering. It does not make Google's service available, and it cannot resume an answer already streaming when the stream breaks.

## Sources

1. What to do when the OpenAI API is down: a runbook — INFRO. https://infro.io/guides/openai-api-down-runbook (accessed 2026-11-26)
2. Gemini 503 "model is overloaded": retry or fail over? — INFRO. https://infro.io/blog/gemini-503-model-is-overloaded-retry-or-fail-over (accessed 2026-11-26)
3. Connect a provider — INFRO Docs. https://infro.io/docs/providers (accessed 2026-11-26)
4. Failover & fallbacks — INFRO Docs. https://infro.io/docs/features/fallbacks (accessed 2026-11-26)
5. Routes — INFRO Docs. https://infro.io/docs/routes (accessed 2026-11-26)
6. Request traces — INFRO Docs. https://infro.io/docs/observability/traces (accessed 2026-11-26)
