Per MillionLLM API prices, tracked daily

Claude API Pricing vs DeepSeek: 2026 Cost-per-Task Table

By Per Million · Published · 17 min read

DeepSeek is cheaper than Claude per token at the same capability tier. As of October 2026, DeepSeek V4-Pro lists $1.32 input and $3.96 output per million tokens at peak, and Claude Sonnet 5.5 lists $2 and $10. The bigger change in 2026 came from Claude Haiku 5.5. On prompts under 100K tokens it costs less than DeepSeek's Flash model on base input and output. Once you add Claude's prompt caching and its 50% Batch discount, the gap shrinks a lot, and on some workloads it disappears. The tables below show the cost of three real task shapes so you can see which one matches your bill.

Which option is right for you?

Choose by workload, not by the headline rate. Most of the bill comes from how many tokens you repeat and how many you generate.

Which option is right for you?. Source: the LiteLLM price list (MIT License)
Your situationWhat to pick firstFirst page to open
Beginner, building a first prototype or chatbotClaude Haiku 5.5 with automatic prompt caching. It's cheap under 100K-token prompts and needs one code changeHaiku 5.5 overview
Daily work use: coding agents, product features that need strong reasoningClaude Sonnet 5.5, with Batch for anything that doesn't need a live answer. Batch brings it close to V4-Pro's peak priceSonnet 5.5 overview
Tight budget, long prompts (100K+ tokens), latency can slip a littleDeepSeek deepseek-flash scheduled off-peak. Its price stays flat no matter how long the prompt isDeepSeek pricing
Strongest reasoning at the lowest price, can tolerate best-effort cachingDeepSeek deepseek-v4-pro. It's about a third of Sonnet's output price at peakDeepSeek pricing
You already run on Google Cloud and want a third quoteGemini 3.8 Flash at its promotional rate, which ends Gemini API pricing

Claude API vs DeepSeek: Which Is Cheaper?

On list price, DeepSeek is cheaper at every tier except Claude Haiku 5.5's short-prompt tier. Caching and batching can narrow the gap or reverse it. Here is the full rate card for the models most teams compare (as of October 2026; check the official pages):

Claude API vs DeepSeek: Which Is Cheaper?. Source: the LiteLLM price list (MIT License)
ModelInput (cache miss) / MTokCache hit / MTokOutput / MTokContext
Claude Opus 5.5$4$0.20$201M
Claude Sonnet 5.5$2$0.10$101M
Claude Haiku 5.5 (prompt ≤100K)$0.10$0.01$0.501M
Claude Haiku 5.5 (prompt >100K)$0.50$0.05$2.501M
DeepSeek V4-Pro, peak$1.32$0.044$3.961M
DeepSeek V4-Pro, off-peak$0.66$0.022$1.981M
DeepSeek Flash, peak$0.30$0.006$1.201M
DeepSeek Flash, off-peak$0.15$0.003$0.601M

Claude figures come from claude.com/pricing, the Sonnet 5.5 page and the Haiku 5.5 page. DeepSeek figures come from the DeepSeek pricing page.

Three things in this table matter more than the headline rates:

A common mistake is comparing Claude Opus with DeepSeek Flash. Those models are built for different jobs. Compare within a tier (Sonnet with V4-Pro, Haiku with Flash) and check quality on your own prompts before switching.

DeepSeek V4 API Pricing vs Claude: What Changed in 2026

In 2026, DeepSeek moved to V4 with a 1M-token context and peak/off-peak pricing. Anthropic launched Sonnet 5.5 and Haiku 5.5, and Haiku got a two-tier price split at 100K tokens.

DeepSeek's changes

Anthropic's changes

What Do API Pricing Models Actually Mean?

An API pricing model is a set of per-million-token rates, split into input and output. Modifiers such as cache writes, cache reads, batch discounts and time-of-day discounts change the price you actually pay.

Here are the terms you'll see on both vendors' pages:

What Do API Pricing Models Actually Mean?. Source: the LiteLLM price list (MIT License)
TermClaudeDeepSeek
Base input"Base input tokens""Input (cache miss)"
Writing to cachePaid premium: 1.25x base for 5-minute TTL, 2x for 1-hour TTL (prompt caching docs)No extra charge. Caching is automatic (context caching guide)
Reading from cache"Cache hits and refreshes": 0.05x base on Sonnet/Opus 5.5, 0.1x on Haiku"Input (cache hit)": about 2–3% of the miss rate
Async discountBatch API: 50% off input and outputNone listed; the off-peak 50% does a similar job
Reasoning tokensBilled as output (thinking docs)Thinking is the default mode on Flash, at the standard output rate

