api.foo
api.foo / Docs / DeepSeek API pricing

DeepSeek API Pricing (October 2026): Flash vs V4 Pro, Off-Peak Hours, Cache Hits and a Cost Calculator

Updated
On this page

Short answer: as of October 17, 2026, the DeepSeek API has two models. deepseek-flash (DeepSeek V4.1 Flash) costs $0.30 / $1.20 per million input / output tokens at peak and $0.15 / $0.60 off-peak. deepseek-v4-pro costs $1.32 / $3.96 at peak and $0.66 / $1.98 off-peak. Input that hits DeepSeek's automatic context cache costs 2–3% of the normal input price. Off-peak covers every weekend and all weekday hours outside 01:00–04:00 and 06:00–10:00 UTC, which includes the entire US working day.

Prices below are copied from DeepSeek's Models & Pricing page on October 17, 2026, in USD per million tokens. DeepSeek lowered prices when it released V4.1 Flash on September 10, 2026, and can change them again, so check the date at the top of this page.

Current prices

Model Time Input, cache hit Input, cache miss Output
deepseek-flash (V4.1 Flash) Off-peak $0.003 $0.15 $0.60
Peak $0.006 $0.30 $1.20
deepseek-v4-pro (V4 Pro 0813) Off-peak $0.022 $0.66 $1.98
Peak $0.044 $1.32 $3.96

Both models have a 1M-token context window and up to 384K output tokens, with no surcharge for long prompts. Both support JSON output, tool calls, the OpenAI Chat Completions and Responses formats, and the Anthropic Messages format. Only deepseek-flash accepts images.

There are no other line items for model calls: no per-request fee, no cache-write premium, and no monthly minimum. DeepSeek bills tokens × price from a prepaid balance.

Which model to use

  • deepseek-flash for almost everything: chat, extraction, summarization, coding assistance, and anything with images. It's about 4.4x cheaper than V4 Pro on input and 3.3x cheaper on output.
  • deepseek-v4-pro for hard reasoning and long agentic coding sessions. DeepSeek had planned to retire it on September 14, 2026, but kept it running at the same price after user demand, and says it will give notice before any change.

Peak and off-peak hours

Off-peak prices are exactly half of peak prices. Peak hours are Monday to Friday, 01:00–04:00 and 06:00–10:00 UTC, excluding Chinese public holidays. Every other hour is off-peak, including all of Saturday and Sunday and every Chinese public holiday.

Time zone Peak windows
UTC Mon–Fri 01:00–04:00 and 06:00–10:00
Beijing (UTC+8) Mon–Fri 09:00–12:00 and 14:00–18:00
US Eastern (EDT, until Nov 1, 2026) Sun–Thu 21:00–24:00, then Mon–Fri 02:00–06:00
US Pacific (PDT, until Nov 1, 2026) Sun–Thu 18:00–21:00 and 23:00–03:00

Peak hours are China's business hours. If you're in the Americas, your whole working day is off-peak, so interactive use during the day is billed at half price. In Europe, the 06:00–10:00 UTC window covers your weekday morning. After US daylight saving time ends on November 1, 2026, the US windows start one hour earlier in local time.

To keep costs down, schedule batch jobs, evaluations and backfills outside the peak windows. A job that runs entirely off-peak costs half as much as the same job at peak.

How cache hits work

DeepSeek's context caching is on for every account by default, and you don't change your code to use it. When a request starts with the same tokens as an earlier request, the matching part counts as a cache hit:

  • A multi-turn chat that resends the whole history hits the cache for everything except the newest messages.
  • Requests that share a long system prompt, tool definitions or a reference document hit the cache for that shared beginning.
  • Only an exact prefix matches. Put fixed content first and anything that changes per request, like a timestamp or user ID, at the end.

DeepSeek says the cache is best-effort, takes a few seconds to build, and is cleared after it goes unused, usually within hours to days. Each response tells you what you were billed for in its usage field:

"usage": {
  "prompt_tokens": 2150,
  "prompt_cache_hit_tokens": 1920,
  "prompt_cache_miss_tokens": 230,
  "completion_tokens": 640,
  "completion_tokens_details": { "reasoning_tokens": 410 }
}

prompt_tokens always equals hit plus miss tokens.

Thinking tokens are billed as output

