DeepSeek API pricing: off-peak rates, cache hits, and real bills

DeepSeek API pricing as of November 16, 2026: Flash and V4 Pro rates, off-peak hours, cache-hit rules, concurrency limits, host prices, and a tested calculator.

Published
Reading time
16 min read
Level
Intermediate
By
AI for Devs
TL;DR
  • DeepSeek API pricing as of November 16, 2026: deepseek-flash (V4.1 Flash 1017) costs $0.30 per million cache-miss input tokens, $0.006 per million cache hits, and $1.20 per million output tokens at peak, and deepseek-v4-pro costs $1.32, $0.044, and $3.96.
  • Off-peak rates are half of peak and apply to every hour except 01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays, so a New York team working 9:00 to 18:00 pays off-peak rates all day.
  • Context caching is automatic with no write fee, and a hit costs 2% of a miss on Flash, so a 40-call agent session costs $0.13 at peak with hits and $1.30 without them.
  • On V4 Pro 0813, Together and Baseten match DeepSeek's input and output prices but charge about three times its cache-hit price, which makes the same agent session about 60% more expensive.
  • The TypeScript calculator in this guide ran on Node 26.12.1 with no API calls, and a script matched its 14 price cells against DeepSeek's page.

DeepSeek API pricing is metered per million tokens, with three rates per model: cache-hit input, cache-miss input, and output. Since August 16, 2026, each rate also has a peak price and an off-peak price at half. Every figure here was read from DeepSeek's pricing page on November 16, 2026. This guide works out which hours are cheap from your time zone, when the disk cache hits, what the concurrency limits mean for throughput, and how the same open weights price at other hosts.

#DeepSeek API pricing by model

The DeepSeek API sells two models as of November 16, 2026. deepseek-flash serves DeepSeek-V4.1-Flash-1017 at $0.30 per million cache-miss input tokens at peak, and deepseek-v4-pro serves DeepSeek-V4-Pro-0813 at $1.32. Output costs 4 times the cache-miss price on Flash and 3 times on V4 Pro.

Prices last checked

Prices last checked November 16, 2026. DeepSeek changed them twice in 25 days: peak and off-peak pricing started at 16:00 UTC on August 16, 2026, and a price cut took effect at 04:00 UTC on September 10 with V4.1 Flash.

This table is stale if DeepSeek changes a rate, moves a peak window, or changes the model version behind either name. The change log records each of those.

Model and periodCache-hit inputCache-miss inputOutputConcurrency limit
deepseek-flash, peak$0.006$0.30$1.202,500
deepseek-flash, off-peak$0.003$0.15$0.602,500
deepseek-v4-pro, peak$0.044$1.32$3.96500
deepseek-v4-pro, off-peak$0.022$0.66$1.98500

Prices are USD per million tokens. Both models take a 1M-token context and up to 384K output tokens (393,216), run thinking mode by default, and bill the same on the OpenAI-format and Anthropic-format base URLs. Flash accepts images and V4 Pro does not.

The legacy names deepseek-v4-flash and deepseek-v4-flash-vision-exp still work, but they now run V4.1 Flash 1017 at the Flash price. Send deepseek-flash, so your logs name the model you pay for. DeepSeek credits the September cut to V4.1 Flash's design, which its release note describes as a 552B-parameter mixture-of-experts model with 8B active parameters for input and 16B for output.

#Search, fetch, OCR, and speech fees

Tool fees are per use and sit on top of token charges. A search with three queries bills as three, and failed or empty searches are free under DeepSeek's web tools billing rules.

ItemPrice
Web search, text or image$0.75 per 1,000 searches
Web fetch$0.75 per 1,000 fetches
File parsing and OCR$0.225 per 1,000 pages
Text to speech$0.45 per 10,000 characters, $0.225 at a limited-time 50% discount
Speech to text$0.116 per hour of audio, $0.058 at a limited-time 50% discount

The off-peak footnote covers token prices only, so the calculator in this guide charges tool fees in full at any hour.

#DeepSeek off-peak hours by time zone

DeepSeek's peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday through Friday, excluding Chinese public holidays. That is 35 of the week's 168 hours, so 79% of the week bills at half price. In Beijing time the windows are 09:00 to 12:00 and 14:00 to 18:00, a Beijing office day.

What you pay depends on where your traffic comes from. The calculator below ran a 9:00 to 18:00 local weekday for the week of November 16, 2026:

