DeepSeek-V4.1-Flash: Self-Host Cost vs API Price
Connor Blier
Founding GTM
DeepSeek-V4.1-Flash: Self-Host Cost vs API Price
Self-hosting DeepSeek-V4.1-Flash beats a per-million-token API only when sustained throughput and GPU utilization are high enough to push your effective cost per million tokens below the API's price. The decision is volume-driven: measure tokens per second, divide GPU hourly cost by hourly token output, and compare.
The question behind the question
"Is it cheaper to self-host DeepSeek-V4.1-Flash or pay a per-million-token API?" has one honest answer: it depends on your sustained throughput and how full you keep the GPU. A per-million-token API price is fixed and includes zero idle. Your self-hosted cost is a GPU hourly rate divided by how many tokens that GPU actually produces per hour, so the whole comparison collapses to two numbers you have to measure, not guess.
The break-even formula
Think of it parametrically rather than plugging in a headline price. Take your GPU's hourly rate, divide it by the tokens that GPU actually produces in an hour (tokens/sec multiplied by 3600), and you get a raw cost per token. Scale that to a million tokens, then divide by your utilization fraction: the share of each paid hour the GPU is genuinely serving traffic rather than sitting idle. The lower your utilization, the higher your real cost per million tokens, because you are paying for the idle minutes too. Self-hosting wins only when that number lands under the API's per-million-token price after you also price engineering, on-call, and cold-start waste. The variables matter more than any single example: a faster GPU raises the denominator and drops the price, while spiky traffic drops utilization and raises it. We walk through the full model in LLM inference cost at scale, and the per-request accounting you need to track it in production lives in token usage cost per request tracking for self-hosted LLM inference.
Throughput is the lever that moves the price
Every input to that formula except throughput is roughly fixed, so throughput is where self-hosting is won or lost. DeepSeek-V4.1-Flash is a mixture-of-experts model built for distributed serving: vLLM reports it serving at 954K tokens/s per GPU on a GB300 NVL72 rack using P/D disaggregation and Wide-EP. That is an aggregate-rack figure on frontier hardware, not what a single commodity GPU delivers, but it shows how far the ceiling moves when you disaggregate prefill and decode. The architecture and when it pays off are covered in disaggregated prefill/decode LLM serving.
For a grounded sense of single-GPU numbers, our benchmarks matter more than vendor headlines. In our benchmarks on the Cerebrium platform, SGLang hit 460 tokens per second on a single H100 at batch size 64 serving Llama 3.1 70B FP8, and vLLM delivered the lowest time-to-first-token at 123ms. Those were measured as the total roundtrip to the Cerebrium platform with 256 input tokens, so they include real network latency, not just kernel time. The framework and flag choices that produce those numbers are in vLLM server parameters for inference throughput.
Hardware changes the denominator
The same model on different silicon produces wildly different tokens/sec, which is the denominator in the cost formula. In an earlier TensorRT-LLM tutorial we reached ~1700 output tokens per second (FP8) on a single Nvidia A10, with higher figures on A100 and H100 class hardware. Choosing the right card for your batch profile is the single biggest knob on effective cost per million tokens, and the trade-offs are laid out in H100 vs H200 LLM inference throughput.
Utilization: the number nobody prices
Utilization is the quiet multiplier in the formula. A GPU you rent by the hour but keep busy only part of the time inflates your real cost per million tokens by the inverse of that fraction: halve your utilization and you roughly double your effective price. This is why API pricing feels cheap at low volume: you pay only for tokens, never for idle. Self-hosting only pulls ahead once sustained traffic keeps the GPU busy enough that the idle penalty shrinks toward zero. Production proof that autoscaling can hold utilization high: Distil Labs runs up to 150 requests per second per model at peak with multiple models deployed concurrently.
So, which is cheaper?
Low or spiky volume: stay on the per-million-token API and pay for simplicity. High, steady volume: self-host, keep utilization high, pick throughput-optimal hardware, and your effective price per million tokens can fall well under API rates. Plug your measured tokens/sec and GPU rate into the formula above, factor realistic utilization, and the answer stops being a matter of opinion.
Frequently asked questions
- How do I calculate DeepSeek-V4.1-Flash self-hosted cost per million tokens?
- Divide the GPU hourly cost by the tokens it produces per hour (tokens/sec x 3600), scale that to a million tokens, then divide by your utilization fraction. The lower your utilization, the higher your real cost per million tokens, because you are also paying for idle time.
- What throughput can DeepSeek-V4.1-Flash reach?
- vLLM reports DeepSeek-V4.1-Flash serving at 954K tokens/s per GPU on a GB300 NVL72 rack using P/D disaggregation and Wide-EP. That is a distributed-rack figure on frontier hardware, not a single commodity GPU.
- When does self-hosting beat a per-million-token API?
- Only at high, steady volume where GPU utilization stays high. The comparison is volume-driven: below your break-even the managed API is cheaper once you price engineering, on-call, and idle GPU time.
- Why does utilization matter so much?
- An API charges only for tokens, never idle. A self-hosted GPU that sits partly idle raises your effective cost per million tokens by the inverse of its utilization fraction, so sustained traffic is what makes self-hosting pay off.
Get started with Cerebrium
Deploy AI models on serverless GPUs in minutes, with no infrastructure to manage. Start for free and pay only for the compute you use.
Sources
- vllm.ai
“On one NVIDIA GB300 NVL72 rack, vLLM with P/D disaggregation and Wide-EP serves DeepSeek-V4.1-Flash on SemiAnalysis AgentX at 954K tokens/s per GPU”
- cerebrium.ai
“As for throughput use cases, it seems SGLang was a clear winner achieving a throughput of 460 tokens per second on a batch size of 64.”
- cerebrium.ai
“The following benchmark was done with 256 input tokens on 1xH100 of batch size 1. This was the total roundtrip time of a request made to the Cerebrium platform.”
- cerebrium.ai
“In this tutorial we will achieve ~1700 output tokens per second (FP8)on a single Nvidia A10 instance however you can go up to ~4500 output tokens per second on a single Nvidia A100 40GB instance or even ~19,000 tokens on a H100.”
- cerebrium.ai
“Today, Distil Labs runs up to 150 requests per second per model during high-traffic periods, with multiple models deployed concurrently.”
- cerebrium.ai
“From our tests, it seems that vLLM is the best framework for use cases looking for the lowest TTFT of 123ms which is extremely quick if you take into consideration network latency.”