DeepSeek has published a detailed error code reference for its API, providing developers with clear guidance on troubleshooting common issues. The documentation covers seven error codes ranging from 400 to 503, each with specific causes and solutions.
The most frequent errors include 400 Invalid Format (incorrect request body), 401 Authentication Fails (wrong API key), and 402 Insufficient Balance (account balance depleted). For these, DeepSeek advises checking the request format, API key, or account balance respectively.
Other errors include 422 Invalid Parameters (incorrect request parameters), 429 Rate Limit Reached (requests too fast), 500 Server Error (internal server issue), and 503 Server Overloaded (high traffic). Solutions range from modifying parameters to retrying after a wait or switching to alternative LLM providers temporarily.