Blog / DeepSeek
Self-host DeepSeek V4.1 Flash: cost vs the DeepSeek API
Self-hosting DeepSeek V4.1 Flash beats DeepSeek's API on busy GPUs you own, and often loses on GPUs rented by the hour. The arithmetic, with sources.

Self-hosting DeepSeek V4.1 Flash is cheaper than DeepSeek's API when you serve it on GPUs you already own and keep them busy. On GPUs rented by the hour at typical prices, it is often more expensive than the API. Where your own setup lands depends on your GPU cost, your throughput and your load, so this post shows the arithmetic with public inputs that you can swap for your own.
What DeepSeek's API costs today
DeepSeek's pricing page lists deepseek-flash (DeepSeek-V4.1-Flash-1017) at these prices per million tokens:
| Peak | Off-peak | |
|---|---|---|
| Input, cache hit | $0.006 | $0.003 |
| Input, cache miss | $0.30 | $0.15 |
| Output | $1.20 | $0.60 |
Off-peak is half price. Peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday, except Chinese public holidays. That is 35 of the 168 hours in a normal week, so most hours are off-peak, but peak hours overlap the working day in East Asia and the start of the European one.
Many articles from earlier in 2026 still quote $0.14 and $0.28. Those were the prices of the older V4-Flash, which DeepSeek has retired from its API.
What a GPU can serve
The cleanest public numbers for V4.1 Flash come from SemiAnalysis InferenceX, as quoted in OpenRouter's self-hosting analysis (12 November 2026). Both runs use vLLM, FP4 weights and 32 concurrent agent sessions:
| Output tokens/s per GPU | Input tokens/s per GPU | Input from cache | |
|---|---|---|---|
| 4 × H200 | 231 | 35,084 | 95% |
| 2 × B200 | 683 | 117,225 | 96% |
Agent workloads look like this: huge prompts, mostly repeated from the last turn, and short answers. That is why input dwarfs output.
These are not maximum numbers. NVIDIA's Dynamo recipe for V4.1 Flash reports 315 to 359 output tokens/s per H200 and 991 to 1,088 per B200 at higher concurrency. We use the lower InferenceX figures because they include the input side of the work.
A worked example
Everything in this section uses example inputs from the public sources above and below, not a measurement of anyone's deployment. Take one GPU running for one hour, fully busy, and price the same tokens at DeepSeek's rates.
One B200 for one hour serves about 2.46 million output tokens and 422 million input tokens. 405 million of those input tokens come from cache and 16.9 million do not.
At DeepSeek's peak prices, that hour of traffic would cost:
- cached input: 405.1M × $0.006 = $2.43
- uncached input: 16.9M × $0.30 = $5.06
- output: 2.46M × $1.20 = $2.95
- total: $10.45, or $5.22 at off-peak prices
One H200 for one hour serves 0.83 million output and 126 million input tokens. The same traffic would cost $3.61 at peak, or $1.81 off-peak.
Now compare with what the GPU-hour costs you:
- If you own the GPUs: SemiAnalysis estimates hyperscale ownership cost at $1.22 per H200-hour and $1.73 per B200-hour (InferenceX, July 2026 survey).
- If you rent cheaply: OpenRouter's analysis uses InferenceX's retail tier of $2.90 per H200-hour and $3.70 per B200-hour.
- If you rent on demand: the Uvik GPU price index puts the median at $5.70 per H200-hour and $8.19 per B200-hour (7 October 2026).
Divide the GPU-hour cost by the API cost of the same traffic. For an owned B200 at peak prices, $1.73 ÷ $10.45 = 0.17, so the GPU-hour costs 17% of what the API would charge. The same division for each row gives this table (example inputs only):
| GPU-hour cost (example) | H200: share of API price, off-peak / peak | B200: share of API price, off-peak / peak |
|---|---|---|
| Owned ($1.22 / $1.73) | 68% / 34% | 33% / 17% |
| Cheap rental ($2.90 / $3.70) | 161% / 80% | 71% / 35% |
| Median on-demand ($5.70 / $8.19) | 316% / 158% | 157% / 78% |
Below 100%, the GPU-hour costs less than the API would charge for the same tokens. Above 100%, the API is cheaper. All rows assume the GPUs are fully busy.
The method, step by step, is in how to calculate cost per million tokens on your own GPUs.
Why renting usually loses
Renting by the hour puts a margin on top of the GPU, while DeepSeek serves its API at a scale few can match. DeepSeek published its own serving economics in February 2025: about 14,800 output tokens per second per 8-GPU H800 node, at an assumed $2 per GPU-hour (source). A provider running at that scale is hard to beat with a few rented GPUs.
OpenRouter reaches the same conclusion from another direction. Against the cheapest zero-data-retention providers of V4.1 Flash, which charge as little as $0.18 per million output tokens, a rented 4 × H200 setup never breaks even, and a 2 × B200 node only does at 76% sustained load.
So if you have no GPUs, the API is usually the cheaper way to buy DeepSeek.
Why owning wins
If your company already owns H100s, H200s or Blackwell GPUs, the comparison flips. You pay for the hardware whether it serves tokens or sits idle. What matters is the cost of each extra token, and that is power, space and the people who run it.
Three things decide how big the saving is:
- Load. The table assumes busy GPUs. Halve the load and the share doubles: in the example, an owned B200 at 50% load costs 33% of DeepSeek's peak price, while an owned H200 costs 135% of the off-peak price.
- Hardware. Blackwell runs DeepSeek's FP4 weights natively. Hopper doesn't, so H200s serve fewer tokens per dollar.
- The serving stack. The same GPU can produce very different token rates depending on the engine, the parallelism and the kernels. Speculative decoding, separate prefill and decode GPUs and tuned kernels each add throughput.
Costs the table leaves out
These numbers cover the GPU-hour only. A real deployment also costs:
- Engineering time to set up vLLM or SGLang, pick the parallelism, and keep up with new DeepSeek releases. V4.1 Flash shipped in September and was updated in October.
- Headroom for peaks. You size for your busiest hour, so average load is lower than peak load.
- Testing. You need to prove the self-hosted model answers like the API before you switch traffic.
Those costs are why many teams with idle GPU capacity still pay for the API.
Where dl fits
dl model sets up an open model on an Nvidia GPU you own, with vLLM, and tests it before it goes live; the details are in the docs. Serving DeepSeek V4.1 Flash across several GPUs with it is coming soon. If your team runs a bigger setup, we're working with a few design partners to get them going. Tell us what you run: your company, your GPUs, and the models you use.
FAQs
Is self-hosting DeepSeek cheaper than the API?
Usually only if you own the GPUs or rent them very cheaply, and keep them busy. In the worked example with public inputs, a busy owned B200 costs well under DeepSeek's off-peak price for the same tokens. On GPUs rented at the median on-demand price, it usually costs more.
What does DeepSeek V4.1 Flash cost on the API?
$0.30 per million uncached input tokens, $0.006 per million cached input tokens and $1.20 per million output tokens at peak. Off-peak prices are half. Prices are from DeepSeek's pricing page, checked on 19 November 2026.
Does peak vs off-peak pricing change the answer?
Yes. Off-peak prices are half, so the saving from self-hosting shrinks off-peak. Most hours of the week are off-peak, so compare with a blend that matches when your traffic actually runs.
Can I use rented GPUs instead?
You can, but at median on-demand prices a rented H200 costs more than DeepSeek's API for the same traffic. Rented B200s are close to break-even. Reserved or spot capacity changes the maths, so run it with your own rate.
What is not included in these numbers?
Engineering time, peak headroom, testing and ongoing upgrades. They are real costs, and they are what a managed setup on your own GPUs replaces.