Skip to navigation

LLM API uptime: fallbacks when a provider fails

In short: LLM API uptime in practice: what the nines mean, how a fallback chain changes the odds, what to retry, and what we do and do not promise, checked 26 Nov 2026.

Published 22 min read
On this page

LLM API uptime in practice is the share of your requests that get an answer, and the cheapest way to raise it is a short chain of fallback models: if two models that each fail 1% of the time fail independently, the pair fails together about once in 10,000 calls. They rarely fail independently, and that gap between the arithmetic and the real world is most of this post.

What does uptime mean for an LLM API?

It means the fraction of time, or better the fraction of requests, for which the service did its job. Time-based uptime is the number on a marketing page. Request-based success is the number your users feel, and it is the better metric for a service with many models behind one door.

Google’s SRE book makes the same distinction in its chapter on embracing risk. Availability is usually expressed in “nines”, and each extra nine is an order of magnitude better: a system aiming at 99.99% can be down for up to 52.56 minutes a year. For distributed services it prefers a success-rate definition: a system serving 2.5 million requests a day with a 99.99% daily target can serve up to 250 errors and still hit it. That is a helpful frame for an LLM app, because you do not care whether a model was “up” at 3 a.m. if no request was sent. You care how many of your requests failed.

The same chapter says something that is easy to forget when you are angry at a provider. Past a certain point, more reliability costs more than it gives: an incremental improvement can cost 100 times more than the previous one, and users on a 99% reliable phone cannot tell 99.99% from 99.999% service. The goal is to be reliable enough, not as reliable as possible. For a chat feature in a side project, three nines is fine. For a checkout flow that calls a model, it might not be. The table puts the nines into minutes.

Availability Downtime per year Downtime per 30-day month Failed requests per 100,000
99% 3.65 days (87.6 hours) 7.2 hours 1,000
99.9% 8.76 hours 43.2 minutes 100
99.95% 4.38 hours 21.6 minutes 50
99.99% 52.56 minutes 4.32 minutes 10
99.999% 5.26 minutes 26 seconds 1

Downtime in a 30-day month, in minutes

  • 99%432 min
  • 99.9%43.2 min
  • 99.95%21.6 min
  • 99.99%4.32 min
  • 99.999%26 sec
Computed from a 43,200-minute month. The 52.56-minute annual figure for 99.99% matches the one quoted in the Google SRE book. Time-based nines are a rough guide for a service with many models, where some are up while others are down.

What actually fails when an LLM API fails?

Several different things, and only some of them are outages. Sorting them matters, because the cure is different for each, and because a fallback model fixes fewer of them than people expect.

Failure What you see Does a fallback help? What else
Provider throttling 429 Yes, if the provider sets it Back off; see the 429 guide
Provider error or overload 500, 502, 503 Yes Retry with jitter; the gateway has retried twice already
No route for the model right now 503 model_not_found Yes Pick another id
Model id does not exist 404 model_not_found No, it is a typo Copy ids from the models table
A limit you set, or no balance on a priced id 402, 403, key or account 429 No Raise the limit or add credit; free ids answer at a $0 balance; see errors
Stream breaks after the first token A cut stream, or 300 s with no data No Resend the whole request
Your client times out Nothing, or a client error Careful The model may have finished and been billed
Slow but answering High latency No Choose a faster model; see performance

Two rows are worth a second look. The 503 model_not_found case is a provider-side reality that a fallback can absorb: the errors page says a model that exists but is not available right now returns 503, and the right response is to try again shortly or pick another model. And the stream-break row is where fallbacks cannot help, because a model that has already sent half an answer cannot be swapped for another without changing the answer. Whatever your plan, assume some failures reach your code.

What do we promise, and what do we only measure?

We promise nothing about uptime. The terms of service say we do not guarantee it, and the transparency page lists what we do instead: probe every listed model every few minutes on the status page, publish a 24-hour strip on each model page built from real requests, and remove a route that fails in bursts. A model that has answered nothing for a week comes off the list, and a listing with no working route shows as unavailable on the models page rather than sitting there as a trap.

Here is a concrete example. On 25 November 2026 we removed 11 ids from our free lane because the gateway log showed no successful request for them in 24 hours. A launch post from the day before had counted more. That is the monitoring working, and it is also exactly why a single hard-coded free model id is a bad foundation. Our free models post shows the earlier list.

