Contextwaise

DeepSeek API pricing

The DeepSeek API bills three prices per million tokens: input on a cache miss, input on a cache hit, and output. At peak hours, DeepSeek V4.1 Flash costs $0.30 input and $1.20 output, and DeepSeek V4 Pro $1.32 and $3.96. Off-peak, every price is half. A cache hit costs 2% of the miss price on Flash and 3.3% on Pro, with no setup and no write fee. There is no Batch API: off-peak hours are DeepSeek's discount for work that can wait.

USD per 1M tokens, peak-hour prices first. Checked November 5, 2026 against the official DeepSeek pricing page.

ModelInput (cache miss)OutputInput (cache hit)Off-peak cache hitOff-peak inputOff-peak output
DeepSeek V4.1 Flash
Model name deepseek-flash · 1M context · text and images
$0.30$1.20$0.006$0.003$0.15$0.60
DeepSeek V4 Pro
Model name deepseek-v4-pro · 1M context · text only
$1.32$3.96$0.044$0.022$0.66$1.98

DeepSeek API cost calculator

Enter one request's tokens and your monthly volume to compare every current DeepSeek model, with and without context caching and off-peak hours.

ModelPer monthWith cachingWith ContextwaiseOff-peak
DeepSeek V4.1 Flash$660$366
$316
−14%
$183
DeepSeek V4 Pro$2,838$1,562
$845
−46%
$781

List prices for text input, at peak-hour rates unless marked off-peak. “With caching” bills the cached share at the cache-read price and leaves out cache writes, which are small once a cache stays warm. “With Contextwaise” adds Contextwaise on top of caching: it removes 65% of the uncached input (the cut measured on the demo requests), keeps the cached prefix byte for byte, and includes the cheapest plan for the tokens it reads. Your cut depends on your traffic. “Off-peak” is the same workload with caching, run entirely in off-peak hours, where every price is halved. Long-context prices apply automatically above each model's threshold.

See the cut on your own requests before you pay for a single token.

How DeepSeek API pricing works

DeepSeek bills "the number of tokens × price", deducted from a prepaid balance. Each request has three token counts, and each has its own price:

  • Input, cache miss: input tokens DeepSeek has not cached yet. The first time a prompt is seen, all of it is a miss.
  • Input, cache hit: the start of your prompt that matches a prefix DeepSeek already cached. Caching is on for every account, with no code change.
  • Output: the answer plus the model's reasoning. Thinking mode is on by default, and its reasoning tokens are billed as output.
  • Time of day: peak hours are 01:00–04:00 and 06:00–10:00 UTC, Monday to Friday. Every other hour is off-peak, and all three prices are half.
  • Search and Fetch: two standalone tool APIs, $0.75 per 1,000 successful requests each.

Every response reports what it was billed on: usage.prompt_cache_hit_tokens, usage.prompt_cache_miss_tokens and usage.completion_tokens, which includes completion_tokens_details.reasoning_tokens. This function prices one response from those fields:

Python
PRICES = {  # peak; off-peak is half of each
    "deepseek-flash":  {"hit": 0.006, "miss": 0.30, "output": 1.20},
    "deepseek-v4-pro": {"hit": 0.044, "miss": 1.32, "output": 3.96},
}

def cost_usd(model: str, usage: dict, off_peak: bool = False) -> float:
    p = PRICES[model]
    total = (usage["prompt_cache_hit_tokens"] * p["hit"]
             + usage["prompt_cache_miss_tokens"] * p["miss"]
             + usage["completion_tokens"] * p["output"]) / 1_000_000
    return total / 2 if off_peak else total
Cost of one DeepSeek response, from its usage object (USD per 1M tokens, peak prices)

DeepSeek's rule of thumb is 1 English character ≈ 0.3 token and 1 Chinese character ≈ 0.6 token; the exact count is the one in usage. DeepSeek also publishes an offline tokenizer on its token usage page. For a quick estimate across providers, paste a prompt into the token counter.

Every DeepSeek API price, peak and off-peak

The full price list from DeepSeek's Models & Pricing page, USD per million tokens:

