Ship a Full-Stack App with One Prompt

Copy this prompt into your AI coding agent, or open it in one below.

Give this to your AI Create a to-do list app using Puter.js

Coding manually? see the guide

Tutorials

DeepSeek API Pricing: Full Breakdown of Costs (Oct 2026)

On this page

In this guide, you'll learn what every current DeepSeek model costs, how the billing works (including the things that can make your bill higher than expected), the most effective ways to cut costs, and the options for using DeepSeek models for free.

How much does the DeepSeek API cost?

DeepSeek's main model, DeepSeek V4.1 Flash, costs $0.30 per 1 million input tokens and $1.20 per 1 million output tokens at peak rates, and half that ($0.15 and $0.60) off-peak. The higher-capability model, DeepSeek V4 Pro, costs $1.32 per 1 million input tokens and $3.96 per 1 million output tokens at peak, and $0.66 and $1.98 off-peak. At peak rates, V4.1 Flash costs roughly 17 to 25 times less per token than GPT-5.5 or Claude Opus 4.8.

Here's the full current lineup, which is two models (peak rates, with off-peak in parentheses):

Model Best for Cache-miss input Cache-hit input Output (per 1M)
DeepSeek V4.1 Flash Default: chat, extraction, coding help, image understanding, high-volume work $0.30 ($0.15) $0.006 ($0.003) $1.20 ($0.60)
DeepSeek V4 Pro Complex reasoning, multi-step analysis, hard coding $1.32 ($0.66) $0.044 ($0.022) $3.96 ($1.98)

In the API you call these as deepseek-flash and deepseek-v4-pro. DeepSeek currently serves deepseek-flash with DeepSeek-V4.1-Flash-1017, an October 17 update to V4.1 Flash that kept the same pricing, and serves deepseek-v4-pro with DeepSeek-V4-Pro-0813, the August 13 general release of V4 Pro.

A few more things to know before you budget. V4.1 Flash accepts image input, while V4 Pro is text-only, and neither model generates images, video, or audio. DeepSeek also sells standalone Search and Fetch APIs at $0.75 per 1,000 successful requests each. The older V4 Flash and V4 Flash Vision Exp models have been retired, and requests that still use the names deepseek-v4-flash or deepseek-v4-flash-vision-exp are served by V4.1 Flash and billed at the Flash price.

All prices in this guide come from DeepSeek's official pricing documentation. Next, let's look at how the pricing works.

How DeepSeek API pricing works

The DeepSeek API uses pay-as-you-go, per-token billing: you're charged for the tokens you send (input) and the tokens the model generates (output). A token is roughly 4 characters or 0.75 English words; we explain tokens in more detail in our OpenAI pricing guide, and the mechanics are the same here.

Peak and off-peak rates

Since August 16, 2026, DeepSeek bills at two rates depending on when the request runs. Off-peak rates are exactly half of peak rates. 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 off-peak, including all of Saturday and Sunday. By our count that's 35 peak hours out of 168 in a normal week, so most hours bill at the lower rate.

Thinking mode is on by default and bills as output

Both models run in thinking mode by default, where the model generates internal reasoning before its answer. Those reasoning tokens bill at the output rate even though you don't see them in the final response. Because thinking is the default, a request you expected to be cheap can generate far more output tokens than the visible answer suggests. You can switch to non-thinking mode for tasks that don't need step-by-step reasoning, which cuts output token counts directly.

Context caching is automatic and has no extra cost

Every DeepSeek request automatically uses context caching. When the start of your prompt matches a recent request (a reused system prompt, tool definitions, a shared document), the matching tokens bill at the cache-hit rate instead of the full input rate. On V4.1 Flash that drops input from $0.30 to $0.006 per 1M tokens at peak, a 98% reduction.

