Neural network API
DeepSeek API: how to connect it and where to keep your data
The DeepSeek API works with a key from the DeepSeek platform and accepts requests in the OpenAI format. But on 16 October 2026, the DeepSeek privacy policy says personal data is collected, processed and stored in China. If your requests contain client data, you can run the same model on your own server: the weights of DeepSeek R1 are open under the MIT license.
Access from Russia:No country list; the terms do not promise access in every jurisdiction(checked 2026-10-16, source)
In short: two paths to DeepSeek
The first path: the official API at platform.deepseek.com. You top up the balance, create a key and send requests to https://api.deepseek.com. This is a fast start, but DeepSeek processes the requests on its side.
The second path: open weights. On 20 January 2025, DeepSeek released the R1 model with open weights under the MIT license, and you can download it and run it on your own hardware. Then requests do not leave your network.
The choice depends on the data. The cloud suits texts without personal data. For client correspondence, contracts and anything that falls under 152-FZ, Russia’s personal data law, your own server is safer. What else works officially in Russia is collected on a separate page.
The official API: key, models, prices
You create the key in the API keys section of the DeepSeek platform after signing in. The service is paid in advance: under the open platform terms (in force from 29 April 2026), the product page on the platform site sets the top-up methods and prices, and an unused balance is refunded on request only in full. In its FAQ on 16 October 2026, DeepSeek names the top-up methods: PayPal, bank card, Alipay and WeChat Pay; a topped-up balance does not expire.
On 16 October 2026, the documentation lists two models: deepseek-flash (version DeepSeek-V4.1-Flash) and deepseek-v4-pro (version DeepSeek-V4-Pro-0813). Both have a context of 1 million tokens, output up to 384 thousand tokens, modes with and without reasoning, function calling (tool calls) and JSON output. Only deepseek-flash accepts images as input.
The API still accepts the old names deepseek-v4-flash and deepseek-v4-flash-vision-exp, but those models are retired: V4.1-Flash serves such requests at the Flash price.
The price is per million tokens, separately for input and output. Input tokens are cheaper if the request hits the cache (cache hit). On weekdays from 01:00 to 04:00 and from 06:00 to 10:00 UTC, except Chinese public holidays, peak prices apply; at other times and on weekends, prices are half as high. The gift balance is charged first, then the topped-up one.
DeepSeek reserves the right to change prices and advises topping up by actual use. See the figures by model in the API price comparison, and the cloud API cost calculator shows a monthly budget for your volume.
Compatibility with OpenAI
The DeepSeek platform accepts requests in the OpenAI and Anthropic formats. For code written for OpenAI, change the address to https://api.deepseek.com, the key and the model name in your usual library. For the Anthropic format, the address is https://api.deepseek.com/anthropic.
On 16 October 2026, both models support the Responses API, function calling, JSON output and chat prefix completion in beta. Fill-in-the-middle (FIM) completion works only in the mode without reasoning.
The same format makes a move easy. If you later move DeepSeek to your own server, the application keeps sending requests in the OpenAI format, and only the address and the key change. How such an interface works is covered on the page about the OpenAI-compatible API.
Where your requests are stored
The DeepSeek privacy policy (updated 10 February 2026) says that to provide its services, the company directly collects, processes and stores personal data in the People’s Republic of China. The purposes of processing include training and improving models, while the user may refuse the use of their data for training.
The open platform terms do not name the storage location. The DeepSeek policy does not cover the data of end users of applications that developers build on the platform: the developer, that is your company, discloses its own processing rules.
DeepSeek has already had leaks. On 29 January 2025, Wiz researchers found a DeepSeek database open without a password: more than a million log lines with chat history and secret API keys. After the report, DeepSeek closed access quickly.
For a Russian company, this is a legal question. Under 152-FZ, Russia’s personal data law, since 1 March 2023 an operator must notify Roskomnadzor, the regulator, before a cross-border transfer of personal data, and the data of Russian citizens is collected and stored in databases in Russia. Under 420-FZ, since 30 May 2025 a company pays 1 to 3% of revenue for a repeat leak, but no less than $300,000 and no more than $6 million.
Open weights: DeepSeek on your own server
The R1 weights are published under the MIT license, so you can download the model and run it on your own server or in your own data center in Russia. Then requests are processed where your hardware stands, and personal data does not go to China.
On your own server, you set the logs, access rights and retention period. A server in Russia lets you keep the data of Russian citizens in databases in Russia, as 152-FZ requires, and no requests go to China.
Before launch, estimate the load: how many requests a day, how long they are and how many users work at once. These numbers decide the choice of model version and server. An overview of open models and their requirements is in the section on sovereign AI.
If you have no server of your own, you can take a dedicated API on open models. In our service, these are DeepSeek, Qwen and other open-weights models, the format is compatible with OpenAI, and you see the logs and the request processing.
Limits and large volumes
On 16 October 2026, DeepSeek counts the limit of concurrent requests for the whole account, regardless of the key: 2,500 for deepseek-flash and 500 for deepseek-v4-pro. A request takes a place in the limit from the moment it is sent until the answer ends.
When the limit is exceeded, the API returns an HTTP 429 error. Under high load, the connection stays open: the server sends empty lines or keep-alive comments. If processing of a request has not started in 10 minutes, the server closes the connection.
You can raise the limit through the capacity request form, and DeepSeek says this is free. For a load of millions of requests, build a queue and a retry on error 429 into the code, and make client timeouts longer than the 10-minute wait.
Questions and answers
How do you get a DeepSeek API key?
Can you run DeepSeek on your own server?
Is it safe to send client data to DeepSeek?
Sources and dates
- DeepSeek API Docs, Models & Pricing, checked 16 October 2026api-docs.deepseek.com
- DeepSeek API Docs, Rate Limit, checked 16 October 2026api-docs.deepseek.com
- DeepSeek API Docs, Your First API Call, checked 16 October 2026api-docs.deepseek.com
- DeepSeek, Privacy Policy (updated 10 February 2026), checked 16 October 2026cdn.deepseek.com
- DeepSeek, Open Platform Terms of Service (from 29 April 2026), checked 16 October 2026cdn.deepseek.com
- DeepSeek, FAQ: Top Up, Refund, checked 16 October 2026api-docs.deepseek.com
- Simon Willison, DeepSeek R1 (20 January 2025), checked 16 October 2026simonwillison.net
- Wiz Research (29 January 2025), checked 16 October 2026wiz.io
- Brace Law Firm, cross-border transfer of personal data, checked 16 October 2026brace-lf.com
- ppt.ru, Federal Law 420-FZ (30 November 2024), checked 16 October 2026ppt.ru