Price per 1M tokensV4.1 Flash, peakV4.1 Flash, off-peakV4 Pro, peakV4 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
DeepSeek V4.1 FlashDeepSeek V4 Pro
Model name in the APIdeepseek-flashdeepseek-v4-pro
Model versionDeepSeek-V4.1-Flash-1017DeepSeek-V4-Pro-0813
Context length1M tokens1M tokens
Maximum output384K tokens384K tokens
Image inputYesNo
Concurrent requests per account2,500500

Both models take the OpenAI format at https://api.deepseek.com and the Anthropic format at https://api.deepseek.com/anthropic, and support thinking and non-thinking modes, JSON output, tool calls and the Responses API. Prices are the same whichever format you call.

DeepSeek peak and off-peak hours in your time zone

Peak hours are 01:00–04:00 and 06:00–10:00 UTC, Monday to Friday, except Chinese public holidays. Everything else is off-peak: weekends, Chinese public holidays in full, and 17 of the 24 hours of every weekday. Peak covers 35 of the 168 hours in a week, about 21%. Here are the peak windows in local winter time:

Time zonePeak window 1Peak window 2Local days
UTC / London (GMT)01:00–04:0006:00–10:00Mon–Fri
Beijing, Singapore (UTC+8)09:00–12:0014:00–18:00Mon–Fri
Tokyo, Seoul (UTC+9)10:00–13:0015:00–19:00Mon–Fri
India (UTC+5:30)06:30–09:3011:30–15:30Mon–Fri
Paris, Berlin (UTC+1)02:00–05:0007:00–11:00Mon–Fri
New York (UTC−5)20:00–23:0001:00–05:00Sun–Thu evening, then Mon–Fri night
San Francisco (UTC−8)17:00–20:0022:00–02:00Sun–Thu

In practice: US working hours are off-peak (on the West Coast until 5 p.m.), European mornings until 11:00 are peak, and East Asian working hours are mostly peak. Daylight saving time moves the local rows by an hour from March; the UTC row doesn't change.

  • Schedule work that can wait. Nightly evaluations, document backfills, data enrichment and report generation cost half if they run outside the windows above. That's DeepSeek's version of a Batch API, without the 24-hour wait.
  • Leave a margin at the edges. The pricing page doesn't say whether a long request that crosses 01:00 or 06:00 UTC is billed at the start or end rate. Stop scheduled jobs a few minutes early.
  • Count holidays in your budget. Chinese public holidays are off-peak all day, so a month with Golden Week or Spring Festival costs less for the same traffic.

What V4.1 Flash and V4 Pro cost for the same job

Take 1 million classification requests a month, each with 1,000 input tokens and a 20-token answer, with no cache hits and thinking turned off:

ModelInput costOutput costPeak totalOff-peak total
DeepSeek V4.1 Flash$300$24$324$162
DeepSeek V4 Pro$1,320$79.20$1,399.20$699.60

Pro costs 4.4× Flash on input and 3.3× on output. Flash is also the one with image input and 5× the concurrency, so start on Flash and move a request type to Pro only when Flash fails your evaluation set.

Thinking is where a DeepSeek bill can quietly double. It's on by default, and every reasoning token is billed at the output price. If the classifier above left thinking on and the model reasoned for 300 tokens before each 20-token answer, Flash would add $360 a month, more than the whole peak bill, and Pro would add $1,188. The thinking section shows how to turn it off. The LLM cost optimization guide covers routing between models and the other levers.

Context caching: a cache hit costs 2% of a miss

