DeepSeek can keep AI coding costs low, but “DeepSeek pricing” is not one number. V4 Flash and V4 Pro have different rates, and cached input costs far less than fresh input. This guide explains the charges so you can estimate what you will pay.
DeepSeek charges by the token. It does not have a flat coding plan like GLM’s or Alibaba’s. This can suit light or occasional use because you pay only for the API traffic you generate.
The model tiers
DeepSeek direct API peak pricing snapshot (August 2026)
| deepseek-v4-flash | $0.01/M cached input, $0.44/M input, $1.32/M output |
|---|---|
| deepseek-v4-pro | $0.04/M cached input, $1.32/M input, $3.96/M output |
DeepSeek introduced peak and off-peak pricing on August 16, 2026. Off-peak input and output rates are half the peak rates. Check the live pricing page for the current UTC schedule before moving automated jobs.
The official page also lists two base URLs: https://api.deepseek.com for OpenAI-format tools and https://api.deepseek.com/anthropic for Anthropic-format tools like Claude Code.
Older guides and tools may still show deepseek-chat and deepseek-reasoner. DeepSeek discontinued those aliases on July 24, 2026 at 15:59 UTC. Use the current V4 model names in new configurations.
Cache-hit discounts
DeepSeek bills cached input tokens far cheaper than fresh ones. When your prompts reuse the same system prompt or files across an agent session, those repeated tokens can hit the cache and cost a fraction of the standard input rate.
This matters for coding agents like Claude Code and OpenCode, which repeatedly send the same context. Under the August peak schedule, V4 Flash cached input is $0.01 per million tokens compared with $0.44 for fresh input.
Base URLs and model names
Use the base URL that matches your tool:
# OpenAI-compatible tools such as Cline, OpenCode, Aider, Codex custom providers
https://api.deepseek.com
# Anthropic-compatible tools such as Claude Code
https://api.deepseek.com/anthropic
For new text-only setups, use deepseek-v4-flash as the default model where supported. Use deepseek-v4-pro for harder tasks where the extra capability is worth the higher output price. Use deepseek-v4-flash-vision-exp when a task requires image input and your client supports structured image blocks.
How to estimate your cost
A simple method:
- Estimate input and output tokens per task (an agent session might be hundreds of thousands of tokens with context).
- Multiply by the per-million rates for your chosen model from the pricing page.
- Discount the repeated input for cache hits.
- Multiply by tasks per day and days per month.
For most individual developers, real DeepSeek spend is low because agent sessions reuse context. The number to watch is output tokens; output is far more expensive than cache-hit input.
Pro vs Flash: which to use
Use deepseek-v4-flash for routine coding. Move to deepseek-v4-pro for difficult reasoning, debugging, or architecture work. Replace deepseek-chat and deepseek-reasoner in old tool configurations.
A good pattern is to default to the cheap tier and escalate only when a task genuinely needs more.
Before you budget
- Check current per-million rates on the official pricing page
- Use deepseek-v4-flash by default and deepseek-v4-pro for hard tasks
- Account for cache-hit discounts on repeated context
- Use the OpenAI base URL for OpenAI-compatible tools and /anthropic for Claude Code
- Replace the discontinued deepseek-chat and deepseek-reasoner aliases
What to use
DeepSeek charges by the token for V4 Flash and V4 Pro. Cached agent context receives the lowest input rate. Start with V4 Flash, move to V4 Pro when a task needs it, and use the base URL that matches your tool. Check the official pricing page before relying on the figures in a budget.
To put it to work, see run DeepSeek with Claude Code. To compare against flat-rate options, see coding plans vs pay-per-token.