DeepSeek · Mid-tier · 128K context window
$0.0148 per call at 3,000 input / 6,000 output tokens.
Per call
$0.0148
10K calls/mo
$147.9
Cache savings
75% off input
Batch savings
0% off all
Adjust token counts, volume, and discount toggles to model your api generation spend. Prices verified daily against provider pricing pages.
Call DeepSeek R1 with the OpenAI Python SDK pointed at api.deepseek.com:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.deepseek.com/v1",
api_key=os.environ["DEEPSEEK_API_KEY"],
)
response = client.chat.completions.create(
model="deepseek-r1",
max_tokens=6000,
messages=[{"role": "user", "content": "Your prompt here"}]
)
# Cost: ~$0.0148 per call at standard rates
# Input: $0.55/MTok
# Output: $2.19/MTokPer-call cost for all models scoring 50+ on api generation benchmarks. Hover for details.
Highest-quality affordable option: Claude Haiku 4.5 at $0.0330/call (2.2x the cost, 72/100 quality). DeepSeek R1 is already the cheapest choice for api generation.
Endpoint generation is the most output-heavy code task tracked here: 3K in for the spec, 6K out for handlers, types, validation, and error paths. Output pricing is therefore the whole ballgame, and the gap between a flagship and a mid-tier model at 6K output tokens compounds fast across a large API surface. Generating one resource at a time costs less than one giant multi-resource prompt.
For DeepSeek R1 specifically, that means output tokens cost 4.0x more than input, at $2.19 vs $0.55 per MTok. At this use case’s 3,000/6,000 token split, output accounts for 89% of the $0.0148 per-call cost.
| Direction | $/MTok | Tokens per call |
|---|---|---|
| Input | $0.55 | 3,000 |
| Output | $2.19 | 6,000 |
Caching drops input cost from $0.55 to $0.14/MTok. For repeated system prompts, that saves $0.001229 per call.
Submit requests asynchronously and receive 0% off all token costs. This works best for offline pipelines where latency requirements are flexible.
| Monthly volume | Cost per call | Standard monthly | Cached monthly | You save with caching |
|---|---|---|---|---|
| 10,000 calls | $0.0148 | $147.9 | $135.61 | $12.29 |
| 50,000 calls | $0.0148 | $739.5 | $678.04 | $61.46 |
| 100,000 calls | $0.0148 | $1,479 | $1,356.08 | $122.92 |
| 500,000 calls | $0.0148 | $7,395 | $6,780.38 | $614.63 |
| 1,000,000 calls | $0.0148 | $14,790 | $13,560.75 | $1,229.25 |
Benchmark data for api generation is pending for DeepSeek R1. Test against your own evaluation suite before moving to production.
Benchmark data is not yet available for DeepSeek R1. We recommend testing against your own evaluation criteria.
5 models score 80+ on api generation benchmarks, sorted by input rate. Cheapest: Claude Haiku 4.5 (123% more, 72/100 quality).
| Model | Provider | Input $/MTok | Output $/MTok | Quality | Per call | vs DeepSeek |
|---|---|---|---|---|---|---|
| Claude Haiku 4.5 | Claude | $1.00 | $5.00 | 72/100 | $0.0330 | 123% more |
| Claude Opus 5.5 | Claude | $4.00 | $20.00 | 79/100 | $0.1320 | 792% more |
| Claude Opus 5 | Claude | $5.00 | $25.00 | 72/100 | $0.1650 | 1016% more |
| Claude Fable 5.1 | Claude | $10.00 | $50.00 | 74/100 | $0.3300 | 2131% more |
| Claude Fable 5 | Claude | $10.00 | $50.00 | 72/100 | $0.3300 | 2131% more |
Provider
DeepSeek
Tier
Mid-tier
Context
128K tokens
Released
Jan 2025
Prices are off-peak rates from api-docs.deepseek.com (read 2026-10-11). Peak-hour prices are 2x the listed input and output rates — Tokeven does not model time-of-day tiers; off-peak is used as the base. Cache hit: $0.14/MTok input. No batch discount published. Reasoning model: output includes chain-of-thought tokens. Not yet benchmarked, so never recommended.
| Model | Tier | Input $/MTok | Output $/MTok | Context |
|---|---|---|---|---|
| DeepSeek V3 | Mid-tier | $0.27 | $1.10 | 164K |
| DeepSeek Flash | Fast / Budget | $0.15 | $0.60 | 1M |
| DeepSeek V4 Pro | Flagship | $0.66 | $1.98 | 1M |
You can compare DeepSeek R1 head-to-head against any other model on our model comparison pages, or track how pricing has changed over time on the pricing history tracker.
See how DeepSeek R1 costs change across different workload types.
Code Generation
$0.009860/call
Unit Test Generation
$0.0126/call
SQL Generation
$0.003015/call
Code Refactoring
$0.0110/call
Code Review
$0.007130/call
PR Review
$0.0110/call
Security Review
$0.008775/call
Bug Detection
$0.007130/call
Document Summarization
$0.007690/call
PDF Summarization
$0.0115/call
Meeting Notes
$0.008780/call
Email Summarization
$0.002745/call
Chatbot
$0.003290/call
RAG Pipeline
$0.006585/call
Customer Support Bot
$0.003840/call
FAQ Bot
$0.002577/call
Data Extraction
$0.004390/call
JSON Extraction
$0.003402/call
Invoice Parsing
$0.002414/call
Resume Parsing
$0.003127/call
Chain of Thought
$0.0126/call
Legal Analysis
$0.0143/call
Math Reasoning
$0.007395/call
Financial Analysis
$0.0132/call
Content Moderation
$0.000494/call
Sentiment Analysis
$0.000494/call
Categorization
$0.000769/call
Intent Detection
$0.000384/call
Copywriting
$0.004655/call
Blog Writing
$0.0181/call
Marketing Copy
$0.007010/call
Product Descriptions
$0.003560/call
A typical api generation call using DeepSeek R1 costs about $0.0148 per call. This estimate uses 3,000 input tokens and 6,000 output tokens at standard rates. Standard rates are $0.55 per million input tokens and $2.19 per million output tokens.
Our benchmark data does not yet include a api generation ranking for DeepSeek R1. We recommend testing it against your own evaluation criteria before production usage.
The most affordable model for api generation above 80/100 quality is Claude Haiku 4.5. It comes from Claude at $1.00 per million input tokens. Output costs $5.00 per million tokens with a quality score of 72/100. Claude Haiku 4.5 costs more per call than DeepSeek R1 but scores higher on quality benchmarks for this task type.
Three strategies lower DeepSeek R1 costs for this task type effectively. Prompt caching gives a 75% discount on input tokens when reusing system prompts. The batch API gives 0% off all tokens for asynchronous processing workloads. Prompt optimization reduces token counts through more concise instructions and context windows. Combining caching with batching brings your cost from $0.0148 to about $0.003771 per call.
DeepSeek has 3 other models alongside DeepSeek R1 today: DeepSeek V3 at $0.27/$1.10 per million tokens (mid-tier), DeepSeek Flash at $0.15/$0.60 per million tokens (fast / budget), DeepSeek V4 Pro at $0.66/$1.98 per million tokens (flagship). The right choice depends on whether your api generation workload prioritizes quality, cost, or speed.
DeepSeek R1 supports a context window of 128K tokens per API call. This sets the maximum combined length of your input prompt and generated response. For api generation, typical calls use 3,000 input and 6,000 output tokens. That is well within this limit, leaving room for longer prompts or multi-turn conversations.
This calculator estimates costs based on published rates only. Connect your API usage to see where your money goes and which models drive your spend.