What the error looks like
A response with code 402 andInsufficient Balance in the body. For example, in Python (OpenAI SDK):
type and code fields vary between versions — go by the 402 code and the Insufficient Balance text.
Why it happens
- The balance has run out. DeepSeek’s error code list says exactly that: 402 means there is no money left on the account; check the balance and top it up.
- Granted credit has expired. DeepSeek has granted (bonus) credit with an expiry date. When it expires and there is no money of your own on the account, you get the same error.
- It’s not only your code spending. Every tool using the key — IDE agents, bots, scripts — draws from one balance. Coding agents with long context burn through it faster than you’d expect.
How to check the balance
In your dashboard at platform.deepseek.com or with GET /user/balance:"is_available": false means there isn’t enough money for requests; total_balance shows what’s left.
What you can do
More on payment options: How to pay for the DeepSeek API.
How to connect DeepSeek via RuAPI
1
Sign up
Sign up at www.ruapi.ai — with email, Google or Yandex.
2
Top up
Console → Wallet: USDT or USDC (TRC20 / BEP20 / Polygon; USDT also on TON), from 5 USDT. No USDT yet? Buy it with rubles via SBP (Faster Payments System). Cards from foreign banks (Visa / Mastercard) are accepted too.
3
Key
Console → API Keys → Create API key — you’ll get an
sk-... string.4
Swap the key and address
In your code or your tool’s settings, set the address to
https://www.ruapi.ai/v1, the key to your RuAPI key, and the model to deepseek-flash or deepseek-v4-pro.deepseek-flash and deepseek-v4-pro differ and which to pick: DeepSeek API. Setting up Cline, Roo Code, Cursor and other tools: see the integrations section, for example Cline.
FAQ
Will a new DeepSeek key help?
Will a new DeepSeek key help?
No. The balance belongs to the whole account; a new key draws from the same one. You need to top up or use another provider.
Should I retry the request?
Should I retry the request?
No. Until the balance is topped up, every retry returns the same 402. If your tool retries on its own, turn retries off for code 402.
Are these the same DeepSeek models?
Are these the same DeepSeek models?
Yes. RuAPI serves DeepSeek models —
deepseek-flash and deepseek-v4-pro — over the same OpenAI-compatible protocol.Do I need a VPN?
Do I need a VPN?
No. The RuAPI site and API work directly, no VPN required.
Next steps
DeepSeek API
Models, capabilities and setup.
How to buy USDT with rubles
SBP, Sberbank, T-Bank — step by step.