Skip to navigation

DeepSeek API Down? Keep Your Agent Running in 5 Minutes

In short: DeepSeek API down? A timeline of the 14 Sep 2026 outage, which errors to retry, and a fallback config with deadlines and a breaker. Checked 28 Nov 2026.

Published 26 min read
On this page

When DeepSeek’s API stops answering, a better retry loop is not the fix. You need a deadline, a second route and a rule for which errors move traffic to it. This guide gives you all three as paste-ready code, built from DeepSeek’s own error codes and rate-limit documentation, a timeline of the 14 September 2026 outage rebuilt from the posts people made while it happened, and a calculator that shows how long your agent sits on a dead route: 91 seconds with the config below, up to 30 minutes with stock SDK settings. The top results for this search mostly say to check the status page and try later. We publish this post and the second half uses our own gateway as the example fallback; the first half works with any provider.

What happened when DeepSeek went down on 14 September 2026?

We could not find a post-mortem from DeepSeek for that evening, so what follows is a timeline of user reports, not an incident report. Three r/DeepSeek threads carry most of it, and every time below is UTC, taken from when each post or comment was written. Treat each row as one person’s report. Commenters named different countries and some said it was up for them while it was down for others, so the edges are blurry.

Time (UTC) What the threads show Thread
18:35 A user asks if DeepSeek is down: logged out repeatedly and getting error messages. The thread ends at 251 points and 241 comments when we read it. it’s down?
19:02 A second thread says the status page shows operational while Downdetector has many reports. DeepSeek Is Down
19:24 A third thread, 168 points: coding sessions stopped mid-run, and users say the status page still reads fine. you only realize how good it is when its down
19:46 A commenter writes that the API is also down, not only the chat app. DeepSeek Is Down
21:24 A user who logged back in gets a “server busy” message. it’s down?
21:33 A new thread says it is back, and a commenter says web chat and API both work again. it’s back now

From the first report at 18:35 to the first all-clear at 21:33 is 2 hours 58 minutes. For an agent that runs unattended, that is the whole evening. Three details matter for what you build.

The status page and the symptoms disagreed, according to users. Several commenters said the page showed everything running while they could not connect. We cannot confirm that after the fact: the history page at status.deepseek.com loads its events with JavaScript, so a plain fetch shows no entries for the evening. What we can read today is the uptime DeepSeek displays for August to November 2026: 99.74% for the V4 Pro API and 99.57% for the V4.1 Flash API. If a rate of 99.57% held for a 30-day month, that is 0.43% of 720 hours, about 3.1 hours of downtime a month. That is arithmetic on DeepSeek’s own number, not a measured outage count, and it is a reasonable size to plan for.

People reached for a second route in the thread itself. One commenter suggested OpenRouter as the answer while it was down, and one said the larger V4 Pro model was working and could serve as a fallback after the all-clear. Neither is a measurement, but both show the instinct. A fallback you picked on a calm afternoon beats one you search for at 19:00 on an outage evening. Our OpenRouter comparison and the post on OpenRouter alternatives cover that choice.

It was not a rate-limit problem. The reports describe logouts, “server busy” messages and hangs, not 429s. That points at the provider’s side, and the right response differs from a quota problem: you cannot slow down your way out of it.

What does DeepSeek say each error means?

DeepSeek’s error codes page, read on 28 November 2026, gives a cause and a remedy for each status. The table adds the decision an agent has to make: retry the same route, move to another route, or stop and show the error.

Status DeepSeek’s stated cause Retry the same route? Move to another route?
400, 422 Invalid body or invalid parameters No: fix the request No: the request is the problem
401 Authentication fails, wrong API key No Yes: this route’s key is wrong
402 You ran out of balance No Yes: and top up
429 Requests too fast, or a concurrency or QPS limit Yes, after a pause Yes, after one retry
500 The server hit an issue Yes, once or twice Yes
503 The server is overloaded Yes, after a brief wait Yes
408, 413, 504 File upload or OCR and speech cases Not relevant to chat Not relevant to chat

MDN’s page on 503 Service Unavailable describes the status as a server not ready to handle the request, commonly from maintenance or overload. If a response carries a Retry-After header, wait that long. DeepSeek’s error page says “a brief wait” without a number, so you choose one, and the jittered backoff below does.

Why can a 429 be your own fault?