Team working 9:00 to 18:00Workday hours at peakPays, as a share of peakFlash cache-miss input, effective
New York0%50.0%$0.150
San Francisco8.9%54.4%$0.163
Berlin22.2%61.1%$0.183
Bengaluru50.0%75.0%$0.225
Beijing77.8%88.9%$0.267
Even traffic around the clock20.8%60.4%$0.181
DeepSeek peak hours on the UTC clock against a 9:00 to 18:00 workday: New York pays 50% of peak, San Francisco 54.4%, Berlin 61.1%, Bengaluru 75%, and Beijing 88.9%Weekday hours on the UTC clock, week of November 16, 2026Peak, Mon to FriOff-peak all weekend01:00-04:0006:00-10:00San Franciscopays 54.4% of peakNew Yorkpays 50.0% of peakBerlinpays 61.1% of peakBengalurupays 75.0% of peakBeijingpays 88.9% of peak00:0004:0008:0012:0016:0020:0024:00peak hoursworkday, off-peakworkday, peak
Fig. 1On the UTC clock, a New York workday never touches DeepSeek's peak windows and a Beijing workday sits inside them for 7 of 9 hours. San Francisco's only peak hour is 17:00 to 18:00, Monday to Thursday.

San Francisco's 17:00 hour is 01:00 UTC the next morning, which is peak Monday to Thursday and off-peak on Friday, when it lands on Saturday. Under daylight saving time in July, both US cities pay 50% and Berlin overlaps three peak hours. No moment is more than 4 hours from an off-peak window, so a job that can wait 4 hours can always run at half price.

DeepSeek does not say whether a request is priced by its start or end time, so the calculator uses the start. A scheduler that ignores Chinese public holidays only misses some half-price weekdays and never pays peak by mistake.

#DeepSeek context caching and prefix units

DeepSeek caches prompt prefixes on disk for every account by default, with no code change and no write fee. A later request hits only when it fully matches a persisted prefix unit, and a hit bills at 2% of the miss price on Flash and 3.3% on V4 Pro. DeepSeek's context caching guide says the system persists a unit in three cases:

  • At the end of each request's user input and at the end of its model output.
  • When it detects a common prefix across several requests.
  • At fixed token intervals inside long inputs and outputs, so a long prefix is not left uncacheable.

DeepSeek ties this to sliding window attention: a request must reuse a whole unit, and a partial overlap does not count. Appending to a conversation hits from the second request, while new questions about the same document miss twice before the common prefix is persisted.

DeepSeek cache prefix units: an appended conversation hits on its second request, while the same document with a new question misses twice before its common prefix is persisted and the third request hitsAppend to a conversationunit persisted at output endsystemmissuser 1missanswer 1outputrequest 2systemhituser 1hitanswer 1hituser 2missrequest 1Same document, new questionrequest 1system + reportmissquestion Bmissrequest 2system + reportmissquestion Cmisscommon prefix persistedrequest 3system + reporthitquestion Dmisscache hitcache missmodel output
Fig. 2DeepSeek's two documented cases. An appended conversation hits on everything before the new message. The same report with a new question misses on requests 1 and 2, then hits on request 3 once the common prefix is persisted.

Read prompt_cache_hit_tokens and prompt_cache_miss_tokens on every response. The Anthropic-format endpoint reports cache_read_input_tokens and input_tokens, always returns 0 for cache_creation_input_tokens, and ignores cache_control markers, so Claude clients need no changes. To keep hits high:

  1. Edit only the end of a prompt. A change in the middle falls back to the last whole unit before it.
  2. Warm a shared prefix before a fan-out, since DeepSeek says building the cache takes seconds.
  3. Expect some misses. DeepSeek clears unused entries "within a few hours to a few days" and calls the cache best effort.
  4. Measure hits before and after adding user_id, which isolates the KV cache per end user. The rate limit page does not say whether shared prefixes still hit across IDs.

With no write premium, DeepSeek's cache has no break-even point, unlike the 1.25x write in the Claude API pricing guide or the hourly storage in the Gemini API pricing guide.

#Thinking tokens and output limits

Thinking mode is on by default on both models at high effort, and thinking tokens bill as output at the model's output rate. Chat Completions reports their count in completion_tokens_details.reasoning_tokens, and the Messages API counts them inside output_tokens. The default max_tokens is 8K with thinking off, 64K with thinking on, and 128K at max effort, under a 384K ceiling.

Those caps set the most one request can cost in output. The table prices each cap at peak, with K as 1,024 tokens:

Output capFlash, peakV4 Pro, peak
8K, default with thinking off$0.0098$0.0324
64K, default with thinking on$0.0786$0.2595
128K, default at max effort$0.1573$0.5190
384K, the maximum$0.4719$1.5571

Thinking effort has three levels, low, high, and max, and other effort names map onto them. The Anthropic-format endpoint ignores budget_tokens, so cap spend with max_tokens, a lower effort, or thinking: {"type": "disabled"}.

