How to get a DeepSeek API key
The key is issued in your account at platform.deepseek.com. You can register with an email or through a third-party account, and the platform does not block Russian IPs. After signing in, create a key in the API keys section. The format is the usual one for OpenAI-compatible services: a string like sk-....
The API itself is compatible with the OpenAI format, so moving an SDK to DeepSeek usually comes down to swapping base_url and the key in your config. The documentation on endpoints and parameters is at api-docs.deepseek.com.
What "getting the API for free" means
DeepSeek has no permanent free tier. The model runs on prepayment: you top up a balance and pay for tokens as you use them. Some people confuse the free chat at deepseek.com with the API. The chat in a browser really is free, while API calls take money from the balance from the very first request.
Prices of deepseek-v4-pro and deepseek-flash
The current lineup as of September 2026: deepseek-v4-pro (GA since 13 August 2026) for heavy tasks and deepseek-flash (released 10 September 2026) for fast, cheap requests. The old identifiers deepseek-v4-flash and deepseek-v4-flash-vision-exp are kept for backward compatibility and are routed to the new flash internally.
The price per 1 million tokens depends on the hour: at peak it is almost twice the off-peak figure. The numbers come from the official pricing page:
| Model | Input, cache hit | Input, cache miss | Output |
|---|---|---|---|
| deepseek-flash | $0.003-0.006 | $0.15-0.3 | $0.6-1.2 |
| deepseek-v4-pro | $0.022-0.044 | $0.66-1.32 | $1.98-3.96 |
The lower end of each range applies off-peak (a 50% discount on the peak price). Check the peak-hour schedule and any tariff changes on DeepSeek's page before you work out a budget: this provider changes its prices more often than the big Western players do.
There is no separate "coding plan" with a fixed subscription, like GLM or Qwen have, at DeepSeek as of September 2026. Only pay-as-you-go is available.
Why payment from Russia fails
There is no IP block: the site, the documentation and key creation all work without a VPN. The snag sits in a different link of the payment chain. According to users, DeepSeek does not accept cards from Russian banks directly, including Mir, and asks for a foreign card to top up. DeepSeek has made no official statement on this, but complaints about this step keep turning up in Russian-language discussions.
In practice three paths remain:
- A foreign card issued by a bank outside Russia.
- A virtual card through an intermediary service that charges a conversion fee.
- Switching to a provider that accepts rubles and SBP straight away.
The first two solve the problem once, but they add a fee and a dependence on an intermediary that can shut down at any moment. The third removes the problem entirely, if what you need is not DeepSeek by name but access to a strong model for work.
DeepSeek through codexkey
DeepSeek is connected in codexkey: the catalog has deepseek-v4-pro, deepseek-v4-flash and deepseek-v4.1-flash. Top-ups start at $1, you pay with a Russian card or SBP, and you need no VPN and no account on platform.deepseek.com. Claude, GPT, Gemini and other models sit alongside, so one key covers both cheap bulk requests and agentic coding.
The key is created in the dashboard, the format is sk_cdx_..., and the API works with the Anthropic SDK:
export ANTHROPIC_BASE_URL="https://api.codexkey.online"
export ANTHROPIC_API_KEY="sk_cdx_your_key"
Catalog prices as of 29 October 2026, input / output per 1M tokens: deepseek-v4.1-flash $0.04 / $0.16, deepseek-v4-flash $0.08 / $0.22, deepseek-v4-pro $0.12 / $0.34. For comparison, claude-sonnet-5 costs $0.52 / $2.6, claude-opus-5-5 $0.86 / $4.32, gpt-6-sol $0.14 / $0.68. Where the deciding factor is the price of a large volume of simple tokens, DeepSeek's flash models remain the cheapest. For agentic coding, long project context and tasks where model reliability matters, Claude usually earns back the price difference.
The full model list and current figures are on the models page and the pricing page.
FAQ
How do I get a DeepSeek API from Russia?
Register at platform.deepseek.com: access by IP is not blocked. Create a key in the API keys section. The difficulty comes not here but at the balance top-up, because Russian cards are not accepted directly.
How do I pay for the DeepSeek API from Russia?
There is no official way to pay with a ruble card. Users take foreign cards or intermediary services that top up the balance for a fee. DeepSeek publishes no single recommended method.
Can I use the DeepSeek API for free?
There is no permanent free tier for the API, only prepaid tokens. Only the web chat in a browser is free, and that is a separate product, not the API.
How much does deepseek-v4-pro cost per 1 million tokens?
According to the official pricing page, input on a cache miss costs $0.66-1.32 and output $1.98-3.96, depending on peak or off-peak hours. Check api-docs.deepseek.com for exact figures and any changes.
What if I cannot pay for DeepSeek at all?
Look at a provider that accepts rubles and SBP straight away. If the task does not need the DeepSeek model by name and you just want access to a strong model through an API, this gets around the problem without intermediaries or fees.