DeepSeek V4 Flash is the budget tier of DeepSeek's V4 open-weight line, listed at $0.14 per million input tokens and $0.28 per million output tokens on the official API as of 2026-08-20. This guide covers where to run it, how to switch with a two-line base-URL change, and how cache-hit pricing can shrink that bill further.
Key takeaways
- V4 Flash lists at $0.14/M input and $0.28/M output on DeepSeek's official API (as of 2026-08-20), typically a fraction of frontier-API pricing.
- A workload of 5M input + 1M output tokens per day costs about $0.98/day (~$29/month) at list price, before any cache discounts.
- Switching from any OpenAI-compatible provider is a two-line change:
base_urlandapi_key, plus the model string. - Cache-hit pricing bills repeated prompt prefixes at a discounted rate instead of full input price, and on the official API it's automatic with no opt-in required.
- Hosting options span the official API, aggregators, inference clouds, and decentralized marketplaces; compare them on price, cache-hit passthrough, rate limits, and retention terms.
What is DeepSeek V4 Flash?
V4 Flash is the lighter, cost-optimized member of DeepSeek's V4 open-weight family. Where the V4 Pro tier targets maximum capability on hard reasoning and long-horizon tasks, Flash is built for the high-volume work that dominates most production traffic: summarization, classification, extraction, routing, chat, and retrieval-augmented generation.
Because the weights are published under DeepSeek's Hugging Face organization, you are not locked to one vendor. The same model can be served by DeepSeek's own API, third-party inference clouds, aggregators, or your own hardware, which is why a base-URL-swap workflow matters. For exact specs (context window, license terms, tokenizer details), check the model card on Hugging Face rather than any blog post, including this one.
DeepSeek V4 Flash vs V4 Pro: which should you run?
The structural difference is simple: Flash is the cost-optimized tier, Pro is the capability tier. In practice, that suggests a routing pattern rather than an either/or decision:
- Default everything to Flash. Most production prompts (extraction, rewriting, classification, short-form chat, RAG answers with grounded context) are well within a workhorse model's range.
- Escalate failures to Pro. Add a lightweight check (confidence heuristics, output validation, user feedback signals) and re-run the small share of prompts that fail on Flash against V4 Pro.
- Keep both behind one client. Since both tiers are served through OpenAI-compatible endpoints, tier routing is a model-string change, not a re-integration.
If your workload is mostly difficult reasoning, start with Pro instead; see our companion guide, How to Run DeepSeek V4 Pro. For everything else, Flash-first routing is where the cost savings come from.
Where is the cheapest place to host DeepSeek V4 Flash?
There is no single honest answer, because "cheapest" depends on your traffic shape. The verified anchor is the official DeepSeek API list price: $0.14/M input, $0.28/M output, as of 2026-08-20. Every other host sets its own rates, and those rates change, so treat any specific third-party number you see in a blog post as stale until you confirm it on the provider's pricing page.
Your realistic options, on identical criteria:
| Option type | Examples | How pricing works | What to verify |
|---|---|---|---|
| Official API | DeepSeek API | List price, with automatic cache-hit discount | Rate limits, regional availability |
| Aggregator | OpenRouter | Routes to multiple upstreams; prices vary per upstream | Which upstream serves you, cache-hit passthrough |
| Inference cloud | Together, Fireworks, Novita | Provider-set per-token rates | Cache billing, dedicated vs shared capacity |
| Decentralized marketplace | Morpheus, a decentralized inference marketplace | Independent operators set their own rates | Per-operator pricing, retention policies |
Two cautions apply across the board. First, a lower sticker price can be erased if the provider doesn't pass through cache-hit billing: a workload with 80% cached prefixes can cost less at a higher list price with cache discounts than at a lower flat rate. Second, data-retention terms differ by provider, and any "zero-retention" style language is a policy statement by that provider, not an independently verified fact. Read the terms; don't take marketing pages at face value.
For a regularly updated comparison of per-token prices across hosts, see our cheapest LLM API roundup.
How do you switch your code to V4 Flash?
If you already use the OpenAI SDK (or any OpenAI-compatible client), migration is a configuration change, not a rewrite. Keep the endpoint and key in environment variables so you can move providers without touching code:
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["PROVIDER_API_KEY"],
base_url=os.environ["PROVIDER_BASE_URL"], # e.g. https://api.deepseek.com
)
resp = client.chat.completions.create(
model="deepseek-v4-flash", # exact model string varies by provider
messages=[
{"role": "system", "content": "You are a precise extraction engine."},
{"role": "user", "content": "Extract the invoice total from: ..."},
],
temperature=0.2,
)
print(resp.choices[0].message.content)
print(resp.usage) # inspect cache hit/miss fields where supported
The same call in curl:
curl "$PROVIDER_BASE_URL/chat/completions" \
-H "Authorization: Bearer $PROVIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [
{"role": "system", "content": "You are a precise extraction engine."},
{"role": "user", "content": "Extract the invoice total from: ..."}
],
"temperature": 0.2
}'
Base URLs you'll commonly encounter include https://api.deepseek.com for the official API, https://openrouter.ai/api/v1 for OpenRouter, https://api.together.xyz/v1 for Together, and https://api.fireworks.ai/inference/v1 for Fireworks. The exact model string (deepseek-v4-flash versus a vendor-prefixed variant) differs per provider, so check each provider's docs for the current identifier before deploying.
How does cache-hit pricing actually work?
This is the most underused lever in LLM cost control, and it's worth understanding precisely.
The mechanism. When you send a prompt, the provider checks whether the beginning of your token sequence matches a prefix it processed recently. Tokens that match a cached prefix are billed at a discounted cache-hit rate; only the novel suffix is billed at the full input rate (the "cache miss" rate). On DeepSeek's official API this is automatic; there is nothing to enable and no API parameter to set. The official pricing page lists the current cache-hit and cache-miss input rates separately; check it for the live numbers, since only the $0.14/M list input price is verified as of 2026-08-20.
Why it matters. Many real workloads resend nearly identical prefixes on every call:
- A long system prompt with instructions and tool definitions
- Few-shot examples prepended to every request
- The same document or knowledge base chunk used across many RAG queries
- Agent loops that resend the full conversation history each turn
In these patterns, the majority of input tokens can qualify as cache hits, which pulls your effective input rate well below list. The formula is:
effective input rate = (miss_tokens × input_rate + hit_tokens × hit_rate) / total_input_tokens
How to maximize hits. Prefix matching works from the start of the prompt forward, so structure accordingly:
- Stable content first, variable content last. System prompt, tool schemas, and reference documents go at the top; the user's actual question goes at the end.
- Never put entropy in the prefix. Timestamps, request IDs, and random session tokens near the top of the prompt break the match for everything after them.
- Batch similar requests together. Cache windows are time-bound, so grouping requests that share a prefix improves hit rates.
- Keep few-shot examples byte-identical. Even small edits to examples reset the cached region to the edit point.
How to verify you're getting hits. DeepSeek's official API reports prompt_cache_hit_tokens and prompt_cache_miss_tokens in the response's usage object. Log both per request and compute your hit ratio weekly; if it's low, your prompt structure is the problem, not the pricing. Field names differ across providers, and some third-party hosts don't break out cache statistics at all, which is itself a reason to prefer hosts that do.
One caveat: not every host passes cache-hit billing through to customers. Some charge a flat input rate regardless. Before committing to a provider, confirm on its pricing page whether cached tokens are billed separately.
What will V4 Flash cost per month?
Using only the verified list prices ($0.14/M input, $0.28/M output, as of 2026-08-20), and assuming zero cache hits as a conservative floor:
| Daily volume | Daily cost | 30-day cost |
|---|---|---|
| 5M input + 1M output | $0.98 | ~$29 |
| 50M input + 10M output | $9.80 | ~$294 |
Every percentage point of cache hits lowers the input side of that table. A workload with a heavy stable prefix (say, a support bot with a large system prompt) can see its effective input cost drop substantially below the figures above. Run your own prompt mix for a week, read the cache hit/miss fields, and do the arithmetic with the formula in the previous section.
Production checklist
Before you point real traffic at V4 Flash:
- Pin the model version if your provider offers dated snapshots, so silent upgrades don't shift output behavior.
- Set
max_tokensexplicitly on every call; output tokens are billed at 2× the input rate and runaway generations are the most common budget surprise. - Implement retry-with-backoff for rate limits and 5xx responses, and cap retries to avoid duplicate billing loops.
- Log the full
usageobject, including cache hit/miss fields, so you can audit effective pricing against the provider's invoice. - Keep a fallback provider configured. Because switching is a base-URL change, a secondary endpoint costs nothing until you need it.
- Test structured output and tool calling on your chosen host specifically; support for these features can vary across providers serving the same weights.
- Read the data-retention terms of whichever host you pick, and treat retention claims as policy statements rather than verified guarantees.
FAQ
What is the difference between DeepSeek V4 Flash and V4 Pro?
Flash is the cost-optimized tier of DeepSeek's V4 open-weight family, listed at $0.14/M input tokens as of 2026-08-20; Pro is the higher-capability tier at a higher price. Default to Flash for high-volume tasks and escalate hard prompts to Pro.
What is the cheapest way to run DeepSeek V4 Flash?
The official API lists $0.14/M input and $0.28/M output as of 2026-08-20. Third-party hosts and decentralized marketplaces set their own rates, so compare per-token price, cache-hit support, and rate limits on each provider's pricing page.
How does DeepSeek cache-hit pricing work?
When the start of your prompt matches a recently processed prefix, those tokens are billed at a discounted cache-hit rate instead of the full input rate. It's automatic on the official API; put stable content first and variable content last to maximize hits.
Is DeepSeek V4 Flash OpenAI-compatible?
Yes. The official API and most third-party hosts expose an OpenAI-compatible chat-completions endpoint, so switching is usually a matter of changing base_url, api_key, and the model name in your existing client code.
Questions
- What is the difference between DeepSeek V4 Flash and V4 Pro?
- Flash is the cost-optimized tier of DeepSeek's V4 open-weight family, listed at $0.14/M input tokens as of 2026-08-20; Pro is the higher-capability tier at a higher price. Default to Flash for high-volume tasks and escalate hard prompts to Pro.
- What is the cheapest way to run DeepSeek V4 Flash?
- The official API lists $0.14/M input and $0.28/M output as of 2026-08-20. Third-party hosts and decentralized marketplaces set their own rates, so compare per-token price, cache-hit support, and rate limits on each provider's pricing page.
- How does DeepSeek cache-hit pricing work?
- When the start of your prompt matches a recently processed prefix, those tokens are billed at a discounted cache-hit rate instead of the full input rate. It's automatic on the official API; put stable content first and variable content last to maximize hits.
- Is DeepSeek V4 Flash OpenAI-compatible?
- Yes. The official API and most third-party hosts expose an OpenAI-compatible chat-completions endpoint, so switching is usually a matter of changing base_url, api_key, and the model name in your existing client code.
Sources
- DeepSeek API Docs — DeepSeek
- DeepSeek API Pricing — DeepSeek
- deepseek-ai on Hugging Face — Hugging Face
- OpenRouter Documentation — OpenRouter
- Together AI Documentation — Together AI
- Fireworks AI Documentation — Fireworks AI
- Novita AI — Novita AI
About DeAI
DeAI is an independent publication covering open-weight AI models, private inference, and decentralized infrastructure — the tools for running AI you actually control. We test providers on price, privacy, and refusal behavior and publish the numbers, not the vibes. DeAI is powered by Morpheus (mor.org), a decentralized inference marketplace, and covers it on the same terms as every other provider.
Powered by Morpheus and StrandCMS
Morpheus is a decentralized inference marketplace, covered on the same terms as every other provider — we rank it wherever the data lands. StrandCMS is the open-source, agent-first framework this site is built on.