Tools add a second cost. With tools in the request, every earlier reasoning_content must be passed back or the API returns 400, and it joins the context. An agent loop pays for each thinking token as output once, then as input on every later call, usually at the cache-hit price.

DeepSeek's token usage page estimates 0.3 tokens per English character, so 1M tokens holds about 3.3 million characters.

#DeepSeek API rate limits: concurrency, not requests per minute

DeepSeek limits concurrent requests per account, not requests or tokens per minute: 2,500 on deepseek-flash and 500 on deepseek-v4-pro as of November 16, 2026. A request counts from the moment it is sent until its response completes. Every API key on the account shares the limit, and requests over it get HTTP 429.

Extra API keys on the same account add no capacity. DeepSeek accepts capacity expansion requests at no extra cost, and a raised account gets per-user_id limits of 2,500 and 500 inside its total.

By Little's law, 2,500 Flash slots at an assumed 20 seconds per request carry 7,500 requests a minute, and 500 V4 Pro slots at 40 seconds carry 750. Lower thinking effort shortens requests, so it raises throughput as well as cutting output cost.

The error codes separate the fixes: 402 means the prepaid balance is empty, 429 means back off or send the overflow elsewhere, and 500 or 503 means retry after a short wait. While a request waits to start, DeepSeek sends keep-alive lines, and it closes the connection if inference has not begun after 10 minutes.

#A tested DeepSeek API cost calculator

The calculator takes token counts from DeepSeek's usage object, a timestamp, and an optional holiday list, and returns an itemized bill. It also models agent loops and workday time zones. It ran on Node 26.12.1 with no dependencies and no network code.

deepseek-bill.ts
TypeScript
// deepseek-bill.ts: turn DeepSeek API usage into a bill.
// Peak prices, USD per 1M tokens, read from api-docs.deepseek.com on November 16, 2026.
export type Rate = { hit: number; miss: number; output: number };
 
export const DEEPSEEK: Record<string, Rate> = {
  "deepseek-flash": { hit: 0.006, miss: 0.3, output: 1.2 },
  "deepseek-v4-pro": { hit: 0.044, miss: 1.32, output: 3.96 },
};
// Legacy names DeepSeek still accepts, served by V4.1 Flash 1017 at the Flash price.
const LEGACY: Record<string, string> = {
  "deepseek-v4-flash": "deepseek-flash",
  "deepseek-v4-flash-vision-exp": "deepseek-flash",
};
export const OFF_PEAK = 0.5; // off-peak token prices are half of peak
export const TOOL_FEE = 0.75 / 1000; // per billed search or fetch, charged per use
 
// Peak hours: 01:00-04:00 and 06:00-10:00 UTC, Monday to Friday, except Chinese public
// holidays. Both windows fall on the same calendar date in UTC and Beijing time.
const WINDOWS: [number, number][] = [
  [60, 240],
  [360, 600],
]; // minutes after 00:00 UTC, half-open
 
export function isPeak(at: Date, holidays: ReadonlySet<string> = new Set()) {
  const day = at.getUTCDay();
  if (day === 0 || day === 6 || holidays.has(at.toISOString().slice(0, 10))) return false;
  const minute = at.getUTCHours() * 60 + at.getUTCMinutes();
  return WINDOWS.some(([start, end]) => minute >= start && minute < end);
}
 
export type Usage = {
  hit: number; // prompt_cache_hit_tokens (cache_read_input_tokens on /anthropic)
  miss: number; // prompt_cache_miss_tokens (input_tokens on /anthropic)
  output: number; // completion_tokens (output_tokens on /anthropic), thinking included
  tools?: number; // billed searches and fetches from usage.server_tool_use
};
 
export function price(rate: Rate, u: Usage, multiplier = 1) {
  const usd = (tokens: number, perMTok: number) => (tokens * perMTok * multiplier) / 1e6;
  const lines = {
    hit: usd(u.hit, rate.hit),
    miss: usd(u.miss, rate.miss),
    output: usd(u.output, rate.output),
    tools: (u.tools ?? 0) * TOOL_FEE, // the page halves token prices only
  };
  return { lines, total: lines.hit + lines.miss + lines.output + lines.tools };
}
 
export function bill(model: string, u: Usage, at: Date, holidays?: ReadonlySet<string>) {
  const rate = DEEPSEEK[LEGACY[model] ?? model];
  if (!rate) throw new Error(`Unknown model: ${model}`);
  const peak = isPeak(at, holidays);
  return { ...price(rate, u, peak ? 1 : OFF_PEAK), peak };
}
 