DeepSeek’s rate-limit page does not use requests per minute. It uses concurrency: 2,500 simultaneous requests for deepseek-flash and 500 for deepseek-v4-pro, counted per account across all keys, where a request counts as one concurrent connection from the time it is sent until the response is complete. Over the limit, you get a 429.

That has a consequence in an outage. A request that hangs holds a concurrency slot for as long as it hangs. The slots in use equal your request rate times the time each one is held (Little’s law), so with 5 requests a second that all hang:

  • held for the 600-second default of many SDKs: 5 × 600 = 3,000 slots, above the 2,500 limit, so DeepSeek starts answering 429 to everything, including requests that would work;
  • held for a 45-second deadline: 5 × 45 = 225 slots, nowhere near the limit.

So a retry storm during a hang can turn a provider problem into a self-inflicted 429 problem that outlasts the outage. A short deadline is not only about your latency, it keeps your slots free. The guide to LLM API 429 errors separates the other causes of a 429.

Why does a hung request stay quiet and alive?

DeepSeek documents a keep-alive mechanism: after you send a request, the connection stays open and you may keep receiving empty lines (non-streaming) or SSE comments of the form : keep-alive (streaming). If inference has not started after 10 minutes, the server closes the connection. DeepSeek says these do not affect parsing of the JSON body.

Now read that from the client’s side. Many timeouts are per-read: they fire when no data arrives for N seconds. If keep-alive bytes arrive every few seconds, that timer keeps resetting. An agent can sit on one live connection for up to 10 minutes while nothing useful happens. We have not measured how every HTTP client treats those bytes, so test yours (the dead-socket test below does); the safe design does not depend on the answer. It uses a wall-clock deadline that fires after N seconds in total, regardless of bytes.

Why do default client settings make an outage longer?

The OpenAI Python SDK README, read on 28 November 2026, states two defaults that matter here: requests time out after 10 minutes, and certain errors are retried 2 times with a short exponential backoff. Those errors are connection errors, 408, 409, 429 and 5xx. That is 3 attempts in total.

The worst case, if every attempt waits out the full timeout, is 3 × 600 seconds = 1,800 seconds, which is 30 minutes before your code sees an exception. Add your own retry loop on top of the SDK’s and the attempts multiply: 3 attempts inside each of 3 outer tries is 9 requests, up to 90 minutes. The rate limits guide warns about exactly this stacking.

Retries also multiply load on a provider that is already struggling. Google’s SRE book chapter on handling overload describes a per-request retry budget of up to 3 attempts, and a per-client budget that tracks the share of requests that are retries. In their analysis the per-request cap alone still allows a request volume just below 3 times normal, and adding a 10% per-client retry ratio brings the growth down to about 1.1 times. The lesson for a single agent is simpler: count your retries in one place, and give up on a route quickly.

When you do wait between retries, add randomness. The AWS Architecture Blog’s exponential backoff and jitter comparison found that plain exponential backoff without jitter did more work and took more time than the jittered variants in their simulation. The config below uses a random pause of up to one second between the two attempts on a route: short, because the second route is the real retry.

Longest wait on one dead route, in seconds

  • SDK defaults, every attempt times out1,8003 attempts x 600 s (30 minutes)
  • Chain below, first two requests together182then the breaker skips the route
  • Chain below, one request912 attempts x 45 s, plus a pause of at most 1 s
Worst cases: they apply only to a route that accepts the request and never answers. A route that refuses the connection or returns a 503 fails in a fraction of a second.

How do you set it up in five minutes?

Five steps, in order. Each one maps to a failure from the sections above, and none needs a new service.

  1. Put a wall-clock deadline on every attempt. Wrap the call in asyncio.wait_for (or the equivalent in your language). Forty-five seconds suits non-streaming calls to a fast model. A reasoning model that thinks before it writes needs more: DeepSeek’s pricing page lists deepseek-flash as supporting thinking and non-thinking modes with thinking as the default, so give max_tokens room: when we probed the free DeepSeek ids on 22 November they reasoned first and needed a larger max_tokens before any answer text appeared.
  2. Turn off the SDK’s own retries (max_retries=0) so one loop owns the count.
  3. Add a second route that does not share DeepSeek’s infrastructure.
  4. Sort errors by status code: 429, 500, 502, 503 and 504 retry once, 401, 402 and 403 move on, everything else stops and shows the error.
  5. Add a breaker. Martin Fowler’s circuit breaker is this idea: once failures reach a threshold, stop calling the dead dependency for a while. Here, 2 failed requests in a row skip the route for 60 seconds.