To estimate the cost of one request:

  1. Count the tokens that are the same on every call (system prompt, tool definitions, reference docs). These are your cacheable tokens.
  2. Count the tokens that change on every call (the user message, retrieved snippets). These are always billed at base input.
  3. Estimate output tokens, including thinking. If you're not sure, run 20 real requests and read output_tokens from the usage object.
  4. Pick a cache hit rate. Use 0% for one-off prompts and 80–95% for steady traffic that reuses the same prefix.
  5. Cost = cached tokens × (hit rate × read price + miss rate × write price) + changing tokens × input price + output tokens × output price.

For example, take a Sonnet 5.5 request with 20,000 cached tokens, 500 new tokens and 400 output tokens. On a cache hit it costs $0.002 + $0.001 + $0.004 = $0.007. On a miss that writes the cache it costs $0.05 + $0.001 + $0.004 = $0.055. If you want this as a script, the LLM cost calculator in Python guide builds one in five steps.

Real Cost Table: Cache Hits, Output-Heavy Coding, Long-Context RAG

Across three typical task shapes, DeepSeek wins long-prompt and output-heavy work on price. Claude Haiku 5.5 competes or wins on short cached chat, and Sonnet on Batch gets close to V4-Pro at peak. All numbers below are calculated from the rate cards above (as of October 2026). The workloads are illustrations, not measurements.

Task A: support chatbot with a long, repeated system prompt

Example workload: a 20,000-token system prompt plus tools (cached), 500 new input tokens and 400 output tokens per request, at 100,000 requests a month. A "miss" means the request writes the cache (Claude) or pays the miss rate (DeepSeek).

Task A: support chatbot with a long, repeated system prompt. Source: the LiteLLM price list (MIT License)
ModelNo caching50% hit rate95% hit rate
Claude Sonnet 5.5$4,500$3,100$940
Claude Opus 5.5$9,000—$1,880
Claude Haiku 5.5$225$160$57
DeepSeek V4-Pro (peak / off-peak)$2,864 / $1,432$1,588 / $794$440 / $220
DeepSeek Flash (peak / off-peak)$663 / $332$369 / $184$104 / $52

What this shows: on this example, caching on Sonnet pays for itself once the hit rate passes about 21%, because a 5-minute cache write only adds 25% to the input cost. Haiku 5.5 costs less than Flash at peak at every hit rate here. Flash off-peak wins only narrowly, $52 against $57. Even with 95% caching, Sonnet still costs about twice as much as V4-Pro at peak. Caching narrows that gap but doesn't close it.

Task B: output-heavy coding task

Example workload: 10,000 input tokens (uncached) and 5,000 output tokens, including thinking, per task. Prices are per 1,000 tasks.

Task B: output-heavy coding task. Source: the LiteLLM price list (MIT License)
ModelStandardBatch (50% off) / off-peak
Claude Opus 5.5$140$70 (Batch)
Claude Sonnet 5.5$70$35 (Batch)
Claude Haiku 5.5$3.50$1.75 (Batch)
DeepSeek V4-Pro$33 (peak)$16.50 (off-peak)
DeepSeek Flash$9 (peak)$4.50 (off-peak)

Sonnet 5.5 on Batch ($35) costs about the same as V4-Pro at peak ($33). So if your coding jobs can wait (nightly refactors, test generation, PR review queues), the price argument for leaving Claude mostly goes away. For interactive coding, V4-Pro off-peak is about one quarter of Sonnet's live price. For this task shape, the cheapest LLM API for coding guide adds more providers.

A common mistake here is setting a low max_tokens to save money while effort stays at the default. Sonnet 5.5's default effort is high, and thinking tokens count toward output. The better fix is to set effort explicitly for routine tasks and watch output_tokens in the response.

Task C: long-context RAG over a 150,000-token document set

Example workload: 150,000 tokens of documents, a 1,000-token question and a 1,000-token answer. Prices are per 1,000 queries. "Fresh" means different documents on every query. "Reused" means the same documents are queried repeatedly with a 95% cache hit rate.