What we cannot see is inside a provider. A model that answers quickly with a degraded answer looks “up” to every probe, which is why the guide to verifying an API serves the real model exists and why the transparency page is frank about what we control and what the upstream provider controls. Uptime and quality are separate questions, and this post is about the first. Our honest review of One AI API Key lists the places where we are weaker than the alternatives, reliability history included.

How does fallback work on this gateway?

When a provider fails before sending any part of the answer, the gateway first retries the model you named, up to twice. If the model is still failing, for example because its usage limit is hit or it has some other problem, the fallback rules and presets we have set, together with automatic routing, move the request to another similar model. The free lane does the same on its own: a failing :free call is retried on another model automatically. Only the attempt that answers is billed. A failure here means a 429, a 5xx or an unavailable model. You can also choose the models yourself, and the rules, from the routing documentation, are:

  • Per request: up to three ids in an X-Fallback-Models header, tried in order.
  • For every request: a fallback model chosen in the console under Models and Routing.
  • Virtual models: a name of your own for a chain of up to three models, with optional rules and a canary. The virtual models section has details.
  • Allowlists apply: a key’s model list limits each fallback too.
  • Billing: only the attempt that answers is billed.
  • Transparency: a reply from a fallback carries X-Fallback-From with the model that failed, and its model field names the one that answered.
  • Limits: fallback covers text endpoints (chat completions, responses, messages), and an error after streaming has started is passed on.

If every attempt fails, the error comes back with a request id and your own retry policy takes over. When a switch did happen, the reply headers tell you, so you always know which model answered. One honest limit on the arithmetic below: a switch to a “similar” model is still a second chance with its own failure rate, and similar models are more likely to share an upstream, a region or a limit than two unrelated ones. Treat automatic switching as a real gain that is smaller than the independent case.

The path of a failing request

Request names a modeloptionally up to 3 fallback idsProvider fails before answering429, 5xx or model unavailableGateway retries the same modelup to twice, failed attempts not billedThen a similar model takes overyour fallback ids, presets or auto routingReply names who answeredX-Fallback-From, model field
If every step fails, the error reaches your code with a request id, and your own retry policy takes over. An error after streaming has started skips this path.

The examples below send a request with two fallbacks and print the four values worth logging on every call. They run on free ids, which work with a $0 balance (no top-up, no card), and they read the key from the ONEAIAPIKEY_API_KEY environment variable. Note that free ids share one allowance, so a fallback from one free id to another spends the same 100 requests a day. The guide to free models says which free id suits which job.

export ONEAIAPIKEY_API_KEY="paste-your-key-here"

curl -sS -D - https://api.oneaiapikey.com/v1/chat/completions \
  -H "Authorization: Bearer $ONEAIAPIKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Fallback-Models: deepseek-deepseek-v4.1-flash:free, qwen-qwen3.8-27b:free" \
  -d '{
    "model": "z-ai-glm-5.3:free",
    "max_tokens": 60,
    "messages": [{"role": "user", "content": "Name one way to handle a failing API."}]
  }'

# If the first model fails before answering, the reply carries X-Fallback-From (the model that failed)
# and its "model" field names the model that answered. Free ids share one daily allowance.
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.oneaiapikey.com/v1", api_key=os.environ["ONEAIAPIKEY_API_KEY"])

raw = client.chat.completions.with_raw_response.create(
    model="z-ai-glm-5.3:free",
    max_tokens=60,
    messages=[{"role": "user", "content": "Name one way to handle a failing API."}],
    extra_headers={"X-Fallback-Models": "deepseek-deepseek-v4.1-flash:free, qwen-qwen3.8-27b:free"},
)
reply = raw.parse()

# Log these four on every call: they are how you measure your own uptime later.
print("request id :", raw.headers.get("x-request-id"))
print("failed model:", raw.headers.get("x-fallback-from") or "none (the first model answered)")
print("answered by :", reply.model)
print("tokens      :", reply.usage.total_tokens)

How much does a fallback chain improve your uptime?

If failures were independent, a lot. With models at 99%, 98% and 97%, the chance that all three fail on one request is 0.01 times 0.02 times 0.03, or six in a million. That is 99.9994% availability from three models that are each below 99%. The sum is real, and every blog post on fallback chains shows it. It is also where they stop.

The assumption that breaks is independence. Failures are correlated when two models share an upstream account, a region, a rate limit, a bad request that every model rejects, or an outage in your own network. Add a limit you set yourself, such as a key spend cap, and the chain fails together by design. A simple way to model this is to say that some share of the primary’s failures hit every model at once. At 20% shared failures, the same three models give 99.7995%, and at 50% they give 99.4997%. Correlation, not model count, decides how good a chain is. The gateway’s own two retries sit in front of all this: they fix brief faults well, but a fault that lasts a minute fails the retry as well, so the failures that reach a fallback are the correlated, longer ones.