// Share of working minutes in peak hours for a team on weekdays, local time.
export function workdayMultiplier(timeZone: string, from = 9, to = 18, weekStart = "2026-11-16T00:00:00Z") {
  const fmt = new Intl.DateTimeFormat("en-US", { timeZone, weekday: "short", hour: "numeric", minute: "numeric", hourCycle: "h23" });
  let work = 0;
  let peak = 0;
  for (let m = 0; m < 7 * 24 * 60; m += 15) {
    const at = new Date(Date.parse(weekStart) + m * 60_000);
    const p = Object.fromEntries(fmt.formatToParts(at).map((x) => [x.type, x.value]));
    const local = Number(p.hour) * 60 + Number(p.minute);
    if (p.weekday === "Sat" || p.weekday === "Sun" || local < from * 60 || local >= to * 60) continue;
    work += 1;
    if (isPeak(at)) peak += 1;
  }
  const share = peak / work;
  return { share, multiplier: OFF_PEAK + (1 - OFF_PEAK) * share };
}
 
// An agent loop: each call resends the previous prompt and output, which DeepSeek
// persisted as a prefix unit, plus a new tool result that has never been cached.
export function agentSession(s: { calls: number; firstPrompt: number; toolResult: number; output: number; hitRate?: number }) {
  const u: Usage = { hit: 0, miss: 0, output: 0 };
  let prompt = s.firstPrompt;
  for (let call = 1; call <= s.calls; call++) {
    const reusable = call === 1 ? 0 : prompt - s.toolResult;
    const hit = reusable * (s.hitRate ?? 1);
    u.hit += hit;
    u.miss += prompt - hit;
    u.output += s.output;
    prompt += s.output + s.toolResult;
  }
  return u;
}
 
// Requests per minute that fit under an account's concurrency limit (Little's law).
export const perMinute = (concurrency: number, secondsPerRequest: number) => (concurrency * 60) / secondsPerRequest;
 
const $ = (n: number, digits = 4) => `$${n.toFixed(digits)}`;
 
if (import.meta.main) {
  const peakAt = new Date("2026-11-17T07:30:00Z"); // Tuesday, 15:30 in Beijing
  const offAt = new Date("2026-11-17T15:00:00Z"); // Tuesday, 10:00 in New York
 
  console.log("Peak checks");
  for (const iso of ["2026-11-16T00:59:00Z", "2026-11-16T01:00:00Z", "2026-11-16T03:59:00Z", "2026-11-16T04:00:00Z", "2026-11-16T09:59:00Z", "2026-11-21T02:00:00Z"]) {
    console.log(`  ${iso}  ${isPeak(new Date(iso)) ? "peak" : "off-peak"}`);
  }
 
  console.log("\nWorkday price as a share of peak, 9:00-18:00 local, week of Nov 16, 2026");
  for (const tz of ["America/Los_Angeles", "America/New_York", "Europe/Berlin", "Asia/Kolkata", "Asia/Shanghai"]) {
    const r = workdayMultiplier(tz);
    console.log(`  ${tz.padEnd(20)} ${(r.share * 100).toFixed(1).padStart(5)}% of hours peak, pays ${(r.multiplier * 100).toFixed(1)}%`);
  }
  console.log(`  ${"round the clock".padEnd(20)} ${((35 / 168) * 100).toFixed(1)}% of hours peak, pays ${((OFF_PEAK + OFF_PEAK * (35 / 168)) * 100).toFixed(1)}%`);
 
  const session = agentSession({ calls: 40, firstPrompt: 24_000, toolResult: 2_500, output: 1_500 });
  const cold = agentSession({ calls: 40, firstPrompt: 24_000, toolResult: 2_500, output: 1_500, hitRate: 0 });
  console.log(`\nAgent session: 40 calls; tokens hit ${session.hit}, miss ${session.miss}, output ${session.output}`);
  const row = (label: string, r: ReturnType<typeof price>) =>
    console.log(`  ${label.padEnd(33)} total ${$(r.total)}  miss ${$(r.lines.miss)}  hit ${$(r.lines.hit)}  output ${$(r.lines.output)}`);
  row("flash, peak", bill("deepseek-flash", session, peakAt));
  row("flash, off-peak", bill("deepseek-flash", session, offAt));
  row("flash, peak, no cache hits", bill("deepseek-flash", cold, peakAt));
  row("v4-pro, peak", bill("deepseek-v4-pro", session, peakAt));
  row("v4-pro, off-peak", bill("deepseek-v4-pro", session, offAt));
  const HOSTS: Record<string, Rate> = {
    "together v4-pro": { hit: 0.13, miss: 1.32, output: 3.96 },
    "baseten v4-pro": { hit: 0.132, miss: 1.32, output: 3.96 },
    "deepinfra v4-pro": { hit: 0.1, miss: 1.3, output: 2.6 },
    "cloudflare v4-pro": { hit: 0.044, miss: 1.32, output: 3.96 },
  };
  for (const [name, rate] of Object.entries(HOSTS)) row(name, price(rate, session));
 
  const tickets = 200_000;
  const job = (thinking: number): Usage => ({ hit: tickets * 1_800, miss: tickets * 1_200, output: tickets * (300 + thinking) });
  console.log("\nBatch job: 200,000 tickets, 1,800 shared + 1,200 unique tokens, 300 output");
  row("flash, peak, thinking off", bill("deepseek-flash", job(0), peakAt));
  row("flash, off-peak, thinking off", bill("deepseek-flash", job(0), offAt));
  row("flash, peak, +1,000 thinking", bill("deepseek-flash", job(1_000), peakAt));
  row("flash, off-peak, +1,000 thinking", bill("deepseek-flash", job(1_000), offAt));
 
  console.log("\nOutput ceiling per request at peak");
  for (const [label, tokens] of [["8K non-thinking default", 8_192], ["64K thinking default", 65_536], ["128K at max effort", 131_072], ["384K maximum", 393_216]] as const) {
    console.log(`  ${label.padEnd(24)} flash ${$(bill("deepseek-flash", { hit: 0, miss: 0, output: tokens }, peakAt).total)}  v4-pro ${$(bill("deepseek-v4-pro", { hit: 0, miss: 0, output: tokens }, peakAt).total)}`);
  }
 
  console.log("\nRequests per minute under the concurrency limit");
  console.log(`  flash at 2,500, 20 s per request: ${perMinute(2_500, 20)}`);
  console.log(`  v4-pro at 500, 40 s per request: ${perMinute(500, 40)}`);
}

