DEV Community

Lee Jiang
Lee Jiang

Posted on Edited on Originally published at tokuse.com

DeepSeek API Pricing in 2026: What Cache Hits and 1M Context Really Cost

DeepSeek has a price that looks almost too low to plan around: $0.003 for one million cache-hit input tokens. That is the current list price for deepseek-flash during off-peak hours. It explains why more teams are testing DeepSeek for high-volume summaries, extraction, classification, and developer automation.

The useful question is not whether the headline number is low. It is which traffic hits that number, which traffic pays the full input rate, and how much output the service returns. A small change in those three ratios can move a monthly bill by several times.

This guide uses DeepSeek's public prices verified on November 9, 2026. Prices can change, so check the official pricing page before committing a budget.

DeepSeek API pricing per million tokens in 2026

DeepSeek lists prices per one million tokens:

Model Input, cache hit Input, cache miss Output Context
deepseek-flash off-peak $0.003 $0.15 $0.60 1M
deepseek-flash peak $0.006 $0.30 $1.20 1M
deepseek-v4-pro off-peak $0.022 $0.66 $1.98 1M
deepseek-v4-pro peak $0.044 $1.32 $3.96 1M

Peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday through Friday, excluding Chinese public holidays. Every other hour is billed at the off-peak rate. The current model metadata also lists a 1M context window, up to 384K output tokens, JSON output, tool calls, the Responses API, an Anthropic-compatible API, and vision support for deepseek-flash.

The cache-hit price is 50 times lower than the off-peak cache-miss price. That gap is the main cost lever.

A worked 100M-token example

Assume a batch workload uses 100M input tokens and produces 10M output tokens. Ninety percent of the input is a stable system prompt, schema, policy, or document prefix that DeepSeek can cache.

Cost component Tokens Rate Cost
Cache-hit input 90M $0.003 / 1M $0.27
Cache-miss input 10M $0.15 / 1M $1.50
Output 10M $0.60 / 1M $6.00
Off-peak total $7.77

The same request mix at peak rates costs $15.54. Output now dominates the bill, even though input volume is ten times larger.

Cache behavior has a material effect. At 100M input tokens and 10M output tokens, the off-peak input cost changes like this:

Cache-hit rate Cache-hit cost Cache-miss cost Output cost Total
0% $0.00 $15.00 $6.00 $21.00
50% $0.15 $7.50 $6.00 $13.65
90% $0.27 $1.50 $6.00 $7.77
99% $0.30 $0.15 $6.00 $6.45

The conclusion is straightforward. Preserve stable prefixes, keep outputs small, and move flexible work outside peak hours.

Five controls that change the real bill

1. Make the reusable prefix stable

Place system instructions, output schemas, policy text, and large reusable documents at the start of the prompt. Keep the changing question, user data, and timestamp after that prefix. Small edits inside a long prefix can invalidate the cache and move traffic from the $0.003 rate to the $0.15 rate.

2. Separate short and long output jobs

Output tokens cost four times as much as cache-miss input tokens on deepseek-flash and 200 times as much as cache hits. Ask for a structured record, a bounded answer, or a summary with a word limit. For JSON extraction, define the schema and reuse it. A model that writes three paragraphs when the application needs ten fields is expensive at any input price.

3. Route easy work to Flash

Use deepseek-flash for classification, extraction, routine summaries, and high-volume agent steps. Reserve deepseek-v4-pro for tasks where the extra capability changes the result. A model alias in the gateway makes this switch a routing change instead of an application deployment.

4. Batch non-urgent work off-peak

Off-peak rates are half the peak rates. Content indexing, nightly reports, re-embedding, and backfills can usually run outside the peak windows. The scheduling saving stacks with cache and output controls.

5. Measure cache hit rate, not only token count

A dashboard that reports total tokens hides the most important variable. Track:

  • input tokens split by cache hit and cache miss;
  • output tokens per request;
  • peak and off-peak volume;
  • retries and failed calls;
  • model and route changes;
  • cost per successful task, not cost per API call.

DeepSeek with an OpenAI-compatible API gateway

A gateway becomes useful when production traffic uses more than one model. The application calls one OpenAI-compatible endpoint and a model alias. The gateway owns provider credentials, routing, budgets, usage logs, retries, and fallback policy.

This reduces integration work in three ways:

  1. Application code stays stable when the model changes.
  2. Usage and spend are visible across providers.
  3. A cheaper or secondary model can be tested without rewriting every service.

Tokuse currently lists deepseek-flash and deepseek-v4-pro in its public model catalog and exposes an OpenAI-compatible API. A minimal client setup looks like this:

import os

from openai import OpenAI

client = OpenAI(
    api_key=os.environ["TOKUSE_API_KEY"],
    base_url="https://tokuse.com/v1",
)

response = client.chat.completions.create(
    model="deepseek-flash",
    messages=[
        {
            "role": "system",
            "content": "Return a compact JSON object. Do not add commentary.",
        },
        {
            "role": "user",
            "content": "Extract the product name, price, and billing period.",
        },
    ],
    response_format={"type": "json_object"},
    max_tokens=300,
)

print(response.choices[0].message.content)
Enter fullscreen mode Exit fullscreen mode

Keep the key on the server. Log request IDs, model name, token counts, latency, status, and cache-related usage fields. Redact prompts and responses by default.

Test before moving production traffic

Run a two-week pilot with a fixed evaluation set. Compare quality, output tokens, cache-hit rate, latency, retries, and cost per successful task against the current route. Start with non-customer-facing work. Move one high-volume task at a time after the results are stable.

DeepSeek's price advantage is real, and the gap becomes larger when cache hits and output controls are both working. The teams that capture it will treat routing and measurement as part of the product, not as a billing report they open at the end of the month.

Tokuse is a unified AI API gateway and admin dashboard for teams that want to test, route, and monitor multiple models from one OpenAI-compatible endpoint. See the current model catalog and set up a test key at Tokuse.

Sources

Pricing is an official list-price estimate, not a quote for a specific workload. Validate current rates, peak windows, model availability, and your own token mix before making a purchasing decision.

Top comments (0)