Failed requests per 100,000, by chain

  • One model at 99%1,000
  • Plus one fallback, independent20
  • Plus two fallbacks, independent0.6
  • Two fallbacks, 20% shared failures200
  • Two fallbacks, 50% shared failures500
Models at 99%, 98% and 97% availability. Shared failures are the share of the primary's failures that also hit the fallbacks. These are model outputs, not measurements of this gateway.

Try your own numbers. The calculator treats availability as the effective success rate after the gateway’s own two retries, because that is what a fallback sees. If you have measured your success rate on each model, use those figures. If you have not, treat any default as a guess.

Fallback chain calculator

Chain success rate
99.7995%
Failed requests a day, primary alone
500
Failed requests a day, with the chain
100
Downtime-equivalent a month, primary alone (minutes)
432
Downtime-equivalent a month, chain (minutes)
86.61
Times fewer failures
4.99
x

Model: a failure is either shared (every model fails together) or independent. It ignores latency, quality differences between models and the cost of a pricier fallback. Nothing is sent anywhere.

With the defaults, the primary alone fails 500 requests a day out of 50,000 and the chain fails about 100, roughly five times fewer. Push the shared-failures field to zero and the chain fails about one request every three days, roughly 1,700 times fewer. Push it to 50% and the benefit shrinks to about twice. That sensitivity is the lesson. Choose fallbacks to reduce what you share: different providers, different families, different limits.

Which models make good fallbacks?

Ones that you have tested on your own prompts, that sit on a different upstream, and that cost the same or less. The test is not optional. A fallback that answers badly turns an outage into a quality incident, which is worse because nobody notices. Run your 30 to 50 representative prompts through each candidate, and keep only the ones that pass. The models comparison and the model list show context windows, capabilities and prices, and the uptime strip on a model page shows its last 24 hours.

Check capabilities, not just names. If your request uses tools, vision, JSON mode or a long context, the fallback needs all of them. A request that a fallback rejects for being too long is a failure that both models share, which is the correlated kind. The guides to tool calling, vision and structured output list what each model supports.

Mind the price. A fallback that costs three times the primary raises your bill at the exact moment the primary is down, and an extended outage can surprise you. If the fallback must be expensive, put a spend limit on the key and read the cost-cutting guide, which has more on ceilings. A cheap fallback of a smaller model, for a feature that can tolerate a plainer answer, is often the right trade, and the cheap open model prices post lists the low end with per-million rates.

Be honest about our own side too. The transparency page says a model on our list can have more than one route behind it, but we cannot promise that two ids you pick are independent upstream. If it matters, choose ids from different makers. The OpenRouter comparison and the gateway comparison show how other gateways describe their fallback, and OpenRouter’s FAQ says it falls back to the next provider automatically if a provider returns an error. Different design, same goal. For a wider comparison see the post on OpenRouter alternatives, and if you are moving an app over, the migration guide covers model ids and fallback behaviour, which differ between gateways.

When should you retry, and when should you fall back?

Retry for brief faults, and fall back for sustained ones. A retry is cheap and fixes a dropped connection or a one-second overload. A fallback changes the model, so you should only pay that cost when a retry has not worked. On this gateway the order is built in: retry the named model up to twice, then fall back. Your own client adds a third layer, and the layers multiply, which is why one retry policy in one place is the rule.

Retry the right errors. Our rate limits page lists them: 429, 500, 502, 503 and network errors with backoff, and never 400, 401, 403, 404, 413 or 501, which fail the same way each time. Back off exponentially with jitter. The AWS Architecture Blog simulates many clients retrying and finds that adding jitter cut calls by more than half with 100 contending clients, compared with plain exponential backoff. Honour Retry-After when it is there: MDN says a 503 can use it to say how long a service is expected to be unavailable. The 429 guide has a calculator for the schedule.

Timeouts need care. The errors page says a streamed request closes after 300 seconds without data from the provider, that a non-streamed one can be cut off by your client or a proxy, and that a timed-out request may have finished and been billed. Retrying blindly can pay twice. Stream long outputs, set a read timeout of a few minutes, and for requests with side effects (a tool call that sends an email) make the action idempotent so a retry cannot do it twice. This matters most for unattended loops, and the coding agent guide shows how to cap what such a loop can spend while a fallback is in play.