The model id for the DeepSeek route is deepseek-flash: the pricing page says to use it, and that the legacy names deepseek-v4-flash and deepseek-v4-flash-vision-exp are still accepted but served by DeepSeek-V4.1-Flash-1017. The change log dates that model’s release to 10 September 2026, four days before the outage above.

Worked config 1: a client-side chain

The loop below keeps DeepSeek as the primary route and uses the gateway as the second. It is asynchronous because asyncio.wait_for cancels the underlying request when the deadline passes, which closes the connection and frees the concurrency slot on DeepSeek’s side. We have not run this against DeepSeek’s live API during an outage, so read it as a pattern to adapt, and use the dead-socket test to check it behaves on your machine.

Python, async chain with deadline and breaker
import asyncio, os, random, time
from openai import AsyncOpenAI, APIConnectionError, APIStatusError

ROUTES = [
    {"name": "deepseek", "base_url": "https://api.deepseek.com",
     "key": os.environ["DEEPSEEK_API_KEY"], "model": "deepseek-flash"},
    {"name": "gateway", "base_url": "https://api.oneaiapikey.com/v1",
     "key": os.environ["ONEAIAPIKEY_API_KEY"], "model": "deepseek-deepseek-v4.1-flash:free",
     "headers": {"X-Fallback-Models": "hy4-flash:free,z-ai-glm-5.3:free,nvidia-deepseek-v4-1-flash:free"}},
]

DEADLINE = 45.0                     # wall-clock seconds per attempt, whatever bytes arrive meanwhile
RETRY = {429, 500, 502, 503, 504}   # pause, then try the same route once more
SKIP = {401, 402, 403}              # this route's account problem: next route, no retry
BREAK_AFTER, COOLDOWN = 2, 60       # skip a route for 60 s after 2 failed requests in a row

clients = {r["name"]: AsyncOpenAI(base_url=r["base_url"], api_key=r["key"], max_retries=0)
           for r in ROUTES}         # max_retries=0: this loop owns every retry
state = {r["name"]: {"fails": 0, "until": 0.0} for r in ROUTES}


async def ask(messages, max_tokens=1500):
    last = None
    for r in ROUTES:
        s = state[r["name"]]
        if time.monotonic() < s["until"]:
            continue                                  # breaker open: skip this route
        probing = s["fails"] >= BREAK_AFTER           # first call after the cooldown: one attempt only
        for attempt in range(1 if probing else 2):
            try:
                reply = await asyncio.wait_for(
                    clients[r["name"]].chat.completions.create(
                        model=r["model"], messages=messages, max_tokens=max_tokens,
                        extra_headers=r.get("headers")),
                    timeout=DEADLINE)
                s["fails"] = 0
                return r["name"], reply
            except APIStatusError as e:
                last = e
                if e.status_code in SKIP:
                    break
                if e.status_code not in RETRY:
                    raise                             # 400, 422: the request is the problem
            except (APIConnectionError, asyncio.TimeoutError) as e:
                last = e                              # connection errors and our own deadline
            if attempt == 0 and not probing:
                await asyncio.sleep(random.uniform(0, 1))
        s["fails"] += 1
        if s["fails"] >= BREAK_AFTER:
            s["until"] = time.monotonic() + COOLDOWN
    raise RuntimeError(f"every route failed, last error: {last!r}")


async def main():
    route, reply = await ask([{"role": "user", "content": "Reply with the word ready."}])
    print(route, reply.model, reply.choices[0].message.content)

asyncio.run(main())

What each part is for:

  • SKIP sends 401, 402 and 403 to the next route without a retry, because the cause is the account on that route. If DeepSeek returns 402 at 3 a.m., your agent keeps working on the second route and you top up in the morning.
  • raise on anything else stops the loop on a 400 or 422. A malformed request fails everywhere, and hiding it behind a fallback just moves the bug.
  • probing is the half-open state. After the cooldown the route gets one attempt, not two. If it fails again the breaker re-opens at once, so a dead route costs at most one 45-second attempt a minute, and only on the request that happens to arrive then. Raise COOLDOWN to 300 for a long outage.
  • The returned route name is for your logs. Record which route answered, or you will not know the bill or the quality changed.

