Blog / DeepSeek

DeepSeek API pricing: V4.1 Flash costs and cache hits

DeepSeek V4.1 Flash costs $0.30 per 1M input tokens, $0.006 cached and $1.20 output at peak, half off-peak. Cache hits and OpenRouter prices explained.

DeepSeek API pricing: V4.1 Flash prices per million tokens, cache hits and OpenRouter providers

DeepSeek's API charges $0.30 per million input tokens on a cache miss, $0.006 on a cache hit and $1.20 per million output tokens for V4.1 Flash at peak. Off-peak, every price is half. Peak is 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday, and everything else is off-peak, per DeepSeek's pricing page.

Prices checked on 20 November 2026 at 02:34 UTC. DeepSeek's prices come from its pricing page. Other providers' prices come from OpenRouter's endpoints API. All prices are US dollars per million tokens. DeepSeek says it "reserves the right to change prices", so check the page before you plan a budget.

DeepSeek's official prices

On DeepSeek's API the model is called deepseek-flash. The pricing page says that name serves DeepSeek-V4.1-Flash-1017. The older name deepseek-v4-flash is retired, and requests that use it are served by V4.1 Flash at the Flash price.

Per 1M tokens V4.1 Flash, peak V4.1 Flash, off-peak V4 Pro, peak V4 Pro, off-peak
Input, cache hit $0.006 $0.003 $0.044 $0.022
Input, cache miss $0.30 $0.15 $1.32 $0.66
Output $1.20 $0.60 $3.96 $1.98

The page says: "Off-peak rates are half of the peak rates." Peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays. Weekends are off-peak all day, and so are Chinese public holidays. In Beijing time (UTC+8), peak is 09:00 to 12:00 and 14:00 to 18:00.

Other details from the same page: a 1M-token context, up to 384K output tokens, and a concurrency limit of 2,500 for deepseek-flash. Thinking mode is on by default.

How cache hits work on DeepSeek

Context caching is on for everyone. DeepSeek's caching guide says it "is enabled by default for all users". When a request starts with the same tokens as an earlier one, that shared prefix is a cache hit and is billed at the cache-hit price.

Each response reports the split in its usage block: prompt_cache_hit_tokens and prompt_cache_miss_tokens. The guide adds two limits. The cache works on a "best-effort" basis and "does not guarantee a 100% cache hit rate". Unused entries are cleared "usually within a few hours to a few days".

A cache hit costs 1/50 of a cache miss at the same hour ($0.006 against $0.30). That gap is why cache hits matter more than the headline price for some workloads.

A worked example: a coding agent's bill

Coding agents send their whole conversation again on every turn, so most of their input is a prefix the server has already seen. Claude Code's docs put it this way: "most of each request is identical to the one before it."

How much of the input is cached? One developer published a month of their own Claude Code usage: 4.24 billion cache-read tokens, or 95.5% of all input. That was on Anthropic's API, not DeepSeek's, and it is one person's log. Treat it as an example input, not a forecast.

Take these example inputs: 100 million input tokens and 1 million output tokens in a month. At DeepSeek's peak prices, the hit rate changes the bill like this:

