DeepSeek API: what it is and how it differs from the DeepSeek chat
A chat is for people, an API is for programs. What the DeepSeek API is, which models exist, how tokens are billed and how to send a first request.
5 min · · models · API keys
The query "what is the DeepSeek API" is usually typed by people who use the DeepSeek chat and heard that there is also an API. In short: a chat is for a person, an API is for a program. Through the API your code, bot, editor or agent sends a request to the model and gets an answer, and you pay per token. Below we cover how it works, which models exist and how to send a first request.
How the API differs from the DeepSeek chat
In the chat you open a site or an app, type a message and read the answer. Limits, history and interface are set by the service. The API works differently:
- a program sends the request:
curl, Python, Node.js, an editor extension; - you decide what goes into the request: a system instruction, history, files, parameters;
- you pay per token, not through a subscription;
- the answer arrives as JSON that code can process: save it, parse it, pass it on.
This matters when a task repeats many times (classifying thousands of tickets, generating descriptions), when you embed a model in a product, or when you want to connect DeepSeek to a tool such as Cline or opencode. For one-off questions a chat is more convenient.
Which DeepSeek models exist
Models available in Zukko on October 18, 2026, with prices per 1M tokens:
| Model | Input / output | Context | Image input | Strength index |
|---|---|---|---|---|
deepseek-v4-pro | $0.075 / $0.225 | 1M | yes | 36 |
deepseek-v4.1-flash | $0.013 / $0.038 | 1M | no | 39 |
deepseek-v4-flash | $0.025 / $0.063 | 1M | no | 35 |
The strength index is the Intelligence Index from Artificial Analysis; we give no other quality figures. Note that deepseek-v4.1-flash has a higher index than deepseek-v4-pro and a lower price, but Pro accepts images. Which model handles your task better is decided by testing on your data. The current list and prices: GET https://api.zukko.pro/v1/models or the "Models" page in the dashboard.
How tokens are counted
A token is a piece of text: a word, part of a word or a symbol. Russian text usually takes more tokens than English, see the separate article on tokens in Russian. Two quantities are counted in every request:
- input tokens: everything you sent (instruction, history, document, question);
- output tokens: what the model answered.
The cost formula for a request:
cost = input × input price + output × output priceExample on deepseek-v4.1-flash (0.013 / 0.038 per 1M tokens): a request with 2,000 input tokens and 500 output tokens.
- input: 2,000 × 0.013 / 1,000,000 = $0.000026;
- output: 500 × 0.038 / 1,000,000 = $0.000019;
- total $0.000045.
The same request on deepseek-v4-pro (0.075 / 0.225): 2,000 × 0.075 / 1,000,000 = $0.00015 and 500 × 0.225 / 1,000,000 = $0.0001125, total $0.0002625. For comparison, at the official prices from our table (Flash 0.15 / 0.6) the same request would cost 2,000 × 0.15 / 1,000,000 + 500 × 0.6 / 1,000,000 = $0.0003 + $0.0003 = $0.0006. Provider prices change, so calculate on current values.
How caching works
If several requests start with the same long block (an instruction, a document), the provider may count it as "cache". For DeepSeek in Zukko, cache reads are counted if the provider reports them in the response; cache writes are not billed separately. The cache read price for deepseek-v4.1-flash is $0.013 per 1M, equal to the input price, so on the bill the cache changes nothing here; deepseek-v4-pro and deepseek-v4-flash are the same (0.075 and 0.025). Details on cache: key limits and cache.
First request: OpenAI-compatible format
DeepSeek also has its own developer platform at https://api.deepseek.com with its own model names: registration and payment terms there are set by the company itself, so check api-docs.deepseek.com. Below is an example through the Zukko gateway. Requests use the chat/completions format that any OpenAI library understands. You need three things: a base URL, a key and a model name.
- Create a key on the API keys page and top up the balance (from $1).
- Export the key:
export ZUKKO_API_KEY="fetch_your_key"- Send the request:
curl https://api.zukko.pro/v1/chat/completions \
-H "Authorization: Bearer $ZUKKO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4.1-flash",
"messages": [
{"role": "system", "content": "You answer briefly and to the point."},
{"role": "user", "content": "Explain what a token is in two sentences."}
],
"max_tokens": 200
}'The same in Python with the official openai SDK:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.zukko.pro/v1",
api_key=os.environ["ZUKKO_API_KEY"],
)
resp = client.chat.completions.create(
model="deepseek-v4.1-flash",
messages=[
{"role": "system", "content": "You answer briefly and to the point."},
{"role": "user", "content": "Explain what a token is in two sentences."},
],
max_tokens=200,
)
print(resp.choices[0].message.content)
print(resp.usage)The response includes a usage block with input and output token counts, handy for checking cost against the formula above. Request parameters are described in the Chat Completions reference.
When DeepSeek through the API makes sense
We do not claim the model is "better" or "worse" than others: test on your own tasks. What the table numbers do say: the DeepSeek line is among the cheapest in the catalog, all three models have a 1M token context, and deepseek-v4-pro accepts images. So it makes sense to try it where price decides: bulk text processing, rough agent work. A comparison with another budget option: DeepSeek or Gemini Flash.
FAQ
Are the DeepSeek API and the DeepSeek chat the same thing?
No. The chat is a ready interface for a person, the API is a way to call the model from code and pay per token. Limits, history and formatting are up to you in the API.
Do I need a subscription for the API?
No, it is pay-as-you-go from a dollar balance. You top it up through SBP (the payment page adds an 8.5% fee on top), MasterCard or crypto.
Does the OpenAI SDK work with DeepSeek?
Yes. Set base_url="https://api.zukko.pro/v1", your key and a model name such as deepseek-v4.1-flash. The rest of the code is the same as for any model in the chat completions format.
How do I avoid overspending while testing?
Set a daily limit on the key and cap max_tokens. To connect, create a key in the dashboard and start with deepseek-v4.1-flash, the cheapest of the three.
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.
Related articles
- xAI Grok API: Connecting Grok 4.7, Price and the 256K ContextHow to call grok-4.7 through an OpenAI-compatible API, what to do about the 256K context limit and what typical requests cost. Plus a comparison with Grok 4.6.
- Grok API from Russia: connecting without a foreign cardStep by step connection to Grok 4.7, 4.6 and 4.5 through a gateway: key, address, first request in curl and Python, streaming, images and payment by SBP or crypto.
- Claude Sonnet 5.5 via API: connection, prices and cache at October 18, 2026How to call claude-sonnet-5-5 from Python and curl, what a typical request costs with and without cache, and how it differs from Sonnet 5 and Sonnet 4.6.
- Claude on Android in Russia: what to do if the app won't installIf the official Claude app won't install on Android in Russia, you can still use the model from your phone: through the gateway's web chat or a client with your own key.