Skip to main content
In short: DeepSeek itself returns this error when the account behind the key has run out of money. Retrying won’t help — you need to top up your DeepSeek balance. If you can’t top up (your card is declined, PayPal isn’t available), connect the same DeepSeek models via RuAPI: you swap the key and the address, and pay in USDT or with a card from a foreign bank.

What the error looks like

A response with code 402 and Insufficient Balance in the body. For example, in Python (OpenAI SDK):
Cline, Roo Code, Claude Code and other tools usually show it shorter:
The 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.
How 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

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.
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.
Yes. RuAPI serves DeepSeek models — deepseek-flash and deepseek-v4-pro — over the same OpenAI-compatible protocol.
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.