Run it with node deepseek-bill.ts. This is the real output:

Text
Peak checks
  2026-11-16T00:59:00Z  off-peak
  2026-11-16T01:00:00Z  peak
  2026-11-16T03:59:00Z  peak
  2026-11-16T04:00:00Z  off-peak
  2026-11-16T09:59:00Z  peak
  2026-11-21T02:00:00Z  off-peak
 
Workday price as a share of peak, 9:00-18:00 local, week of Nov 16, 2026
  America/Los_Angeles    8.9% of hours peak, pays 54.4%
  America/New_York       0.0% of hours peak, pays 50.0%
  Europe/Berlin         22.2% of hours peak, pays 61.1%
  Asia/Kolkata          50.0% of hours peak, pays 75.0%
  Asia/Shanghai         77.8% of hours peak, pays 88.9%
  round the clock      20.8% of hours peak, pays 60.4%
 
Agent session: 40 calls; tokens hit 3958500, miss 121500, output 60000
  flash, peak                       total $0.1322  miss $0.0365  hit $0.0238  output $0.0720
  flash, off-peak                   total $0.0661  miss $0.0182  hit $0.0119  output $0.0360
  flash, peak, no cache hits        total $1.2960  miss $1.2240  hit $0.0000  output $0.0720
  v4-pro, peak                      total $0.5722  miss $0.1604  hit $0.1742  output $0.2376
  v4-pro, off-peak                  total $0.2861  miss $0.0802  hit $0.0871  output $0.1188
  together v4-pro                   total $0.9126  miss $0.1604  hit $0.5146  output $0.2376
  baseten v4-pro                    total $0.9205  miss $0.1604  hit $0.5225  output $0.2376
  deepinfra v4-pro                  total $0.7098  miss $0.1580  hit $0.3958  output $0.1560
  cloudflare v4-pro                 total $0.5722  miss $0.1604  hit $0.1742  output $0.2376
 
Batch job: 200,000 tickets, 1,800 shared + 1,200 unique tokens, 300 output
  flash, peak, thinking off         total $146.1600  miss $72.0000  hit $2.1600  output $72.0000
  flash, off-peak, thinking off     total $73.0800  miss $36.0000  hit $1.0800  output $36.0000
  flash, peak, +1,000 thinking      total $386.1600  miss $72.0000  hit $2.1600  output $312.0000
  flash, off-peak, +1,000 thinking  total $193.0800  miss $36.0000  hit $1.0800  output $156.0000
 
Output ceiling per request at peak
  8K non-thinking default  flash $0.0098  v4-pro $0.0324
  64K thinking default     flash $0.0786  v4-pro $0.2595
  128K at max effort       flash $0.1573  v4-pro $0.5190
  384K maximum             flash $0.4719  v4-pro $1.5571
 
Requests per minute under the concurrency limit
  flash at 2,500, 20 s per request: 7500
  v4-pro at 500, 40 s per request: 750