DeepSeek's context caching is on by default and stores prompt prefixes on disk. There is no cache write fee, no storage fee and no minimum length documented. A hit is billed at $0.006 on Flash against $0.30 for a miss, 98% off; on Pro $0.044 against $1.32, about 97% off. The rules, from DeepSeek's context caching guide:

  • A hit needs a full match of a cached unit. Each request saves a prefix unit at the end of your input and another at the end of the output. A later request hits only if it starts with one of those units exactly.
  • Multi-turn chats hit naturally. Turn 2 re-sends turn 1 plus a new message, so turn 1 (input and answer) is a hit.
  • Shared prefixes are learned. If two requests share a start (the same system prompt and document, different questions), the first two miss, DeepSeek then saves the shared part, and the third hits.
  • Long inputs are cut into units at fixed intervals, so a very long prompt can still hit part of the way.
  • Best effort. Hits are not guaranteed, a cache takes seconds to build, and unused caches are cleared within a few hours to a few days.
  • `user_id` isolates the cache between your end users, for privacy. Users with different user_id values don't share each other's cached prefixes.

What caching is worth on a chat or agent workload: 100,000 requests a month, each 20,000 input tokens of which 15,000 are a repeated prefix (system prompt, tools, history), and 500 output tokens:

ModelNo cache hits75% cache hits, peak75% cache hits, off-peak
DeepSeek V4.1 Flash$660$219$109.50
DeepSeek V4 Pro$2,838$924$462

Caching and off-peak together cut this bill by 83 to 84%. To keep the hit rate high: put stable content first (instructions, tool definitions, reference documents), keep history append-only, don't put a timestamp or request ID at the top of the prompt, and log prompt_cache_hit_tokens to see the real rate. The same rules apply on every provider; the Anthropic prompt caching guide explains why prefix order matters, and the context engineering guide covers what to keep in the prompt at all.

Thinking mode: reasoning tokens are billed as output

Both models think by default at high effort. Reasoning comes back in reasoning_content, is counted in completion_tokens, and is billed at the output price. You have two controls: turn thinking off, or lower the effort to low (max raises it).

Python
from openai import OpenAI

client = OpenAI(api_key="<DeepSeek API key>", base_url="https://api.deepseek.com")

response = client.chat.completions.create(
    model="deepseek-flash",
    messages=[{"role": "user", "content": "Classify this ticket: ..."}],
    extra_body={"thinking": {"type": "disabled"}},  # or keep it on with reasoning_effort="low"
)
print(response.usage)  # completion_tokens now holds the answer only
Turn thinking off for simple tasks (OpenAI SDK)
  • Without tools, earlier reasoning is not added to the next turn's context, even if you send it back. It costs output once.
  • With tools, you must pass back the reasoning_content of earlier turns, and it is added to the context. An agent pays for its reasoning once as output, then again as input on every later call, usually at the cache-hit price because the history is unchanged.

DeepSeek vs Claude, GPT and Gemini prices

List prices per million tokens, from each provider's pricing page:

ModelInputOutputCached input
DeepSeek V4.1 Flash, off-peak$0.15$0.60$0.003
DeepSeek V4.1 Flash, peak$0.30$1.20$0.006
Claude Haiku 5.5$0.10$0.50$0.01
GPT-6 Luna$0.10$0.50$0.01
Gemini 3.1 Flash-Lite$0.25$1.50$0.025
DeepSeek V4 Pro, off-peak$0.66$1.98$0.022
DeepSeek V4 Pro, peak$1.32$3.96$0.044
Claude Sonnet 5.5$2$10$0.10
GPT-6.1 Sol$2$10$0.10
Gemini 3.1 Pro Preview$2$12$0.20
  • Small models: Claude Haiku 5.5 and GPT-6 Luna have a lower uncached input and output price than V4.1 Flash, even off-peak. Flash is cheaper on cache hits, so it wins on agent and chat traffic where most input is a repeated prefix.
  • Mid-tier models: V4 Pro is cheaper on every price than Claude Sonnet 5.5, GPT-6.1 Sol and Gemini 3.1 Pro. Against Sonnet 5.5 and GPT-6.1 Sol it costs 34% less on input and 60% less on output at peak, and 67% and 80% less off-peak.
  • Tokens are not the same size. DeepSeek's rule of thumb is 0.3 tokens per English character, against about 0.25 for GPT and Gemini and 0.4 for current Claude models, so the same text is roughly 1.2× the tokens of GPT and 0.75× those of Claude.
  • Batch: Claude, OpenAI and Gemini halve prices through a Batch API that returns within 24 hours; DeepSeek halves them by the clock.