The two attempts per route are deliberate: one retry catches a transient 503 without doubling the wait on a dead route, and the second route is the real second chance.

Wait budget on a dead route

Longest wait for one request (seconds)
91
Longest added wait before the breaker opens (seconds)
182
Same, in minutes
3.03
Stock SDK defaults (3 attempts x 600 s), in minutes
30.00
Slots held at 5 requests a second (DeepSeek flash limit: 2,500)
225
with a 600 s hang it would be 3,000

Worst cases for a route that accepts the request and never answers. Fast failures (refused connection, 503) cost far less. Defaults read from the OpenAI Python SDK README and DeepSeek's rate-limit page on 28 November 2026.

How do you test it without waiting for an outage?

The honest test of a fallback is a failing primary. This one needs no account and costs nothing: open a socket that completes the connection and then says nothing, the same shape as a hung provider, and point your primary route at it.

Dead-socket test
# Terminal 1: a socket that accepts connections and never answers (the kernel completes the TCP handshake)
python3 -c "import socket,time; s=socket.socket(); s.bind(('127.0.0.1',9999)); s.listen(); time.sleep(900)"

# Terminal 2: point the primary route at it, keep the second route real
#   "base_url": "http://127.0.0.1:9999/v1"   (in the deepseek entry of ROUTES)
# Expect: about 91 s on the first request, then the gateway route answers. The second failed
# request opens the breaker, and the third request skips the dead route and answers at once.
python3 chain.py

If the first request takes about 91 seconds and then answers from the second route, the deadline works. If it sits for minutes, your client is waiting on something other than the deadline: look for an outer retry layer or a library with its own timeout. Run it a second and a third time to see the breaker open and the route get skipped.

Worked config 2: let the gateway do the switching

If you would rather not own the loop, the gateway can handle the provider-error part for you. When a model fails before sending any part of the answer (a 429, a 5xx or an unavailable model), it retries the model you named, up to twice, then tries the fallback models you listed in X-Fallback-Models, in order, up to 3 ids. The routing documentation states this, along with two other facts that matter: only the attempt that answers is billed and counted, and your model allowlist applies to each fallback.

The change to existing OpenAI SDK code is one extra argument. A base URL swap is covered separately; here the point is the header:

Python, OpenAI SDK with a fallback header
import os
from openai import OpenAI

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

reply = client.chat.completions.create(
    model="deepseek-deepseek-v4.1-flash:free",
    max_tokens=400,
    messages=[{"role": "user", "content": "Reply with the word ready."}],
    extra_headers={"X-Fallback-Models": "hy4-flash:free,z-ai-glm-5.3:free,nvidia-deepseek-v4-1-flash:free"},
)
print(reply.model)  # the model that answered: after a fallback it differs from the id you named
print(reply.usage)

And the same call with curl, printing headers so you can see the reply metadata:

curl, free ids, headers shown
export ONEAIAPIKEY_API_KEY="paste-your-key-here"

curl -i https://api.oneaiapikey.com/v1/chat/completions \
  -H "Authorization: Bearer $ONEAIAPIKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Fallback-Models: hy4-flash:free,z-ai-glm-5.3:free,nvidia-deepseek-v4-1-flash:free" \
  -d '{
    "model": "deepseek-deepseek-v4.1-flash:free",
    "max_tokens": 400,
    "messages": [{"role": "user", "content": "Reply with the word ready."}]
  }'

When a fallback answers, the reply carries an X-Fallback-From header naming the model that failed, and the model field names the model that answered, per the headers reference. Log both. The free ids work after a Google sign-in with no card, and the quickstart shows creating the key.

What one fallback request does

Your code sends one requestmodel id plus X-Fallback-Models headerNamed model answers or errorsa 429, 5xx or unavailable model is an errorNamed model retried up to twicestill failing: go to the first fallbackFallbacks tried in orderup to 3 ids, your model allowlist appliesReply names who answeredX-Fallback-From header and the model field
This covers a provider that fails with an error before answering. It cannot help when a provider accepts a request and says nothing: on a stream the gateway ends it after 300 seconds of silence, so keep a client-side deadline too.