How do you degrade gracefully when everything fails?

You decide in advance what the user sees. Google’s SRE chapter on handling overload offers a useful order: redirect when possible, serve degraded results when necessary, and handle resource errors transparently when all else fails. For an LLM feature, that translates to four choices.

  1. Redirect: the fallback chain. The user never sees the failure.
  2. Degrade: a smaller model, a shorter answer, a cached answer for a repeated question, or a plain non-AI version of the feature.
  3. Defer: queue the work and tell the user you will email the result. This suits summaries, reports and anything asynchronous.
  4. Fail clearly: a message that says what happened and when to try again, with the request id logged for support.

A circuit breaker belongs here too. After a handful of consecutive failures on the primary, skip it for a minute and send traffic straight to the fallback. That saves your users the retry delays during a long incident, and it saves the provider from your retries. Probe the primary with a single request now and then, and switch back on the first success.

Uptime checklist for an LLM feature

0 of 10 done

Start with measurement

Log the request id and status on every call and read a week of data. Without a success rate, every other decision is a guess.

What do other providers offer, and what does it cost?

Some sell an uptime term, and it is worth knowing what that looks like. These are facts from the providers’ own pages on 26 November 2026, and they are not a recommendation.

Option What its page says Source
Fireworks, Reserved Throughput A throughput SLA and 99.9% uptime terms, on a commitment; usage above the reservation is not covered by the SLA Fireworks pricing
Fireworks, Spot 50% off Standard on best-effort capacity; throughput can drop to zero, so retry or fall back to Standard Fireworks pricing
OpenRouter If a provider returns an error it falls back to the next provider, transparently to the user OpenRouter FAQ
Vercel AI Gateway Bring-your-own-key use needs purchased credits and falls back to Vercel’s keys by default Vercel pricing
One AI API Key No uptime guarantee; retries up to twice, then fallback rules, presets and auto routing to a similar model; status page, per-model strip, usage record Terms and status

The honest summary: if you need a contract with a number in it, a reserved plan at a provider is the way to get one, and that costs a commitment. A gateway like ours adds retries, fallback and visibility, not a guarantee. A fallback that lands on a paid model is billed at that model’s rate when it answers, so the fee comparison is worth reading next to this table. For many apps, a tested fallback and your own monitoring give most of the practical benefit at no extra cost. The 12-point provider checklist includes uptime terms among its checks, and the guide to LLM gateways explains what a gateway can and cannot do for reliability.

If you are weighing a self-hosted option, the trade is on-call time for control. The LiteLLM comparison works through the hours and the cost, and the risk side is the same: a gateway you run is a service you keep up.

How do you measure your own uptime?

You count. Record the request id, the model you asked for, the model that answered, the status, the duration and whether X-Fallback-From was present, on every call. Then compute, per model and per day, the share of requests that returned an answer, and the share that needed a fallback. The second number is the early warning: a primary whose fallback rate rises from 1% to 8% is failing even if users are not yet complaining.

The usage page helps. It records every request with the key name, model, tokens, cost, duration and request id, and failed requests leave a record with the error message in place of a cost, as the routing documentation states. That record is counts only (tokens, cost, timing, model, key name, request id), never what you sent or what came back: by default prompts and answers pass through and are not kept, and we do not train on your data. Prompt logging is an opt-in per key, X-No-Log: true opts one call out, and the privacy guide lists the other qualifiers. The rankings page shows traffic per model from the same logs, refreshed about every five minutes, and a model is named in a window only after 100,000 tokens, so a quiet model will not appear. For a balance that runs dry in the middle of an outage, set a low-balance alert, and for a runaway loop, a spend limit per key.

Beware of confusing a limit with an outage. A key that hits its spend limit answers 429 on every call, which looks like an outage on a dashboard and is the system working as set. Branch on the code in the error body to keep the two apart, as the error reference lists. And for credit, remember that a balance of zero is not an outage either: priced models answer with an insufficient-balance error until you add credit, which the post on prepaid LLM API credits covers, while free ids keep answering at a $0 balance within the daily allowance.

How would we set it up for a new app?

We would do five things on day one, none of which needs engineering time beyond an afternoon.

  1. Create a key for the app with a spend limit and a model list, so a mistake has a ceiling. The authentication guide covers each setting.
  2. Pick a primary model and two fallbacks from different makers, tested on 30 to 50 of your own prompts.
  3. Send the fallbacks in X-Fallback-Models on every request (or set one in the console), let the gateway’s retries and automatic routing cover the rest, and log the request id, status and X-Fallback-From.
  4. Use the SDK’s retries with a raised max_retries, and do not add a second loop.
  5. Decide what the user sees when all three fail.

