Skip to contentOceanToken

5 min read

DeepSeek API 429 Rate Limit and Server Busy: How to Fix

Hitting a DeepSeek API 429 rate limit or a server busy error? How the concurrency limit works, what 503 means, and a retry pattern with a cap and a fallback.

By OceanToken Team

DeepSeek API 429 Rate Limit and Server Busy: How to Fix

Editor's note: A 429 is not an outage. It means you are running more requests at once than your account allows. We think most "DeepSeek is down" posts are really unbounded concurrency in a worker pool, plus long reasoning calls that hold slots for minutes. Cap your concurrency before you blame the provider, and only then add a second endpoint.

Short answer: The DeepSeek API 429 rate limit is a concurrency limit per account: 2,500 requests at once for deepseek-flash and 500 for deepseek-v4-pro. Going over returns HTTP 429. A 503 means DeepSeek's servers are overloaded. Cap parallel requests, retry with jittered backoff, shorten how long each call holds a slot, and keep a second endpoint for bursts.

How the DeepSeek API 429 rate limit works

DeepSeek's rate-limit page  counts a request as one concurrent connection from the moment it is sent until the response is complete. Three things follow.

  • Slow calls use more capacity. Ten thinking-mode calls that each run 90 seconds hold ten slots for 90 seconds. If you see 429 only while reasoning jobs run, that is why.
  • The limit is per account, not per key. DeepSeek applies it at the account level, whichever key you use. More keys do not help.
  • You can ask for more. A capacity expansion form is linked from the page, and DeepSeek says expansion has no extra cost.

The user_id lever

If you serve many end users from one account, pass user_id. With the OpenAI SDK, use extra_body={"user_id": "u_123"}.

On standard accounts, all ids share the one account limit. Accounts with expanded capacity also get a limit per user_id: 2,500 for deepseek-flash and 500 for deepseek-v4-pro. Going over that returns 429 too.

Use only ASCII letters, digits, underscores and hyphens, keep the value under 512 bytes, and never put personal data in it.

Is "server busy" the same as 429?

No. DeepSeek's error code table separates them:

Code Name What it means What to do
429 Rate Limit Reached You are over your concurrency limit Lower parallelism, then back off
500 Server Error A fault on DeepSeek's side Wait briefly and retry
503 Server Overloaded High traffic on DeepSeek's side Wait briefly and retry

The table does not use the words "server busy". The closest match is 503. Only a 429 is fixed by lowering your own parallelism.

What the odd bytes in the response are

While a request waits, non-streaming responses send empty lines. Streaming responses send : keep-alive SSE comments. Standard SDKs handle these, but a hand-rolled HTTP client has to skip them.

If inference has not started after 10 minutes, the server closes the connection. Set client timeouts above your real p99, but not infinite.

Diagnosis table

Symptom Likely cause Action
429 right after a burst Over concurrency Cap with a semaphore, then back off
429 only while reasoning jobs run Slots held for minutes Lower effort or turn thinking off for simple calls
Long silence, then an answer Queued under load Raise the timeout, stream
Connection closed near 10 minutes Never scheduled Retry, possibly on another endpoint
429 for one user_id only Per-id limit on an expanded account Spread or throttle that user
503 Server Overloaded Load on DeepSeek's side Back off, or move batch work off-peak

Fix list, in order of effect

  • Cap concurrency well below your limit so retries have headroom. Most apps never need hundreds of parallel calls. Start near 50 and raise it.
  • Retry on 429 and 503 with exponential backoff and jitter, not a tight loop. Guides such as fast.io's  describe this pattern.
  • Shorten holds. Thinking is on by default, at high effort. For classification or extraction, send thinking: {"type": "disabled"}. Otherwise set reasoning_effort to low or high rather than max.
  • Stream with stream=True, so you can see progress and cancel dead calls. That frees a slot.
  • Move batch work off-peak. DeepSeek's off-peak rate is half the peak rate. Peak is 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday.
  • Make retries idempotent. A timed-out request may still have run, so store a request id to avoid double writes.
  • Add a second endpoint for overflow, behind the same wrapper.

Our take: Treat 429 as a normal control signal, like a cache miss. A wrapper with a concurrency cap, jitter and one fallback removes most of what looks like instability. Track your 429 rate per hour for a week before you decide a provider is unreliable.

