This guide puts all of that in one place. You will see the current price of each DeepSeek model per 1M tokens, how a bill is worked out, what common jobs really cost, and which model fits which job. At the end, you will make your first API call.
TokenRoc prices checked 15 October 2026. This guide covers the DeepSeek Flash and Pro models available on TokenRoc, with one flat rate at every hour of the day.
DeepSeek API pricing at a glance
All prices are in USD per 1M tokens.

TokenRoc rates. All amounts below are USD per 1M tokens.
| TokenRoc model ID | Input | Output | Cached input |
|---|---|---|---|
deepseek-v4-flash | $0.32 | $1.30 | $0.032 |
deepseek-flash | $0.32 | $1.30 | $0.0128 |
deepseek-v4.1-flash | $0.32 | $1.30 | $0.0128 |
deepseek-v4-pro | $1.7778 | $3.5556 | Not priced separately |
The three Flash IDs have the same $0.32 input and $1.30 output rates. Cached input costs $0.032 with deepseek-v4-flash, and $0.0128 with deepseek-flash or deepseek-v4.1-flash. Choose the ID that fits your workload and compare actual usage in your logs.
How DeepSeek token pricing works
A token is a small piece of text. It can be a short word, part of a longer word, a number or a punctuation mark. As a rough guide, 1,000 tokens is about 750 English words. Chinese and code use tokens differently, so always check real numbers in your usage logs.
Every request has two parts, and each has its own price:
- Input tokens: everything you send. That is your system prompt, the chat history, any document you paste in, and the user's message.
- Output tokens: everything the model writes back. If a model thinks before it answers, those thinking tokens count as output too.
The cost of one request is:
cost = (input tokens / 1,000,000 x input price)
+ (output tokens / 1,000,000 x output price)Two things follow from this. First, output is usually the more expensive side, so a model that writes long answers costs more than one that answers briefly. Second, chat apps resend the whole history on every turn, so long conversations grow your input tokens quickly. That is where most surprise bills come from.
Cache hits. When requests reuse a long prefix, cached tokens have their own input rate. On TokenRoc, deepseek-flash and deepseek-v4.1-flash cost $0.0128 per 1M cached input tokens; deepseek-v4-flash costs $0.032. Uncached input uses the standard input rate.
What DeepSeek API calls really cost
Prices per 1M tokens are hard to picture, so here are common jobs, priced with TokenRoc's flat rates.

