Error Codes
When calling DeepSeek API, you may encounter errors. Here are the causes and solutions.
| Code | Description | Solution |
|---|---|---|
| 400 | Invalid request body format, e.g., incomplete JSON. | Modify your request body per our API docs and retry. |
| 401 | Authentication fails due to wrong API key. | Check your API key. Create a new one if needed. |
| 402 | Insufficient balance. | Top up your account balance. |
| 422 | Invalid request parameters, e.g., unsupported model or parameter values out of range. | Modify request parameters per our API docs. |
| 429 | Sending requests too quickly. | Pace your requests reasonably. |
| 500 | Server-side issue. | Retry with backoff. If persists, contact support. |
| 503 | Server overloaded. | Retry after a short delay. |