deepseek-v4-pro and deepseek-v4-flash as direct API model names. Aliases can move to newer versions, so record the model version used by your workload when comparing runs. Check DeepSeek’s official documentation for the current model definitions and pricing terms.
1. Look up current pricing
Use the public/v1/prices/search endpoint with both identifiers. The direct provider is deepseek; a gateway can use a different provider ID and a prefixed model name.
pricing object. For direct text usage, read prompt, completion, and input_cache_read as USD per token. Multiplying by one million gives the comparable per-million-token rates. Re-run the lookup rather than copying a rate from an old example into production.
On September 9, 2026, this Narev lookup returned 3.96 per million completion tokens, and $0.044 per million cache-read tokens. These are a dated catalog snapshot used to explain the arithmetic below, not a guaranteed current quote.
2. Calculate your exact usage cost
For direct DeepSeek, send the total prompt count, including cache hits, asprompt_tokens. Send the cached subset separately as cache_read_tokens. The endpoint applies the standard input rate to the non-cached remainder. Sending only cache misses as the prompt total would undercount usage.
This example has 1,500 prompt tokens: 500 uncached and 1,000 cached. It has 250 total completion tokens, of which 50 are reasoning tokens. Keep those 50 inside the completion total. At the checked rates, internal_reasoning is zero, so there is no additional reasoning surcharge beyond the completion charge.
cost_breakdown.total of 0.001694 USD. That equals 500 × 0.00000132 + 1000 × 0.000000044 + 250 × 0.00000396. This is a reproducible calculation at the dated rates above, not a measured generation’s usage.
Understanding the cost breakdown
Readcost_breakdown.total rather than the legacy camel-case response fields. The published API contract exposes the total; the arithmetic above explains the components without depending on undocumented response fields. The old /api/models/pricing examples have been replaced by the public /v1 API.
If your total differs, first compare the returned rates and confirm the provider. Then check whether the source usage counts are totals or disjoint buckets. Direct DeepSeek usage reports cache hits separately from its prompt total; a tracing system may normalize those values differently. A cached count must be supported by reported usage, not an assumption that a repeated prompt will hit the cache.
The result estimates inference at lookup-time rates. It does not recover historical prices or include unrelated infrastructure COGS. For a gateway-hosted DeepSeek model, resolve that gateway’s pair and verify its usage and pricing contract before reusing the direct-provider calculation.