Blog Model Guides
DeepSeek API Cache Math for Production Agents
Count fresh input, cache-hit input, and output separately before comparing agent costs.
AIWave prices checked 2026-11-05 UTC against the live pricing response and active default-group routes. The old price and capacity examples on this URL were not current evidence. Check the live rate card before using a number in production.
| Exact model ID | Fresh input | Cache-hit input | Output |
|---|---|---|---|
deepseek-v4-flash | $0.30 | $0.006 | $1.20 |
deepseek-v4-pro | $1.32 | $0.044 | $3.96 |
Start with the request ledger
A cache hit is not free input. For each completed request, record fresh input tokens, cache-hit input tokens, output tokens, effective account group, model ID, retries, and settled charge. Check whether a usage field already includes cached tokens before adding buckets: adding cache hits twice inflates the estimate.
Use one unit throughout
For the default group, divide each token bucket by one million, multiply by the matching rate in the table, then add the three amounts. The example uses 400,000 fresh input, 600,000 cache-hit input, and 100,000 output tokens. On the checked Flash row this gives $0.2436; on Pro it gives $0.9504. These are illustrative model-token estimates, not a promise that a real request will be charged that amount.
Audit the estimate
- Match the request's exact model ID to the live price row.
- Reconcile provider-reported usage with the platform's final request ledger.
- Separate failed attempts and retries before reporting cost per completed task.
- Recheck the effective group and current rate before procurement approval.
If cache usage is absent, mark that bucket unknown rather than assuming a hit. See the live rate card for today's displayed rates.
For an executable first request, use the quickstart. Recheck the effective account group and request settlement before treating an estimate as a bill.