Task C: long-context RAG over a 150,000-token document set. Source: the LiteLLM price list (MIT License)
ModelFresh retrievalReused docs, 95% hits
Claude Sonnet 5.5$312$45
Claude Haiku 5.5 (>100K tier)$78$15
DeepSeek V4-Pro (peak / off-peak)$203 / $102$21.50 / $10.70
DeepSeek Flash (peak / off-peak)$46.50 / $23$4.60 / $2.30
Gemini 3.8 Flash (until )$117— (see Gemini section)

On fresh retrieval, Flash at peak is about 7x cheaper than Sonnet 5.5. Haiku is cheap below 100K tokens, but a 150K prompt pushes it into its $0.50/$2.50 tier. One easy fix is to cut retrieved context below 100K tokens. That moves Haiku back to $0.10 input, which costs less than Flash at peak. The Haiku page prices by "prompts up to 100,000 tokens," so treat the whole prompt, cached tokens included, as counting toward the threshold. Check this against your own invoice.

How Claude's Prompt Caching and Batch Discounts Change the Math

Prompt caching makes repeated input up to 95% cheaper on Sonnet and Opus 5.5 (90% on Haiku). The Batch API takes 50% off everything, and the two discounts stack. Most comparison posts leave both out.

The official numbers

Break-even rule for the cache TTL

With a 5-minute TTL on Sonnet 5.5, the write premium is 0.25x and each hit saves 0.95x, so one hit covers the cost of the write. With the 1-hour TTL the premium is 1.0x, so you need two hits within the hour. Use 1h only when requests on the same prefix are more than 5 minutes apart but come at least twice an hour. The prompt caching cost guide walks through the full formula.

Steps to turn both on

  1. In your Messages API call, add the top-level parameter cache_control: {"type": "ephemeral"}. This is automatic caching. It puts the breakpoint on the last cacheable block and moves it forward as the conversation grows.
  2. For more control, put "cache_control": {"type": "ephemeral"} on the last system block that never changes. Use {"type": "ephemeral", "ttl": "1h"} for traffic that arrives slowly.
  3. Put everything that's identical at the top (tools, system prompt, reference docs) and per-user content at the bottom. Any change above the breakpoint causes a cache miss.
  4. Send a few requests, then check the usage fields: cache_creation_input_tokens, cache_read_input_tokens and input_tokens. If cache_read_input_tokens is 0 on the second identical request, the prefix is changing or it's under 512 tokens.
  5. Move non-urgent work to the Message Batches API. Put the same cache_control blocks in every request of the batch, and use the 1-hour TTL because batches can run longer than 5 minutes (batch docs).

Common mistakes and fixes:

The limitation: none of this helps a workload where every prompt is unique and needs an answer in seconds. For that kind of traffic, DeepSeek's base rates win.

Tradier API Pricing: Is It Comparable to LLM APIs?

No. Tradier is a brokerage with a trading and market-data API, and it has nothing to do with Claude or DeepSeek token pricing. It shows up only because "API pricing" autocompletes to it.

According to Tradier's pricing page, plans are Lite ($0/month), Pro ($10/month) and Pro Plus ($35/month), and all three include API access. Charges are per trade and per contract, for example up to $0.35 per options contract on Lite. You don't pay per token. If you're building an AI trading assistant, you'd pay both: Tradier for orders and data, and an LLM API for the reasoning. Budget them as separate line items (as of October 2026; check the official page).

Gemini API Pricing 2026: How It Stacks Up

Gemini's 2026 list prices fall between DeepSeek and Claude, and its two main models are on promotional rates that end soon. Its context caching also adds an hourly storage fee that neither Claude nor DeepSeek charges.

Gemini API Pricing 2026: How It Stacks Up. Source: the LiteLLM price list (MIT License)
Gemini modelInput / MTokOutput / MTokCached inputNotes
Gemini 4 Argon$2 (until ), then $4$10, then $20$0.10, then $0.20No free tier
Gemini 3.8 Flash$0.75 (until ), then $1.50$3.75, then $7.50$0.075 + $0.50/MTok/hour storageFree tier available
Gemini 3.5 Flash-Lite$0.30$2.50$0.03 + $1.00/MTok/hour storageFree tier available

Source: Gemini API pricing (as of October 2026; check the official page). Batch is 50% off. For some older models, such as Gemini 2.5 Pro and 3.1 Pro Preview, rates double above 200K-token prompts.