What can the gateway not catch?

Two failures stay with you. First, silence: a provider that accepts a request and never answers is not an error the gateway can act on until something ends the call, which on a stream is the 300-second idle limit in the streaming documentation. Your deadline handles that. Second, an error that arrives after the answer started streaming is passed on as it is, so a stream that ends without a finish reason is incomplete and your client has to decide whether to retry. The post on streaming against non-streaming responses covers that trade.

On the free lane the gateway also retries a failing :free call on another model by itself, so a plain call to one free id already has some cover before you add the header.

Which models belong in the fallback chain?

Order the chain by what survives a bad day, not by taste. We did three things: put the largest context first, mixed families, and kept one same-model id last as a lower-priority option. The ids below are all free-lane ids that bill $0 per token; the context numbers are read from the model catalogue at build time, so they cannot drift from the model pages.

Order Id Context (tokens) Why it is there
Primary deepseek-deepseek-v4.1-flash:free 1,048,576 The same model family you were calling, so answers feel familiar
Fallback 1 hy4-flash:free 1,048,576 Different maker, same window size, fast tier
Fallback 2 z-ai-glm-5.3:free 262,144 Different family again, listed for coding help on its model page
Fallback 3 nvidia-deepseek-v4-1-flash:free 131,072 DeepSeek V4.1 Flash again under another id, smallest window so last

Context window of each id in the chain, in tokens

  • deepseek-deepseek-v4.1-flash:free1,048,576
  • hy4-flash:free1,048,576
  • z-ai-glm-5.3:free262,144
  • nvidia-deepseek-v4-1-flash:free131,072
Values come from the model catalogue. A conversation that fits the first two will not fit the last one.

We do not publish which company hosts each free id, and the transparency page says what we monitor and what we cannot see. So do not assume the two DeepSeek ids fail independently: they may or may not share a host. Pairing one with ids from other makers is the safer bet, which is why the middle of the chain is not DeepSeek. The comparison of Hy4 Flash and DeepSeek V4.1 Flash shows how close the first two are on paper, and the free models list has every other id you could add. The ids on that list change: we removed 11 ids from our own lane on 25 November because the gateway log showed no successful request for them in 24 hours, and the launch post for the free ids from the day before had counted more. Check the list before you hard-code anything.

What changes when you fall back?

A fallback keeps the agent alive. It does not keep the behaviour identical, and four differences cause most of the surprises.

Context size. A coding agent can pack a long history into a 1M-token window. Fall back to a smaller window and the request fails with an error, or the gateway or provider truncates. The table above puts the longest-window ids first for that reason. Check the context column of every fallback against the longest conversation you actually send.

Tools. If a fallback model refuses tool calling, the gateway resends the request without tools and sets X-Tools-Dropped: 1 on the reply. An agent that ignores the header carries on, but it can no longer read files or run commands, which looks like the model suddenly being unhelpful. Treat that header as degraded mode: stop the agent, or tell the user. The tool calling guide covers which models support it.

Cache. DeepSeek’s pricing page lists deepseek-flash input at $0.003 per 1M tokens on a cache hit against $0.15 on a miss off-peak, a ratio of 50. A fallback route has a different cache, so the first call re-reads your whole prefix at the miss rate. With a 200,000-token context, that is 200,000 × $0.15 / 1,000,000 = $0.03 for the call, against 200,000 × $0.003 / 1,000,000 = $0.0006 on a hit. On a $0 free id the difference is zero, but on a paid fallback it is real, and the cost reduction guide shows how to keep prefixes stable.

Reasoning output and quality. DeepSeek’s thinking mode produces reasoning before the answer, which is why a small max_tokens can return no answer text. Other models use other formats. Answers also differ in quality. Run your own ten hardest prompts through each fallback once, before the outage, and write down which ones fail.

Two checks tell you who is answering. The model field in the reply names it, and the guide to verifying that an API serves the model it names gives checks you can run for free against any route, ours included.

How do you know DeepSeek is down before your users do?

Do not rely on a status page alone. Several commenters on 14 September said theirs disagreed with what they saw, and a status page is a human-maintained signal. Run a probe of your own: one request every 60 seconds to each route, with a 20-second limit, recording status code and time.