Unlike some providers, there's nothing to configure and nothing extra to pay: no cache_control parameter, no separate cache-write charge, and no hourly storage fee. Caching is pure savings here. The one condition, per DeepSeek's documentation, is that cache hits are best-effort and depend on an exact matching prefix, so keeping your system prompt byte-for-byte identical across calls is what raises your hit rate.

Long context does not cost extra

Both models include a 1M-token context window and up to 384K tokens of output at the standard per-token rates. There's no separate, more expensive long-context price schedule, so a large-context request bills at the same rate per token as a small one.

What makes your bill higher than expected

Thinking tokens, because thinking is the default

The most common reason a DeepSeek bill runs higher than expected is thinking mode being left on for simple tasks. The model can produce thousands of reasoning tokens, billed as output, before a short answer. Disabling thinking for routine work is the first thing to check.

Output-heavy generation

Output costs four times the cache-miss input rate on V4.1 Flash and three times on V4 Pro, and the 384K maximum output combined with default thinking means a runaway response is the main cost risk. Long generations, verbose agents, and uncapped responses are where bills grow.

How to reduce DeepSeek API costs

The methods below are ordered by impact, with the most effective first.

1. Use V4.1 Flash for almost everything

V4.1 Flash costs about 23% of Pro's input rate and 30% of its output rate, and DeepSeek's own V4.1 Flash release benchmarks put it ahead of V4 Pro on several agent tasks, including Terminal-Bench 2.1 (90.6 vs. 87.9 for V4 Pro 0813). Use Flash for chat, extraction, classification, summarization, coding, and anything that needs image input, which covers most production traffic. Reserve V4 Pro for the tasks where it does better in your own testing.

2. Run batch work off-peak

Off-peak requests cost half as much, and off-peak covers every weekend hour and most weekday hours. Jobs that don't need an immediate answer, such as nightly summarization, evaluations, or data extraction, can be scheduled outside 01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays to get the lower rate.

3. Turn off thinking mode for routine tasks

Since thinking tokens bill as output and thinking is on by default, switching to non-thinking mode for tasks that don't need deep reasoning is an immediate saving. Keep thinking on only for the prompts that justify it.

4. Structure prompts for cache hits

Cache hits cost 2% of the cache-miss rate on V4.1 Flash and about 3% on V4 Pro, and caching is automatic with no write cost to weigh, so there's no downside to optimizing for it. Put your static content (system prompt, instructions, shared context) at the start of the prompt and the variable content at the end, and keep the prefix identical across calls. Small differences in the prefix break the cache.

5. Cap output length

Output is the expensive side at three to four times the input rate, and thinking adds to it. Set a maximum output limit and ask for concise or structured responses, especially on high-volume workloads.

Can you use the DeepSeek API for free?

There are three ways to use DeepSeek models without paying, and one of them scales to any number of users.

Puter.js: the User-Pays model

Puter.js is a JavaScript library that lets you add DeepSeek models to your app with no API key, no backend, and no bill to you as the developer. It works on the User-Pays model: each user of your app covers their own AI usage through their Puter account, so your costs stay at zero no matter how many users you have.

<html>
<body>
  <script src="https://js.puter.com/v2/"></script>
  <script>
    puter.ai.chat("Explain quantum computing in simple terms", {
      model: "deepseek/deepseek-v4.1-flash"
    }).then(response => {
      document.body.innerHTML = response.message.content;
    });
  </script>
</body>
</html>

We ran a simple workload: 500 monthly users sending 30 messages each, averaging 1,000 input and 300 output tokens per message, for 15M input and 4.5M output tokens a month. On V4.1 Flash through the DeepSeek API at peak rates, our calculation puts that at $4.50 for input and $5.40 for output, about $9.90 a month (about $4.95 if all of it ran off-peak). The bill is small, but it grows with usage. The same app at 50,000 users runs about $990 a month at peak rates. Through Puter.js it stays $0 at any scale, with no API key to manage and no rate limits to design around, because each user carries their own usage.

Signup grant