A separate script compared the calculator's 12 token prices and 2 tool fees with the text of DeepSeek's pricing page, and all 14 matched. No DeepSeek request was sent, so token counts and request durations are assumptions and only the arithmetic is tested.

#Worked bills: an agent session and a batch job

A 40-call coding agent session costs $0.13 on Flash at peak and $0.07 off-peak, and a 200,000-ticket classification job costs $146 at peak and $73 off-peak. Leaving thinking on for that job costs more than running it at peak.

#A 40-call coding agent session

The session starts with a 24,000-token prompt. Each call returns 1,500 output tokens, thinking included, then adds a 2,500-token tool result. Every later call hits the previous prompt and output, persisted at the end of that output, and misses only on the new tool result. That totals 3,958,500 cache-hit tokens, 121,500 cache-miss tokens, and 60,000 output tokens.

ConfigurationCache-miss inputCache-hit inputOutputTotal
Flash, off-peak$0.0182$0.0119$0.0360$0.0661
Flash, peak$0.0365$0.0238$0.0720$0.1322
Flash, peak, no cache hits$1.2240$0$0.0720$1.2960
V4 Pro, off-peak$0.0802$0.0871$0.1188$0.2861
V4 Pro, peak$0.1604$0.1742$0.2376$0.5722

Cache hits are 97% of the input tokens and 39% of the Flash input bill. Output is the largest line on Flash, at 54%, so thinking effort is the next lever. Losing the hits multiplies the bill by 9.8, while off-peak timing saves at most half.

A 40-call agent session costs $0.07 on Flash off-peak, $0.13 on Flash at peak, $0.57 on V4 Pro at peak, $0.91 on V4 Pro at Together, and $1.30 on Flash with no cache hitsFlash, off-peak$0.0661Flash, peak$0.1322V4 Pro, off-peak$0.2861V4 Pro, peak$0.5722V4 Pro, DeepInfra$0.7098V4 Pro, Together$0.9126Flash, peak, no hits$1.2960$0.00$0.25$0.50$0.75$1.00$1.25Session cost, USDcache-miss inputcache-hit inputoutput, thinking included
Fig. 3The same 40-call session priced seven ways. On V4 Pro, Together's $0.13 cache-hit price turns DeepSeek's $0.57 peak bill into $0.91, though input and output prices match. Without cache hits, Flash costs $1.30.

#A 200,000-ticket batch job

Each ticket sends 1,800 tokens of shared instructions, which hit, and 1,200 tokens of ticket text, which miss, and returns a 300-token label with thinking disabled.

ConfigurationCache-miss inputCache-hit inputOutputTotal
Flash, peak, thinking off$72.00$2.16$72.00$146.16
Flash, off-peak, thinking off$36.00$1.08$36.00$73.08
Flash, peak, 1,000 thinking tokens per ticket$72.00$2.16$312.00$386.16
Flash, off-peak, 1,000 thinking tokens per ticket$36.00$1.08$156.00$193.08

The 1,000 thinking tokens are an assumption. Thinking is the default, so a job that forgets to disable it pays 2.6 times as much at peak, and off-peak it still costs more than the peak run with thinking off. The shared instructions cost $2.16 in total, while every 100 tokens cut from the ticket text saves $6.

#DeepSeek API pricing versus third-party hosts

DeepSeek publishes V4.1 Flash 1017 and V4 Pro 0813 as MIT-licensed weights on Hugging Face, so other providers serve the same models. As of November 16, 2026, most US hosts charge DeepSeek's peak prices, and none of the hosts below lists an off-peak rate. Each row comes from that provider's own pricing page.

ProviderModelCache-miss inputCache-hit inputOutputNotes
DeepSeek, off-peakV4.1 Flash 1017$0.15$0.003$0.6079% of the week
DeepSeek, peakV4.1 Flash 1017$0.30$0.006$1.202,500 concurrent requests
TogetherV4.1 Flash 1017$0.30$0.006$1.20FP8; US-only endpoint costs 25% more
FireworksV4.1 Flash 1017$0.30$0.006$1.20Batch takes 50% off input and output
Cloudflare Workers AIV4.1 Flash 1017$0.30$0.006$1.20Needs Workers Paid or prepaid credits
ParasailV4.1 Flash$0.30$0.006$1.20Page lists V4.1 Flash, no version suffix
BasetenV4.1 Flash 1017$0.30$0.007$1.20Fast tier costs twice as much
DeepInfraV4.1 Flash 1017$0.098$0.003$0.294Promotional, 51% off; FP8
DeepSeek, peakV4 Pro 0813$1.32$0.044$3.96Half off-peak
Cloudflare Workers AIV4 Pro 0813$1.32$0.044$3.96
TogetherV4 Pro 0813$1.32$0.13$3.96NVFP4
BasetenV4 Pro 0813$1.32$0.132$3.96
DeepInfraV4 Pro 0813$1.30$0.10$2.60FP8