How to test this on your workload

  1. Send the same 300 short prompts at pool sizes of 25, 100 and 400, with thinking off.
  2. Repeat with thinking on.
  3. Record the 429 count, the 503 count, and p50 and p95 latency for each run.
  4. Pick the largest pool size that keeps 429s near zero, and set your cap below it.

Running it on OceanToken as a second endpoint

OceanToken works as an overflow route for DeepSeek with base URL https://api.oceantoken.ai/v1. Use deepseek/deepseek-v4.1-flash (model page) or deepseek/deepseek-v4-pro (model page).

Limits work differently there. OceanToken limits each key by requests and tokens per minute. Going over returns 429 rate_limited with a Retry-After header. If every channel for a model is busy, you get 429 provider_overloaded, which is the moment to back off or switch models.

See the current rate on /deepseek-api.

import asyncio, random
from openai import AsyncOpenAI, RateLimitError, APIStatusError

c = AsyncOpenAI(base_url="https://api.oceantoken.ai/v1", api_key="YOUR_OCEANTOKEN_KEY", timeout=300)
sem = asyncio.Semaphore(50)

async def ask(prompt, tries=5):
    async with sem:
        for i in range(tries):
            try:
                r = await c.chat.completions.create(
                    model="deepseek/deepseek-v4.1-flash",
                    messages=[{"role": "user", "content": prompt}])
                return r.choices[0].message.content
            except (RateLimitError, APIStatusError) as e:
                if not isinstance(e, RateLimitError) and e.status_code < 500:
                    raise  # other 4xx: do not retry
                wait = e.response.headers.get("retry-after")
                await asyncio.sleep(float(wait) if wait else min(60, 2 ** i) * (0.5 + random.random()))
    raise RuntimeError("gave up")

async def main():
    print(len(await asyncio.gather(*[ask(f"Say {i}") for i in range(200)])))

asyncio.run(main())

FAQ

What is the DeepSeek API rate limit? It is a concurrency limit per account: 2,500 for deepseek-flash and 500 for deepseek-v4-pro. The rate-limit page lists no requests-per-minute cap.

Does adding API keys raise my limit? No. DeepSeek counts the limit at the account level.

Why is my request hanging instead of failing? It may be waiting for capacity. The server sends keep-alive lines and closes the connection if inference has not started in 10 minutes.

Can I get a higher limit? Yes, through the capacity expansion form on the rate-limit page. DeepSeek says there is no extra cost.

Does streaming reduce 429s? Not directly. It lets you cancel hopeless calls early, which frees slots.

Sources

  1. DeepSeek API: rate limit  (checked 2026-11-02)
  2. DeepSeek API: error codes  (checked 2026-11-02)
  3. DeepSeek API: models and pricing  (checked 2026-11-02)
  4. DeepSeek API: thinking mode  (checked 2026-11-02)
  5. fast.io: DeepSeek rate limits and backoff  (checked 2026-11-02)
  6. OceanToken docs: rate limits  (checked 2026-11-02)
  7. OceanToken DeepSeek API page (checked 2026-11-02)

Get your OceanToken API key

  1. Create an OceanToken account and an API key.
  2. Copy the snippet below, paste your key, and run it.
  3. Check the current rate on /deepseek-api.
curl https://api.oceantoken.ai/v1/chat/completions \
  -H "Authorization: Bearer $OCEANTOKEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "deepseek/deepseek-v4.1-flash", "messages": [{"role": "user", "content": "Hello"}]}'

Get API Key 

  • DeepSeek
  • LLM API
  1. 7 min read

    Hailuo Video Problems: 10 Fixes by Symptom

    Hailuo video problems sorted by symptom: morphing faces, static or frantic motion, ignored camera moves, refused requests. Causes, fixes and a triage table.

    • Hailuo
    • AI video
  2. 7 min read

    Kling Hands and Faces Artifacts: Fixes

    Kling hands and faces artifacts in one shot: extra fingers, merged grips, face morphing, teeth. A five-minute frame check and prompt fixes from Kling's guides.

    • Kling
    • AI video
  3. 7 min read

    Seedance Face Rejected? Why and What to Do

    Seedance face rejected? Real-person photos, public figures and some prompts trip the content filter. How to read content_filtered and fix the input honestly.

    • Seedance
    • AI video