| Job | Tokens used | deepseek-v4-flash |
deepseek-v4-pro |
|---|---|---|---|
| Support chatbot: 1,000 conversations | 1.5M input, 0.5M output | $1.13 | $4.44 |
| Summarize one 100-page report | 70,000 input, 1,500 output | about $0.02 | about $0.13 |
| Coding helper: 200 requests a day for 30 days | 36M input, 6M output | $19.32 | $85.33 |
How the chatbot line is worked out. Each conversation uses about 1,500 input tokens and 500 output tokens, so 1,000 conversations use 1.5M input and 0.5M output. With deepseek-v4-flash, that is 1.5 x $0.32 + 0.5 x $1.30 = $1.13.
For the chatbot example, Flash costs about a quarter as much as Pro. Compare their answers on your own reasoning and complex code examples before choosing a model.
Cached-input example on TokenRoc. With deepseek-flash, 1M input tokens with 80% cache hits plus 200K output tokens costs 0.8 x $0.0128 + 0.2 x $0.32 + 0.2 x $1.30 = $0.01024 + $0.064 + $0.26 = $0.33 when rounded to cents (exact total: $0.33424).
Which DeepSeek model should you use?
A simple rule: start with a lower-cost model, test it on real examples from your app, and move up only when the answers are not good enough.
| If you need... | Use | Why |
|---|---|---|
| The lowest cost for chat, summaries, extraction or classification | deepseek-v4-flash |
A Flash model for everyday text tasks at $0.32 input and $1.30 output per 1M tokens |
| Repeated prompts with a long shared prefix | deepseek-flash |
Cached input at $0.0128 per 1M tokens |
| An explicit V4.1 Flash model ID | deepseek-v4.1-flash |
The same input, output and cached-input rates as deepseek-flash |
| The best answers on hard reasoning, maths or complex code | deepseek-v4-pro |
DeepSeek's top model, at a higher price |
A common setup is to use both: Flash for the bulk of simple requests, and Pro only for the hard ones. You choose the model per request, so switching costs nothing.
If you are comparing beyond DeepSeek, the same API key also gives you Qwen, Kimi K2.7 Code for coding work, and GLM. Model Square lists every model with its price, so you can compare them side by side.
How to use the DeepSeek API
The DeepSeek API follows the OpenAI Chat Completions format. If you have used the OpenAI SDK before, you only change two things: the base URL and the model name.
Step 1: get a DeepSeek API key. On TokenRoc it takes about five minutes:
- Create an account with a username and password. No card is needed.
- Open the Wallet page. Add funds through our secure checkout. Available payment methods are shown at checkout.
- Create a API key on the API Keys page.
Keep the API key on your server, for example in an environment variable. Never put it in browser or app code.
Step 2: make your first request. Install the OpenAI Python SDK with pip install openai, then run:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.tokenroc.com/v1",
api_key=os.environ["TOKENROC_API_KEY"],
)
reply = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain what an API is in two sentences."},
],
)
print(reply.choices[0].message.content)
print(reply.usage)The last line prints the token count for the request: prompt_tokens for input and completion_tokens for output. Multiply them by the prices above and you have the exact cost of that call.
The same request with curl:
curl https://api.tokenroc.com/v1/chat/completions \
-H "Authorization: Bearer $TOKENROC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [{"role": "user", "content": "Explain what an API is in two sentences."}]
}'To switch models, change only the model value, for example to deepseek-v4-pro. The rest of your code stays the same. The API quickstart covers the other endpoints and options.
How to track and lower your DeepSeek API cost
Track it. On TokenRoc, the Usage Logs page lists every request with its model, token counts and cost. The Wallet page shows your balance. Check both after your first day of real traffic, because that is when your true cost per user becomes clear.

Lower it. Five habits make the biggest difference:
- Pick a model that fits your budget. Test
deepseek-v4-flashfirst. Compare the answers on your own examples. - Trim the chat history. Send only the last few turns, or a short summary of older ones, instead of the whole conversation every time.
- Keep system prompts short. They are sent with every request, so every extra paragraph is paid for again and again.
- Cap the answer length. Set
max_tokensand ask for short answers when you do not need long ones. Output is the expensive side. - Route by difficulty. Send easy requests to Flash and only the hard ones to Pro.
A small test pays off here. Run 50 to 100 real requests through Flash, compare the answers with Pro, and look at the cost of each in your usage logs. Then decide with real numbers instead of guesses.
Frequently asked questions
How much does the DeepSeek API cost? On TokenRoc, deepseek-v4-flash, deepseek-flash and deepseek-v4.1-flash each cost $0.32 per 1M input tokens and $1.30 per 1M output tokens. Cached input is $0.032 for deepseek-v4-flash and $0.0128 for the other two.
Is the DeepSeek API free? No. You pay for the tokens used. On TokenRoc you can start with a $1 top-up; the number of tokens depends on the model and the input, output and cache mix.
Which DeepSeek model has a low input price? The three Flash IDs each cost $0.32 input and $1.30 output per 1M tokens. Cached-input rates differ: $0.032 for deepseek-v4-flash and $0.0128 for deepseek-flash and deepseek-v4.1-flash.
How do I get a DeepSeek API key? Create a TokenRoc account, add credit from $1, and make a API key on the API Keys page. The same API key also works for Qwen, Kimi, GLM and video models.
Does DeepSeek charge for thinking tokens? Yes. When a model reasons before it answers, those tokens are counted and billed as output.
Is the DeepSeek API compatible with OpenAI code? Yes. It uses the Chat Completions format, so the OpenAI SDKs work after you change the base URL and model name.
Why is my bill higher than I expected? Usually because of long chat history or long answers. Check the token counts in your usage logs, then trim the history and cap max_tokens.
Start with DeepSeek in five minutes
You now know what the DeepSeek API costs, how the bill is worked out and which model to start with. The quickest way to see your own numbers is to run the example above and open your usage logs.
Get your API key · Compare all models and prices · Read the quickstart