The cache-hit column decides agent bills on V4 Pro. Together's and Baseten's hit prices are three times DeepSeek's, so the 40-call session costs $0.91 and $0.92 against $0.57 on DeepSeek at peak, and DeepInfra's cheaper output does not offset its $0.10 hits. These figures assume each host hits its cache as often as DeepSeek, which none documents in the same detail.

Several hosts publish their serving precision, such as FP8 or NVFP4, and DeepSeek's pricing page states none. Amazon Bedrock lists only DeepSeek V3.1 and V3.2, with V3.2 at $0.62 input and $1.85 output in US regions.

The LLM pricing dataset holds these rows and the wider market. OpenRouter lists 37 other providers for V4.1 Flash 1017 and 19 for V4 Pro 0813, and some of its prices differ from the provider's own page: it shows Cloudflare's V4.1 Flash 1017 at $0.10 input against $0.30 on Cloudflare's page. The open-weight models dataset tracks the weights, and vLLM, SGLang, and llama.cpp covers serving them yourself.

#Data handling and jurisdiction

DeepSeek's own documents set out where data is processed and which law applies. The Open Platform terms, effective April 29, 2026, name Hangzhou DeepSeek Artificial Intelligence Co., Ltd. as the operator. They are governed by the laws of the People's Republic of China in the mainland, and disputes go to a court with jurisdiction over that company's registered office.

The privacy policy, last updated February 10, 2026, says DeepSeek collects, processes, and stores personal data in the People's Republic of China. It lists training and improving models among its uses, and lists an opt-out from training among the rights that may apply depending on where you live.

The terms make the developer responsible for end users' personal data. A developer must disclose its processing rules, obtain consent or another legal basis for delegating processing to DeepSeek, and answer end-user requests such as erasure. The terms assign output rights to the developer, permit using outputs to train other models, and contain no separate clause on retaining API inputs.

#Route between DeepSeek and other hosts at an AI gateway

The numbers above favor DeepSeek's own API most of the time and a host for the rest: when the account hits its concurrency limit, the balance runs out, or a team's data policy rules out processing in China. An AI gateway turns that into routing config, so application code keeps sending one model name.

Bifrost, an open-source AI gateway, fits this well because it already prices DeepSeek's schedule. Its model catalog prices the V4 lineup with a peak_hours schedule and an off_peak_cost_multiplier of 0.5, decided by each request's start time, so logged costs and budgets follow the hours DeepSeek bills. Custom pricing sets your own rates and schedule per provider, key, or virtual key. The schedule is weekly with no holiday calendar, so on a Chinese public holiday the gateway's figure overstates the bill rather than understating it.

Bifrost supports DeepSeek as a provider, with OpenAI-compatible endpoints by default and an optional Anthropic-compatible mode per key, plus Fireworks, Parasail, Nebius, Cloudflare Workers AI, and OpenRouter, which serve the same weights. Retries and fallbacks map to DeepSeek's failure modes:

DeepSeek responseWhat Bifrost does
429, over the concurrency limitRotates to another key with backoff when retries and keys are configured, then tries the next fallback provider; DeepSeek's limit is per account, so the fallback is what adds capacity
402, balance emptyClasses it as a quota failure, marks the key dead for the request, and runs the fallback chain
500 or 503Retries the same key with exponential backoff up to max_retries, then falls back
A stream with no first tokenA routing rule's ttft_timeout_ms closes the attempt and moves on; only real output such as text, reasoning, or a tool call counts as the first token

Routing rules are CEL expressions over the model, headers, team, customer, and budget use. The pair below sends deepseek-flash to DeepSeek with host fallbacks, and sends requests marked restricted straight to Cloudflare. The JSON parses, and it was not run against a gateway:

not run here
JSON
{
  "governance": {
    "routing_rules": [
      {
        "name": "restricted-data-to-cloudflare",
        "enabled": true,
        "cel_expression": "model == \"deepseek-flash\" && headers[\"x-data-class\"] == \"restricted\"",
        "targets": [{ "provider": "cloudflare", "model": "@cf/deepseek-ai/deepseek-v4.1-flash-1017", "weight": 1 }],
        "fallbacks": [],
        "scope": "global",
        "priority": 1
      },
      {
        "name": "deepseek-flash-with-host-fallbacks",
        "enabled": true,
        "cel_expression": "model == \"deepseek-flash\"",
        "targets": [{ "provider": "deepseek", "model": "deepseek-flash", "weight": 1 }],
        "fallbacks": ["cloudflare/@cf/deepseek-ai/deepseek-v4.1-flash-1017", "openrouter/deepseek/deepseek-v4.1-flash-1017"],
        "ttft_timeout_ms": 20000,
        "scope": "global",
        "priority": 2
      }
    ]
  }
}

