Live DeepSeek API pricing on Inference.net
On Inference.net, DeepSeek API pricing starts at $0.08 per 1M input tokens, $0.635 per 1M output tokens, and $0.007 per 1M cached input reads for deepseek-v4.1-flash-1017 (1,040,000-token context window, vision and tool calling enabled). All standard DeepSeek routes expose OpenAI /v1/chat/completions, /v1/responses, and native Anthropic /v1/messages behind one API key with 0% markup pay-as-you-go billing.
Every model ID, context limit, and per-1M-token rate in the table below was verified directly from GET https://api.inference.net/v1/models on 2026-12-05:
Note: You can fetch live pricing programmatically at any time without authentication using curl -s https://api.inference.net/v1/models (API prices are returned per token; multiply by 1,000,000 for per-1M-token rates). For a provider comparison against DeepSeek's direct first-party API, see Inference.net vs DeepSeek API.
Which DeepSeek model should you pick?
- Default for coding agents, RAG, and general automation: deepseek-v4.1-flash-1017 ($0.08 / $0.635 / $0.007 cached). Lowest uncached input cost in the DeepSeek lineup, 1.04M context, image input, full reasoning effort control (none, low, high, max), default Zero Data Retention, and US-pinned routing via https://us.api.inference.net/v1.
- General Flash alias when output volume dominates: deepseek-v4.1-flash ($0.103 / $0.60 / $0.007 cached) has slightly lower output pricing ($0.60 vs $0.635 per 1M). Note that standard deepseek-v4.1-flash routes via a third-party provider, so use deepseek-v4.1-flash-1017 when you need Inference.net's default ZDR and US-only host (us.api.inference.net).
- Authorized AppSec, pentesting, and SOC triage: deepseek-v4.1-flash-1017-cyber ($0.30 / $1.00 / $0.007 cached). Abliterated for authorized security workflows to avoid false-positive refusals, hosted on US ZDR infrastructure, and gated by team-scoped Privileged Model Access.
- Heavier reasoning on DeepSeek V4 Pro: deepseek-v4-pro-0813 ($1.32 / $3.96 / $0.044 cached) supports explicit low, high, and max reasoning efforts, while deepseek-v4-pro ($2.10 / $4.20 / $0.003625 cached) provides a larger 384K max output ceiling and ultra-low cached-read rates for long repeated contexts.
- Legacy compatibility only: deepseek-v3.2 ($0.70 / $2.00) is priced higher than deepseek-v4.1-flash-1017, has a smaller 163K context window, and does not support tool calling (supports_tools: false). Migrate legacy V3.2 workloads to deepseek-v4.1-flash-1017.
Real workload cost calculations
Headline per-1M rates rarely tell the full story because prompt caching changes the input bill by an order of magnitude. Below are three concrete engineering workloads priced using the exact live rates above.
1. Coding-agent session with 90% prompt caching
A 30-turn coding session (Claude Code, OpenCode, or Cline) with 5,000,000 total prompt tokens (500K uncached + 4.5M cached reads) and 100K output tokens:
Without prompt caching, those same 5M input tokens on deepseek-v4.1-flash-1017 would cost $0.40 instead of $0.0715, making the session 3.4x more expensive ($0.4635 vs $0.135).
Extracting typed JSON from 10,000 documents where each request pairs a shared 1,500-token system prompt and JSON schema (15M cached reads across the run) with 2,500 fresh document tokens (25M uncached input) and 400 output tokens (4M output):
3. Authorized AppSec repository sweep (250K-token codebase, 20 checks)
Running 20 targeted security checks (authz, SSRF, SQLi, secrets, IAM) against one frozen 250,000-token service snapshot on deepseek-v4.1-flash-1017-cyber ($0.30 / $1.00 / $0.007 cached), with 2,000 fresh prompt tokens and 1,500 output tokens per check:
- Cold pass (check 1): 252K uncached input tokens = $0.0756
- Warm passes (checks 2-20): 4.75M cached tokens ($0.03325) + 38K fresh check tokens ($0.0114) = $0.04465
- Output (all 20 checks): 30K output tokens = $0.0300
- Total 20-check repository audit: $0.15 ($0.15025), compared to $1.54 without prefix caching (a 90.3% cost reduction).
Plug your own token counts and cache hit rates into the LLM Pricing Calculator or Prompt Cache Calculator.
How to maximize automatic prompt cache hits on DeepSeek
DeepSeek V4.1 Flash (deepseek-v4.1-flash-1017, deepseek-v4.1-flash, deepseek-v4.1-flash-1017-cyber) and DeepSeek V4 Pro (deepseek-v4-pro, deepseek-v4-pro-0813) routes on Inference.net use automatic (implicit) prefix caching:
- Omit prompt_cache_key on DeepSeek V4.1 Flash and V4 Pro routes. Prefix matching is automatic on byte-identical token prefixes across those models, so leave prompt_cache_key unset. Check each model's /models/* page for caching guidance on earlier DeepSeek snapshots.
- Keep everything before the split point byte-identical. Place your system instructions, tool schemas (with deterministic JSON key ordering), and static documents or repository files first. Never inject timestamps, UUIDs, or per-request counters into the system prompt.
- Append variable input at the end. Put the changing user message, diff, or document in the final message and verify usage.prompt_tokens_details.cached_tokens in every response.
- Control thinking mode when needed. deepseek-v4.1-flash-1017 thinks by default. If you need strict temperature: 0 determinism for classification or JSON extraction, pass reasoning_effort: "none" (see Reasoning docs).
Copy-paste API examples (cURL and Python)
Streaming cURL with usage and cached-token accounting
Create an API key on API keys (or register), then run:
bash
Python OpenAI SDK (measuring cached tokens and cost)
python
Rate limits, privacy, and live benchmarks
- Rate limits: New teams start with 500 RPM on the Free tier and 1,000 RPM on Paid tiers, with custom per-team overrides available for high-volume workloads. Request bodies and non-streaming responses cap at 32 MiB, so keep stream: true enabled on large outputs (see Rate limits).
- Zero Data Retention and US residency: Direct Inference.net DeepSeek routes (deepseek-v4.1-flash-1017, deepseek-v4.1-flash-1017-cyber) run with Zero Data Retention enabled by default under SOC 2 Type II controls and support the US-only host https://us.api.inference.net/v1.
- Live speed telemetry: Check rolling 15-minute TTFT and decode throughput across DeepSeek and peer open-weight models on Live Benchmarks.
- Live DeepSeek model specs: DeepSeek V4.1 Flash 1017 · DeepSeek V4.1 Flash · DeepSeek V4.1 Flash 1017 Cyber · DeepSeek V4 Flash · DeepSeek V4 Flash 0731 · DeepSeek V4 Pro · DeepSeek V4 Pro 0813 · DeepSeek V3.2
- Comparisons & calculators: Inference.net vs DeepSeek API · DeepSeek V4.1 Flash vs GLM-5.3 Flash · LLM Pricing Calculator · Prompt Cache Calculator
- Workflow guides: Claude Code Alternatives · OpenRouter Alternatives · DeepSeek V4.1 Flash Cyber API Guide












