DeepSeek API errors and rate limits
402 means insufficient balance — top up before retrying. 429 means rate or concurrency limits — slow down and retry with backoff.
500 and 503 mean server issues — retry after a short wait. Do not retry other 4xx errors without fixing the request.
Concurrency limits: 2,500 simultaneous requests for deepseek-flash and 500 for deepseek-v4-pro per account.
Official sources
Chat model error codes
Table copied from the official error codes page (cause and fix columns summarized).
| HTTP | Name | Cause | Fix |
|---|---|---|---|
| 400 | Invalid Format | Invalid request body format. | Fix the JSON/body using hints in the error message; see API docs. |
| 401 | Authentication Fails | Wrong or missing API key. | Check the Authorization header and create a key on the DeepSeek Platform if needed. |
| 402 | Insufficient Balance | Account balance is zero. | Top up on the platform before retrying. |
| 422 | Invalid Parameters | Invalid parameters in the request. | Adjust parameters per the error message. |
| 429 | Rate Limit Reached | Too many requests or concurrency/QPS limit exceeded. | Slow down; see Rate Limit & Isolation and retry with backoff. |
| 500 | Server Error | Server-side issue. | Retry after a brief wait; contact DeepSeek if it persists. |
| 503 | Server Overloaded | High traffic overload. | Retry after a brief wait. |
Concurrency limits
Per account, documented on Rate Limit & Isolation:
deepseek-flash: 2,500 concurrent requestsdeepseek-v4-pro: 500 concurrent requests
A request counts from send until the model response completes. Over-limit requests return HTTP 429. Search and Fetch have separate QPS caps (100 / 25) on the Search guide.
When to retry
- Retry 500, 503, and 429 after a short backoff.
- Fix 400, 401, 402, and 422 before retrying (402 needs a top-up).
- Do not hammer the API on persistent 4xx errors — read the message first.
FAQ
Pace requests and retry with backoff when you exceed concurrency or QPS limits.
The error codes page points to Rate Limit & Isolation for model concurrency. Search/Fetch 429s have separate QPS caps (100 Search / 25 Fetch).
On the API, HTTP 503 means the server is overloaded due to high traffic — retry after a brief wait.