Both models run in thinking mode by default, with the effort set to high. The model writes a chain of thought before its answer, and those tokens are counted in completion_tokens (broken out as reasoning_tokens), so they're billed at the output price. On short tasks the reasoning can be longer than the answer itself.

For simple requests, turn thinking off. With the OpenAI SDK, pass it in extra_body:

response = client.chat.completions.create(
    model="deepseek-flash",
    messages=[{"role": "user", "content": "Classify this ticket: ..."}],
    extra_body={"thinking": {"type": "disabled"}},
)

To keep thinking but make it shorter, set reasoning_effort to low. In the Anthropic format the equivalent setting is output_config.effort.

Cost calculator

Estimate a monthly bill at DeepSeek's October 2026 list prices. Count reasoning tokens as part of output. Traffic spread evenly across the week is about 21% peak (35 of the week's 168 hours).

Three worked examples

All three use the October 17, 2026 list prices above.

1. Support chatbot on deepseek-flash. 100,000 requests a month, 2,000 input tokens each with 60% cached (the system prompt and earlier turns), 300 output tokens, traffic spread evenly (21% peak). That's 120M cache-hit tokens, 80M cache-miss tokens and 30M output tokens: about $0.44 + $14.52 + $21.78 = $36.74 a month.

2. A developer's coding agent on deepseek-v4-pro, US daytime. 1,500 agent turns a month, 60,000 input tokens per turn with 90% cached (the repository context is resent every turn), 1,500 output tokens including reasoning, all off-peak. 81M cache-hit, 9M cache-miss and 2.25M output tokens: $1.78 + $5.94 + $4.46 = about $12.18 a month. The same work at peak costs about $24.35. With caching broken, for example by a timestamp at the top of the prompt, it costs about $63.86 off-peak, five times as much.

3. Overnight batch summarization on deepseek-flash. 1 million documents, 3,000 input tokens and 300 output tokens each, no cache hits, run off-peak. 3,000M input and 300M output tokens: $450 + $180 = $630. Run during peak hours, the same job costs $1,260.

DeepSeek vs Claude and GPT prices

Standard input / output prices per million tokens, without caching or batch discounts. Claude and OpenAI prices are from our Claude API pricing and OpenAI API pricing pages, checked October 15, 2026.

Model Input Output Cached input
deepseek-flash $0.15 off-peak / $0.30 peak $0.60 / $1.20 $0.003 / $0.006
Claude Haiku 5.5 (prompts up to 100K) $0.10 $0.50 $0.01
GPT-6 Luna $0.10 $0.50 $0.01
deepseek-v4-pro $0.66 / $1.32 $1.98 / $3.96 $0.022 / $0.044
Claude Sonnet 5.5 $2 $10 $0.10
GPT-6.1 Sol $2 $10 $0.10
Claude Opus 5.5 $4 $20 $0.20

What the table says:

  • Against mid-tier and frontier models, DeepSeek is far cheaper. deepseek-v4-pro off-peak costs about a third of Claude Sonnet 5.5 or GPT-6.1 Sol on input and a fifth on output.
  • At the budget end, DeepSeek is no longer the automatic winner. Claude Haiku 5.5 and GPT-6 Luna list below deepseek-flash, even at off-peak rates. Flash pulls ahead on cached input ($0.003, against $0.01) and on prompts above Haiku 5.5's 100K-token pricing threshold.
  • Prices per token don't compare tasks. Each model family uses its own tokenizer, and thinking models can spend many output tokens on reasoning. Run your real prompts through each model and compare the cost per completed task.

Rate limits

DeepSeek doesn't publish requests-per-minute limits. It limits concurrent requests per account: 2,500 for deepseek-flash and 500 for deepseek-v4-pro, counted across all your API keys. A request counts from the moment it's sent until the response finishes. Above the limit you get HTTP 429. DeepSeek says you can request more capacity at no extra cost.

Web search and fetch

Search and Fetch are separate APIs billed per successful request: $0.75 per 1,000 for each. DeepSeek said searches from Claude Code's Web Search tool and Codex's web_search would be free for the first two weeks after the Search API launch, with the end of that period announced separately.

Check what a request cost in Python

The DeepSeek API is OpenAI-compatible, so the official openai package works with a different base URL:

import os
from openai import OpenAI

PRICES = {  # USD per 1M tokens, off-peak: (cache hit, cache miss, output); peak is 2x
    "deepseek-flash": (0.003, 0.15, 0.60),
    "deepseek-v4-pro": (0.022, 0.66, 1.98),
}