Here's how Gemini fits into the tables above. On Task B, 3.8 Flash costs about $26 per 1,000 coding tasks at the promo rate, which falls between V4-Pro peak ($33) and Flash peak ($9). Argon costs the same as Sonnet 5.5 until November 30 and twice as much after that. If you price a Gemini migration this month, redo the math with the December and January rates, or you'll underestimate your 2027 bill. The storage fee also matters. Keeping a 150K-token cache alive on 3.8 Flash costs about $0.075 per hour, or about $54 a month if it runs nonstop. The Gemini free tier guide covers the free limits.

Who Gemini isn't for: teams that need stable prices through Q1 2027. Both promotional rates expire within about two months.

What Developers on Reddit Say About Real Gemini/Claude/DeepSeek Costs

Developer threads on r/ClaudeAI and r/LocalLLaMA are where people post their real bills. The numbers are self-reported and go out of date quickly, so this guide doesn't quote a "typical overrun" percentage. What you can check is why real bills end up above the rate card, and each cause has an official explanation:

For example, if you plan Task A with Flash off-peak at $52 but half your traffic falls in peak hours and only 50% of requests hit the cache, the real figure lands nearer $277. That's more than 5x the plan, and Haiku 5.5 at a 50% hit rate would cost $160. Plan with pessimistic hit rates.

Next steps

Start with one model on one workload, measure it, and switch only if the measured cost per task justifies it.

DIY, today:

  1. Take 50 real requests from your logs and record input, output and repeated-prefix tokens for each. Put them into the five-step formula above using Haiku 5.5, Sonnet 5.5, deepseek-flash and deepseek-v4-pro.
  2. Add cache_control: {"type": "ephemeral"} to your Claude calls and check cache_read_input_tokens on the second request. On DeepSeek, check prompt_cache_hit_tokens and prompt_cache_miss_tokens instead.
  3. Move one non-urgent job, such as nightly evals or bulk tagging, to the Claude Message Batches API or to a DeepSeek off-peak window, and compare the invoice line a week later.

If you'd rather not manage API costs yourself: for interactive coding and writing, a flat subscription can replace API spend. Claude Pro costs $20/month ($17 billed annually), Max starts at $100/month, and Team costs $20–$125 per seat (claude.com/pricing, as of October 2026; check the official page). This suits individuals and small teams who use Claude interactively and want a fixed monthly bill. It doesn't suit you if you're serving end users from your product, because subscriptions don't replace API access for production traffic. Before choosing, see where the two cross over in Claude API pricing vs Max plan.

Related guides on this site: prompt caching cost formula, batch API discounts compared, cheapest LLM API for coding, build an LLM cost calculator in Python.

FAQ

What does API pricing actually mean for a startup budget?

You pay separately for every million tokens you send (input) and receive (output), and output usually costs 3–5x more. Caching, batch and off-peak discounts lower those rates, but only on traffic that fits their rules. To budget, multiply your expected monthly requests by a per-request cost worked out with a pessimistic cache hit rate.

Is Claude API pricing cheaper than DeepSeek for coding tasks?

It is only cheaper if you use the Batch API. In the example above, Sonnet 5.5 on Batch costs $35 per 1,000 tasks, against $33 for V4-Pro at peak and $16.50 off-peak. For live, interactive coding, DeepSeek V4-Pro costs about half to a quarter of Sonnet 5.5's price, so test quality on your own repo before deciding.

Does DeepSeek V4 beat Claude's cached pricing on long-context RAG?

On price, it does. With reused 150K-token documents and 95% cache hits, V4-Pro costs $10.70–$21.50 per 1,000 queries and Flash costs $2.30–$4.60, against $45 for Sonnet 5.5. DeepSeek's cache is best-effort and gets cleared after hours to days of inactivity, so real hit rates may come in lower.

How does Gemini's official 2026 pricing compare on ai.google.dev?

Gemini 3.8 Flash costs $0.75/$3.75 per million tokens until , and Gemini 4 Argon costs $2/$10 until . After those dates both prices double. That puts Gemini above DeepSeek and at or below Claude Sonnet for now. Context caching on Gemini also charges hourly storage.

What are developers actually paying, according to Reddit threads on Gemini API pricing?

The figures in those threads are self-reported and go out of date within months, so treat them as anecdotes, not benchmarks. The causes behind most high bills are documented and fixable: thinking tokens, cache misses, peak-hour traffic and tokenizer differences. Check your own usage fields rather than relying on someone else's invoice.

Sources

Spotted something out of date or wrong? Tell us at shigoto.ai.note@gmail.com. We check every guide against its official sources.