New DeepSeek accounts receive a granted balance to test the API, and the granted balance is spent before any topped-up balance. The exact amount and validity window are set by DeepSeek and change, so check your balance on the platform after signing up. Once it's used, billing switches to standard pay-per-token rates.

OpenRouter's free endpoints

OpenRouter has long listed free variants of DeepSeek models (tagged :free), which makes it one of the easier ways to try DeepSeek without an account balance. Free usage is capped at 50 requests per day and 20 per minute, rising to 1,000 per day once you've purchased at least $10 in credits. It's built for testing, not continuous production use, and failed requests still count against your daily quota.

Real-world cost examples

Per-million-token prices are hard to apply directly, so here's what we calculated for a few real workloads, using the same method each time: estimate tokens per request, multiply by volume, then by the per-million rate. We show peak rates, and off-peak runs cost half.

Customer support chatbot. We modeled 1,000 conversations a month, averaging 8 messages each, with about 1,200 input tokens (system prompt plus history) and 250 output tokens per message. That's 9.6M input and 2M output tokens monthly, which we priced as:

Model Monthly cost (peak) Monthly cost (off-peak)
V4.1 Flash ~$5.30 ~$2.65
V4 Pro ~$20.60 ~$10.30

If nearly all of that input hits the cache, the input side of the V4.1 Flash bill falls from $2.88 to about $0.06, and the total to about $2.46 at peak rates. Output then makes up almost all of the cost.

Summarizing 100 PDFs. At ~20,000 tokens per document with 500-token summaries, that's 2M input and 50K output tokens. We calculate about $0.66 on V4.1 Flash at peak rates, or $0.33 off-peak. DeepSeek doesn't accept PDF files directly, so you extract the text first.

Daily content generation. For 30 articles a month on V4.1 Flash, with 2,000-token prompts and roughly 4,000 output tokens each (including thinking tokens), we estimate about $0.16 a month at peak rates.

Complete DeepSeek API pricing table

All prices are per 1M tokens. Off-peak rates are half of peak rates.

Model (API name) Rate Cache-miss input Cache-hit input Output Context Max output
DeepSeek V4.1 Flash (deepseek-flash) Peak $0.30 $0.006 $1.20 1M 384K
DeepSeek V4.1 Flash (deepseek-flash) Off-peak $0.15 $0.003 $0.60 1M 384K
DeepSeek V4 Pro (deepseek-v4-pro) Peak $1.32 $0.044 $3.96 1M 384K
DeepSeek V4 Pro (deepseek-v4-pro) Off-peak $0.66 $0.022 $1.98 1M 384K

Both models support thinking (default) and non-thinking modes, JSON output, and tool calls, and both are served through an OpenAI-compatible endpoint, an Anthropic-compatible endpoint, and the Responses API format. Only V4.1 Flash accepts image input. The Search and Fetch APIs are billed separately at $0.75 per 1,000 successful requests each. DeepSeek says server-side Search and Fetch calls made through DeepSeek Harness, Claude Code, or Codex are free until per-request billing starts on November 1, 2026 (Beijing time).

Conclusion

DeepSeek's current API pricing is V4.1 Flash at $0.30 input and $1.20 output per million tokens, and V4 Pro at $1.32/$3.96, with both rates halved off-peak. The structure rewards a few simple choices:

  • Use V4.1 Flash for almost everything and reserve Pro for tasks where it tests better.
  • Schedule batch jobs off-peak to pay half.
  • Turn off thinking mode for routine work, since it's on by default and bills as output.
  • Keep your prompt prefix identical to get the automatic cache-hit rate, which is nearly free with no write or storage cost.
  • Cap output length, the most expensive side of the bill.

Prices here were verified against DeepSeek's official pricing page and change log. DeepSeek adjusts rates periodically, so always confirm before committing to a budget.

Ship a Full-Stack App with One Prompt

Give this to your AI Build an AI chat app using Puter.js

Coding manually? see the guide