Start on the free lane to build and test: 47 ids share 100 requests and 3,000,000 tokens a day, and they work with a $0 balance, so they keep answering after the $10 sign-up credit is spent. No card is needed, and the chat lets you try a prompt first (the chat guide explains it). Sign in with Google at the sign-up page, read the quickstart for the first call, and when you outgrow the free lane the pricing page shows how credit is added by email while online checkout is not yet open. Our money policy is short: once a key is created and usage is consumed we do not give money back, because it is an online product and people can change their mind. The exception is a key that does not work or a technical problem on our side, and then you write to somdutt777@gmail.com with a genuine concern; exceptions are decided case by case, and the terms are the policy page. The post on what to check in a money-back policy applies anywhere you pay.

Reliability is also a trust question. If a provider fails you, the useful ones tell you quickly and plainly, which is the standard we try to hold ourselves to on the status page and in the transparency write-up. For a view of why a cheap route can fail in other ways, read about the risks of cheap LLM API resellers.

Try a fallback chain on free ids

$10 sign-up credit, 47 free models sharing 100 requests and 3,000,000 tokens a day, no card.

Frequently asked questions

What uptime does this gateway guarantee?
None. The terms say we offer no uptime guarantee, and the transparency page repeats it. What we publish instead is evidence: the status page, a 24-hour uptime strip on every model page and exact traffic counts on the rankings page. If you need a contractual uptime figure, buy it from a provider that sells one.
How do I set up a fallback model?
Send up to three model ids in an X-Fallback-Models header, separated by commas, or set a fallback model for every request in the console under Models and Routing. The gateway first retries the model you named, up to twice, and then tries the fallbacks in order; if the model is still failing, fallback rules, presets and automatic routing move the request to another similar model. The routing documentation has the rules and the headers reference lists the reply headers.
Am I billed for the attempts that failed?
No. Only the attempt that answers is billed, so one call is never billed twice, and a request that fails before the model produces anything is not charged. A request you abandon or that times out in your client can still be billed for the tokens the model produced, as the errors page explains.
Does a fallback help if the failure happens mid-stream?
No. Fallback applies when the provider fails before it sends any part of the answer. An error that arrives after streaming has started is passed on as it is, and the partial text you already received is yours to keep or discard. Your client needs to decide whether to resend the whole request. The streaming guide covers the trade-offs.
How many fallback models are enough?
Usually one or two, from different providers or families. The calculator above shows why: a second model cuts failures sharply, a third adds little, and any failure your models share (the same upstream, the same bad request, a limit you set) cuts the benefit more than the third model adds. The gateway allows up to three ids per request.
Can I use free models as fallbacks for paid ones?
You can, with two cautions. Free ids work with a $0 balance, with no top-up and no card, and they keep working after the sign-up credit is spent. The only limit is the shared allowance of 100 requests and 3,000,000 tokens a day per account, refilled at 00:00 UTC, so a fallback that serves heavy traffic will hit the daily cap, and free models can change or be removed. As a last-resort answer for a non-critical feature, they are a reasonable choice. The free tier comparison explains the caps.
What is the difference between a retry and a fallback?
A retry sends the same request to the same model again and fixes brief faults. A fallback sends it to a different model and fixes longer ones. Retries need backoff and jitter so a crowd of clients does not retry together, as the 429 guide shows with numbers, and fallbacks need a model you have tested on your own prompts.
How do I know how reliable a model has been?
Look at its 24-hour strip on the model page and at the status page, then measure your own traffic: the usage page keeps a record of failed requests with the error message. Counting your own success rate over a week tells you more than any public number, because it reflects your prompts, your region and your limits.
More in Blog

Try it

One API key for GPT, Grok, DeepSeek, Kimi, GLM, MiniMax, Qwen, Step, Beam, Nemotron, ERNIE, Hunyuan, Gemma, Laguna, LFM, LongCat, Llama, Solar, Jais, Mistral, K2 and Roleplay.

One AI API Key speaks the OpenAI and Anthropic formats, so you change the base URL and the key, not your code. Credit packs start at $10, and every model has a published per-token rate.

New accounts$10 credit on sign-up
  • 100requests
    per day
  • 3Mtokens
    per day
  • 47free
    models
  • $0per
    token
  • No card
  • No end date
Claim $10 credit →