Price per task depends on the workload, not the price list. The LLM pricing comparison runs the same app through every Claude, GPT and Gemini model; the provider pages have the full lists for Claude and Gemini. Quality per dollar is a separate test: run your own evaluation set before switching.

Other charges and billing rules

  • Search and Fetch APIs: $0.75 per 1,000 successful requests each, at any hour. The pages they return cost input tokens when you put them in a prompt.
  • Images (V4.1 Flash only) are billed as input tokens. Images are resized before inference, with a maximum token count per image; DeepSeek's token usage page has a calculator by width and height.
  • Prepaid balance: charges come out of your topped-up balance, and a granted balance, if you have one, is used first.
  • Concurrency: 2,500 concurrent requests on Flash and 500 on Pro per account; past that you get HTTP 429. Raising the limit is free on request.
  • Prices can change. DeepSeek moved to peak and off-peak pricing on August 16, 2026, lowered prices with V4.1 Flash on September 10, 2026, and kept them unchanged with the October 17 Flash-1017 update. We check the pricing page and update this one when it changes.

Frequently asked questions

How much does the DeepSeek API cost?

At peak hours, DeepSeek V4.1 Flash costs $0.30 per million input tokens on a cache miss, $0.006 on a cache hit and $1.20 per million output tokens. DeepSeek V4 Pro costs $1.32, $0.044 and $3.96. Off-peak, every price is half.

What are DeepSeek's off-peak hours?

Every hour except 01:00–04:00 and 06:00–10:00 UTC on weekdays. Weekends and Chinese public holidays are off-peak all day. In New York (winter time) peak is 8–11 p.m. Sunday to Thursday and 1–5 a.m. Monday to Friday, so the US working day is off-peak.

How much is DeepSeek V4 Pro per million tokens?

$1.32 input (cache miss), $0.044 input (cache hit) and $3.96 output at peak hours; $0.66, $0.022 and $1.98 off-peak. Call it with the model name deepseek-v4-pro.

How much is DeepSeek V4.1 Flash per million tokens?

$0.30 input (cache miss), $0.006 input (cache hit) and $1.20 output at peak hours; $0.15, $0.003 and $0.60 off-peak. The model name is deepseek-flash. The older names deepseek-v4-flash and deepseek-v4-flash-vision-exp are routed to it and billed at the same price.

Does DeepSeek have a Batch API?

No Batch API is listed in DeepSeek's documentation. Its discount for work that can wait is off-peak pricing: every price is half outside 01:00–04:00 and 06:00–10:00 UTC on weekdays.

Is the DeepSeek API free?

No free tier is listed on DeepSeek's pricing page. Usage is deducted from a balance you top up; a granted balance, if your account has one, is used first.

Does DeepSeek charge for thinking tokens?

Yes. Thinking mode is on by default, and reasoning tokens are part of completion_tokens, billed at the output price. Turn it off with {"thinking": {"type": "disabled"}} or lower reasoning_effort to low for simple tasks.

What happened to deepseek-chat and deepseek-reasoner?

DeepSeek announced on April 24, 2026 that both names would be discontinued on July 24, 2026; until then they pointed to V4 Flash's non-thinking and thinking modes. Use deepseek-flash or deepseek-v4-pro with the thinking parameter instead.

Is DeepSeek cheaper than Claude or GPT?

At the mid tier, yes: V4 Pro costs $1.32 input and $3.96 output at peak against $2 and $10 for Claude Sonnet 5.5 and GPT-6.1 Sol. At the small end, Claude Haiku 5.5 and GPT-6 Luna list a lower uncached price ($0.10 and $0.50) than V4.1 Flash, which is cheaper only on cache hits. See Claude API pricing and the LLM pricing comparison.

Cut your LLM costs
without cutting quality.

One layer between retrieval and inference removes the context your model never needed, in milliseconds. Fewer input tokens, lower cost, a prompt cache that keeps hitting, and every removal logged with its reason.

See it live
Keep your model, retriever and prompts. Remove one call to roll back.