Cache hit rate Cached input Uncached input Output Total, peak Total, all off-peak
95.5% (the developer's figure) 95.5M × $0.006 = $0.57 4.5M × $0.30 = $1.35 1M × $1.20 = $1.20 $3.12 $1.56
80% 80M × $0.006 = $0.48 20M × $0.30 = $6.00 $1.20 $7.68 $3.84
0% (no cache) $0 100M × $0.30 = $30.00 $1.20 $31.20 $15.60

Three things stand out:

  1. At a high hit rate, the cached tokens are the smallest line. 95.5 million cached tokens cost $0.57. The 4.5 million uncached tokens and the 1 million output tokens make up the rest.
  2. Each lost point of hit rate is expensive. Going from 95.5% to 80% moves 15.5 million tokens from $0.006 to $0.30 per million. The bill more than doubles.
  3. Off-peak halves everything. Batch jobs that can wait for off-peak hours pay half.

Things that break the prefix, and so lower your hit rate: changing the model mid-session, changing the tool list and editing the system prompt early in the conversation. Claude Code's caching docs list more.

To turn a token mix like this into a cost on your own GPUs instead, see how to calculate cost per million tokens and self-hosting DeepSeek vs the API.

What other providers charge on OpenRouter

OpenRouter listed 51 endpoints for deepseek/deepseek-v4.1-flash-1017 when we fetched its endpoints API on 20 November 2026 at 02:34 UTC. The table below keeps 12 of them: DeepSeek itself, the lowest price on each line, and a few large providers for reference. Every column comes from that API response.

Provider (endpoint) Input Cached input Output Quantization Max output Uptime, last day
DeepSeek ¹ $0.30 $0.006 $1.20 unknown 393,216 100%
Particle AI (us/flex) ² $0.03 $0.003 $0.25 unknown 131,072 99.7%
Wafer (us) $0.036 $0.01 $0.50 mxfp4 943,718 100%
Ambient (fp4) $0.045 $0.0025 $0.25 fp4 943,718 84.8%
OpenInference (fp4) $0.06 $0.002 $0.90 fp4 943,718 99.9%
DeepInfra (fp8) ³ $0.098 $0.00294 $0.294 fp8 393,216 99.9%
Cloudflare $0.10 $0.003 $0.60 unknown 943,718 100%
Cohere (fp8) $0.115 $0.0025 $0.40 fp8 384,000 100%
SiliconFlow (fp8) $0.15 $0.003 $0.60 fp8 393,216 100%
Nebius (fp4) ³ $0.18 $0.0036 $0.72 fp4 943,718 100%
Together $0.30 $0.006 $1.20 unknown 943,718 100%
BaseTen (fast) ² $0.60 $0.014 $2.40 unknown 262,144 100%

¹ DeepSeek's endpoint on OpenRouter follows the same peak and off-peak schedule as its own API. The base price is the peak price, and the API lists the off-peak hours and weekends at half.

² Particle AI's flex endpoint is in OpenRouter's flex tier, and BaseTen's fast endpoint is in the priority tier. Neither gets traffic by default. See the routing notes below.

³ Promotional. The endpoints API reports a discount on these lines, and the prices shown are after it. Without it, DeepInfra fp8 is $0.20 / $0.006 / $0.60 and Nebius is $0.30 / $0.006 / $1.20 (our arithmetic from the API's discount field). Seven other endpoints also showed a discount, including StepFun, Novita and GMICloud.

In this snapshot, the lowest price on each line was:

  • Input (cache miss): Particle AI flex at $0.03, then Wafer US at $0.036.
  • Cached input: OpenInference at $0.002, then StepFun at $0.0021 (promotional).
  • Output: DeepInfra flex at $0.2352 (promotional), then Particle AI flex and Ambient at $0.25.

No endpoint was lowest on all three. Apply the example above: 95.5% hit rate, 100M input and 1M output. The totals are $0.67 for Particle AI flex, $1.16 for Cohere, $1.36 for OpenInference and $1.62 for Wafer US. Wafer has the second-lowest input price but a higher cached price, so it ends up last of the four. These assume each provider caches as well as the developer's log above, which you can't take for granted. Check the cached-token counts on your own bills.

Routing caveats

  • Flex and priority tiers are opt-in. OpenRouter's provider selection docs say appending :floor to the model slug sorts by price and makes flex-tier endpoints eligible. :nitro sorts by throughput and makes priority-tier endpoints eligible. Without :floor, the default routing skips Particle AI flex.
  • Default routing isn't "cheapest first". Without a sort, OpenRouter balances price, throughput, latency and reliability. You can set sort to price, throughput or latency, and max_price to cap what you pay.
  • Promotions end. Budget on the list price, not the promotional one.
  • Time-of-day prices. DeepSeek and Alibaba both change price by UTC hour on OpenRouter. Alibaba's endpoint charges half from 14:00 to 24:00 UTC.
  • Snapshots age. We fetched these prices once. They change, so fetch the endpoints API yourself before you decide.

How to choose

Start from your own token mix: cached input, uncached input and output per day. Your provider's usage fields give you all three. Then:

  1. Input-heavy with a high hit rate (coding agents, chat with long history): compare cached-input and output prices first. The headline input price matters less.
  2. Input-heavy with a low hit rate (one-off document processing, RAG over changing documents): the uncached input price decides the bill.
  3. Output-heavy (long generations): compare output prices first.
  4. Cache support. Every endpoint in the snapshot reported supports_implicit_caching: true, but the price is only part of it. How often you actually hit depends on whether your requests keep landing on the same provider.
  5. Quantization. Endpoints run fp4, mxfp4 or fp8, and many report unknown. The official checkpoint ships with FP4 experts and FP8 dense weights, per vLLM's recipe. Run your own prompts before you switch, because answers can differ.
  6. Data retention. OpenRouter's provider selection docs let you set data_collection to deny ("use only providers which do not collect user data") or zdr: true to route only to zero-data-retention endpoints. Both shrink the list of endpoints you can use.
  7. Limits. Max output ranged from 131,072 to 943,718 tokens in the snapshot, and Ambient showed 84.8% uptime over the last day.

If you own GPUs

Every price above is a rate you pay someone else per token. If you own Nvidia GPUs, you can serve V4.1 Flash yourself. The model needs a lot of memory. The official checkpoint is about 510 GB, and vLLM's recipe calls 8 × 80 GB "the smallest NVIDIA node that serves this checkpoint". Our DeepSeek hub collects our guides on serving it. To try an open model on a GPU you own, dl model sets one up with vLLM and tests it; see the docs.

FAQs

How much does the DeepSeek API cost for V4.1 Flash?

$0.30 per million uncached input tokens, $0.006 per million cached input tokens and $1.20 per million output tokens at peak. Off-peak prices are half: $0.15, $0.003 and $0.60. Source: DeepSeek's pricing page, checked 20 November 2026.

When are DeepSeek's off-peak hours?

Peak is 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday. Every other hour is off-peak, including all of Saturday and Sunday and Chinese public holidays.

What is a cache hit on the DeepSeek API?

Input tokens at the start of a request that match a prefix DeepSeek has already processed. Caching is on by default. Each response reports prompt_cache_hit_tokens and prompt_cache_miss_tokens, and hits are billed at $0.006 per million at peak instead of $0.30.

Is DeepSeek V4.1 Flash cheaper on OpenRouter?

Some endpoints list lower prices than DeepSeek's own. On 20 November 2026, Particle AI's flex endpoint listed $0.03 input, $0.003 cached and $0.25 output, but you need the :floor suffix to route to it. Several low prices were promotions.

Does the old deepseek-v4-flash model name still work?

Yes. DeepSeek's pricing page says the legacy name is retired and its requests are served by DeepSeek-V4.1-Flash-1017 at the Flash price.

How much does DeepSeek V4 Pro cost?

At peak, $1.32 per million uncached input tokens, $0.044 cached and $3.96 output. Off-peak is half. Source: DeepSeek's pricing page.