The restricted route has no OpenRouter fallback, because OpenRouter lists DeepSeek's own endpoint for that model. The routing rule variables include no time of day, so code that holds batch jobs for off-peak hours keeps the clock check.

Session affinity tries the provider and key that last served a conversation first, and a turn served by a fallback rebinds the session to that host. At call 20 of the agent session, a 100,000-token prompt moved to a host costs about $0.03 in input instead of $0.0013 on DeepSeek, and with affinity the session pays that miss once instead of on every switch.

Budgets and limits cap spend per virtual key, team, or customer, with monthly resets that can align to the calendar in UTC. A budget on the DeepSeek provider inside a virtual key removes DeepSeek from routing once spent, while the key's other providers keep serving. The features above describe Bifrost as of November 16, 2026.

#Cut a DeepSeek API bill in order

Log one day of usage objects with timestamps, run them through bill(), and group the result by line. Each fix below acts on one line, so start with the largest:

  1. Send deepseek-flash, not a legacy name, and record prompt_cache_hit_tokens, prompt_cache_miss_tokens, and reasoning_tokens on every request.
  2. If cache misses lead, stop editing the middle of prompts, append instead, and warm shared prefixes before a fan-out, following the context engineering guide.
  3. If output leads, disable thinking for classification and extraction, lower effort elsewhere, and set max_tokens below the 64K default.
  4. Move work that can wait to off-peak hours, which are never more than 4 hours away.
  5. Before moving V4 Pro traffic to a host, compare the cache-hit price as well as input and output.
  6. Request a concurrency increase before you reach 2,500 or 500, and route the overflow to a host until it lands.

Rerun the numbers whenever DeepSeek API pricing changes, and follow the APIs and pricing topic for related guides.

#Questions

How much does the DeepSeek API cost?

As of November 16, 2026, deepseek-flash costs $0.30 per million cache-miss input tokens, $0.006 per million cache-hit tokens, and $1.20 per million output tokens at peak. deepseek-v4-pro costs $1.32, $0.044, and $3.96. Off-peak rates are half of those, and web search and web fetch each cost $0.75 per 1,000 calls at any hour.

When are DeepSeek off-peak hours?

Peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday through Friday, which is 09:00 to 12:00 and 14:00 to 18:00 Beijing time. Every other hour is off-peak, including weekends and Chinese public holidays, so about 79% of the week bills at half price. A 9:00 to 18:00 workday in New York falls entirely off-peak.

Does DeepSeek charge for context caching?

DeepSeek charges nothing to write its cache. Caching is on by default for every account, needs no code change, and reports cache_creation_input_tokens as 0. A cache hit bills at 2% of the cache-miss price on deepseek-flash and about 3.3% on deepseek-v4-pro. DeepSeek calls the cache best effort, so read prompt_cache_hit_tokens on each response instead of assuming a hit.

Is the DeepSeek API free?

No. The DeepSeek API draws on a prepaid balance per token and per tool call, and requests fail with HTTP 402 when the balance runs out. The pricing page mentions a granted balance that is spent before topped-up funds, but it does not publish a free allowance. The V4.1 Flash 1017 and V4 Pro 0813 weights are MIT licensed, so self-hosting costs only hardware.

Do DeepSeek thinking tokens cost extra?

Thinking tokens bill as output tokens at the model's output rate, with no separate price. Thinking mode is on by default at high effort on both models, and the default max_tokens in thinking mode is 64K. At peak, 1,000 thinking tokens cost $0.0012 on deepseek-flash and $0.00396 on deepseek-v4-pro as of November 16, 2026, and half that off-peak.

What are the DeepSeek API rate limits?

DeepSeek limits concurrent requests per account: 2,500 on deepseek-flash and 500 on deepseek-v4-pro as of November 16, 2026. A request counts from when it is sent until its response completes, every API key on the account shares the limit, and requests over it get HTTP 429. DeepSeek accepts capacity expansion requests and says expansion costs nothing extra.

Is DeepSeek cheaper on a third-party host?

Usually not. As of November 16, 2026, Together, Fireworks, Cloudflare Workers AI, and Parasail charge DeepSeek's peak price for V4.1 Flash, and none of them lists an off-peak rate. On V4 Pro 0813, Together and Baseten charge about three times DeepSeek's cache-hit price, which makes a cache-heavy agent session about 60% more expensive. DeepInfra's promotional Flash price is the exception.