client = OpenAI(api_key=os.environ["DEEPSEEK_API_KEY"], base_url="https://api.deepseek.com")

model = "deepseek-flash"
response = client.chat.completions.create(
    model=model,
    messages=[{"role": "user", "content": "Explain context caching in one sentence."}],
)

u = response.usage.model_dump()
hit, miss, out = PRICES[model]
cost = (u["prompt_cache_hit_tokens"] * hit + u["prompt_cache_miss_tokens"] * miss
        + u["completion_tokens"] * out) / 1_000_000
print(response.choices[0].message.content)
print(f"off-peak cost: ${cost:.6f}  (double it at peak)")

How to pay for the DeepSeek API

  1. Sign up on the DeepSeek Platform.
  2. Top up a prepaid balance. Usage is deducted from it, and any granted (promotional) balance is used first.
  3. Create an API key and use it with https://api.deepseek.com (OpenAI format) or https://api.deepseek.com/anthropic (Anthropic format).

There's no subscription and no monthly minimum.

Using DeepSeek through a multi-model gateway

If DeepSeek is the only model you need, the official API is the most direct and usually the cheapest route.

A gateway makes sense when you also call Claude, GPT or Gemini and want one key and one bill for all of them. api.foo, the service that publishes these docs, is one such gateway: it serves deepseek-flash and deepseek-v4-pro (plus the older deepseek-v4-flash and deepseek-v4.1-flash names) through the same OpenAI-compatible endpoint, https://api.foo/v1, and takes payment by card, Alipay, WeChat Pay or USDT (BNB Smart Chain). Its per-model prices are on the pricing page.

When you compare gateways, check whether they pass through DeepSeek's off-peak discount and cache-hit price, since a flat rate can cost more than the official API for cache-heavy or overnight workloads.

Sources

DeepSeek API documentation, checked October 17, 2026: Models & Pricing, Context Caching, Thinking Mode, Rate Limit & Isolation, Chat Completion API reference and the Change Log.

FAQ

How much does the DeepSeek API cost?

As of October 17, 2026, deepseek-flash (DeepSeek V4.1 Flash) costs $0.30 per million input tokens and $1.20 per million output tokens at peak, and half that off-peak ($0.15 and $0.60). deepseek-v4-pro costs $1.32 and $3.96 at peak, $0.66 and $1.98 off-peak. Input that hits the context cache costs $0.006 (Flash) or $0.044 (V4 Pro) per million at peak.

When are DeepSeek's off-peak hours?

Peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday, excluding Chinese public holidays. Every other hour, all weekend and Chinese public holidays are off-peak at half price. That is 9:00 to 12:00 and 14:00 to 18:00 Beijing time, so the normal US working day falls entirely in off-peak hours.

Is the DeepSeek API free?

No. DeepSeek's pricing page lists no free tier. Usage is deducted from a prepaid balance, and if your account has a granted (promotional) balance, that is used first.

Do DeepSeek thinking tokens cost extra?

They are billed as output tokens. Thinking mode is on by default with high effort, and the API counts the reasoning tokens inside completion_tokens. Turn thinking off for simple tasks to cut output cost.

What is a cache hit in DeepSeek pricing?

DeepSeek caches the beginning of your prompts automatically. When a new request starts with the same tokens as an earlier one, those tokens are billed at the cache-hit price, which is 2% of the normal input price on deepseek-flash and about 3% on deepseek-v4-pro. The response shows them in prompt_cache_hit_tokens.

Is DeepSeek cheaper than Claude or GPT?

Against frontier models, by a lot. deepseek-v4-pro off-peak costs $0.66 / $1.98 per million tokens, against $2 / $10 for Claude Sonnet 5.5 and GPT-6.1 Sol. At the budget end the gap has closed. Claude Haiku 5.5 and GPT-6 Luna list at $0.10 / $0.50, below deepseek-flash at peak. Flash wins mainly on cache hits and off-peak use.

Can I still use the model name deepseek-v4-flash?

Yes. DeepSeek retired V4 Flash on September 10, 2026, but requests to deepseek-v4-flash and deepseek-v4-flash-vision-exp are routed to V4.1 Flash and billed at the Flash price. DeepSeek recommends switching to deepseek-flash.

Found a mistake? Email [email protected].