One-token liveness probe
# One-token liveness probe, run from cron or a scheduler every 60 s per route
curl -s -o /dev/null -w "%{http_code} %{time_total}s\n" --max-time 20 \
  https://api.deepseek.com/chat/completions \
  -H "Authorization: Bearer $DEEPSEEK_API_KEY" -H "Content-Type: application/json" \
  -d '{"model":"deepseek-flash","max_tokens":1,"messages":[{"role":"user","content":"hi"}]}'

It costs almost nothing. At DeepSeek’s peak rates read on 28 November (input $0.30 and output $1.20 per 1M tokens on a cache miss), a probe with about 20 input tokens and max_tokens of 1 uses per day:

  • input: 1,440 probes × 20 tokens = 28,800 tokens, and 28,800 × $0.30 / 1,000,000 = $0.0086;
  • output: 1,440 probes × 1 token = 1,440 tokens, and 1,440 × $1.20 / 1,000,000 = $0.0017;
  • total: about $0.0104 a day, or $0.31 over 30 days, at peak rates, which is the upper bound.

Because max_tokens is 1, the billed output is capped at one token. A 200 means the route answers. A hang past 20 seconds, a 5xx or a refused connection means it does not. Feed the result into the same breaker state as your real traffic, so a failing probe opens the breaker before an agent step pays for it. Observability tools can record failures, but they do not route around them; the post on Helicone alternatives separates logging from routing, and the LLM gateway guide explains what a routing layer adds.

On our side, the status page sends one real request to the gateway when you open it and shows what came back, with no hand-written message and no uptime figure. The rankings page shows what the gateway measured per model, and the uptime and fallbacks guide explains what we promise and what we only measure.

How long can a free fallback carry you?

Not all day, and it is better to know the number. The 48 free ids share one allowance per account: 100 requests and 3,000,000 tokens a day, in the chat and the API alike, refilling at 00:00 UTC. Past it the gateway answers 429 with the code daily_limit_free. The free LLM API comparison puts that next to other providers’ limits.

An agent that sends 3 requests a minute uses 100 requests in 100 / 3 = about 33 minutes. The token cap lasts longer: 3,000,000 tokens over 100 requests allows 30,000 tokens a request on average, which most agent steps stay under. So the request count is what ends it. That makes the free lane a bridge for a short outage, or enough to finish the task in front of you and save state, not a replacement for a day of agent work. Fallbacks also share this counter with your normal free-lane use, but only the attempt that answers is counted.

For a longer outage, or for work that must continue, you need a funded second route. Sign-up gives an account $10 of credit for priced models, but paid models are set up by hand, offline, so the route to a funded balance is email: write to somdutt777@gmail.com and see the pricing page. Adding credit is prepaid, and the prepaid credits guide shows what to check before you add any. To stop a runaway agent from draining either route, set a spend limit per key, and use the monthly cost estimate to size it.

DeepSeek direct is cheaper than any fallback we list here for the work it does well. Its pricing page shows $0.15 per 1M cache-miss input tokens off-peak. The case for a second route is the three hours in an evening, not the price per token.

Which setup fits your situation?

What are you running against DeepSeek?

A script or batch job

Use the client-side chain and run the dead-socket test once. A batch job can also just pause: write progress to disk, back off for 5 minutes on a 503, and resume. A second route only matters if the deadline on the job is tighter than the outage. The 429 guide covers pacing the job.

A coding agent in an editor

Point the agent at an OpenAI-compatible base URL that does the fallback for you, because you cannot put a loop inside most editors. The coding agent key guide shows the settings for Cline, Cursor, Codex CLI and Aider, and the header goes in the same place as any custom header. Watch for X-Tools-Dropped.

A product with users

Use both: a client-side deadline and breaker, and the gateway header as a second layer. Add a probe, log which route answered, and decide in advance what the user sees if every route fails. The uptime guide has the degrade-gracefully steps, and the provider checklist helps you pick the second route.

I run my own proxy

Keep it, and copy the three rules: wall-clock deadline, status-code sort, breaker. Most self-hosted proxies have fallback settings that cover the second and third. The LiteLLM alternatives guide and the hosted gateway comparison put numbers on the running cost.

Is your DeepSeek integration ready for the next outage?

0 of 9 done

Exposed

One bad evening and the agent waits it out. Start with the deadline and the second route.

What does this not fix?

Some limits are worth saying plainly.

  • It does not make a fallback as good as the model you chose. Quality, tool support and context differ, and you should look at your own prompts.
  • It does not remove the shared daily cap. Free ids share 100 requests a day; see the section above.
  • It cannot see a silent provider. On the gateway side only a 300-second idle limit on streams ends one; your deadline is the control you own.
  • It sends your prompts to another company. The company that runs a fallback model receives the request. Prompts and answers are not stored by the gateway and only counts are kept, and we do not train on your data, but that is the gateway’s behaviour, not the provider’s. Read each provider’s terms. API key security matters more once you hold two or three keys; keep each in an environment variable, never in the repository.
  • It is not a service level. We do not promise an uptime figure. The fee comparison and the broader gateway comparison show what other routers charge and promise, and you should read those with the same questions.

If you chose DeepSeek for its price and run at high volume, the honest answer may be to accept three hours of downtime a month and queue the work. The calculator earlier shows what each wait costs, and you can weigh it against what a second route costs to keep.

Test a fallback route before you need one

Sign in with Google, create a key, and send the curl call above. It uses 48 free ids, no card, 100 requests a day shared across them.

Frequently asked questions

Is the DeepSeek API down right now?
We cannot tell you from a blog post, and a status page is only one signal. DeepSeek publishes a status page, but on 14 September 2026 several commenters reported errors while they said it still showed operational. The reliable check is your own: send a one-token request to the API with a 20-second limit, as the probe in this post does, and read the status code. A 200 means it answers, a 5xx or a hang means it does not. Our own status page works the same way: it sends a real request to the gateway when you open it.
Which DeepSeek errors should I retry?
Retry 500 and 503, and pause before retrying a 429: DeepSeek's error code page says to retry a 500 and a 503 after a brief wait and to pace your requests after a 429. Do not retry 400, 401, 402 or 422: the same request fails the same way. A 401 or 402 is a problem with your account on that route, so a second route can still answer while you fix it. The error reference lists the gateway's own codes.
Why does my agent hang instead of failing?
Two reasons. DeepSeek documents that while a request waits for the model it keeps the connection open and sends empty lines (non-streaming) or keep-alive comments (streaming), and only closes it if inference has not started after 10 minutes. And the OpenAI Python SDK's default timeout is 10 minutes. A timeout that resets whenever bytes arrive may therefore never fire, which is why the config here uses a wall-clock deadline. We have not measured every HTTP client, so test yours with the dead-socket test above.
Can the gateway fall back for me, or do I need client code?
Both work, and they cover different failures. Send up to 3 model ids in X-Fallback-Models and the gateway retries the named model up to twice, then tries each fallback in order when the provider fails before answering, as the routing documentation states. It cannot see a provider that accepts a request and never answers, so a client-side deadline still matters. The uptime and fallbacks guide has the longer treatment.
How long does a free fallback last during an outage?
Not long if an agent is busy. The 48 free ids share 100 requests and 3,000,000 tokens a day per account, so an agent that sends 3 requests a minute uses the request cap in about 33 minutes. It is a stop-gap for a short outage or for finishing one task. For a longer one you need a funded route: paid models are set up by hand, offline, so email somdutt777@gmail.com and see the pricing page.
Will my prompts go to a different company when I fall back?
Yes. Each model runs at a company that receives the request, and a fallback model is another company's model. Prompts and answers are not stored by the gateway and only counts are kept, but the provider that runs the fallback processes what you send. If you chose DeepSeek for a data reason, check every fallback before you add it. The privacy guide and the privacy policy set out what is kept.
Does a fallback model behave like DeepSeek?
No, and some differences are silent. Context windows differ (the table above shows 131,072 tokens on the smallest id in the chain against 1,048,576 on the largest), a fallback that refuses tool calling has tools removed and the reply carries X-Tools-Dropped: 1, and answers differ in style and quality. Run your own prompts through each fallback once, and use the model verification checks to confirm what answered.
Do I need our gateway to use this fallback pattern?
No. The client-side loop works with any OpenAI-compatible endpoint, including a second direct provider or a self-hosted proxy, and the LiteLLM alternatives guide covers the self-hosted options. We publish this post and the gateway is our product, so the second half uses it as the worked example. The deadline, the status-code rules and the breaker are the part worth copying whichever route you choose.
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
Claim $10 credit →