2026-11-06 06:55 UTC · deepseek/api-pricing · live page
Summary by fallback. It may be wrong; the diff below is what actually changed. Raw: f4362d7332-deepseek-api-pricing.diff · commit f4362d7332
diff --git a/snapshots/deepseek/api-pricing.md b/snapshots/deepseek/api-pricing.mdindex bab3923..a7a0ff4 100644--- a/snapshots/deepseek/api-pricing.md+++ b/snapshots/deepseek/api-pricing.md@@ -1,47 +1,42 @@ <!-- fineprint snapshot: deepseek/api-pricing | source: https://api-docs.deepseek.com/quick_start/pricing --> -# Models & Pricing--Model prices are listed in units of per 1M tokens. A token, the smallest unit of text that the model recognizes, can be a word, a number, or even a punctuation mark. We bill model usage based on the total number of input and output tokens by the model.--| MODEL | deepseek-flash(1) | deepseek-v4-pro | | |-|---|---|---|---|---|-| BASE URL (OpenAI Format) | https://api.deepseek.com | | | |-| BASE URL (Anthropic Format) | https://api.deepseek.com/anthropic | | | |-| MODEL VERSION | DeepSeek-V4.1-Flash-1017 | DeepSeek-V4-Pro-0813 | | |-| THINKING MODE | Supports both non-thinking and thinking (default) modes See Thinking Mode for how to switch | | | |-| CONTEXT LENGTH | 1M | | | |-| MAX OUTPUT | MAXIMUM: 384K | | | |-| FEATURES | Json Output | ✓ | ✓ | |-| Tool Calls | ✓ | ✓ | | |-| Responses API | ✓ | ✓ | | |-| Anthropic API | ✓ | ✓ | | |-| Chat Prefix Completion(Beta) | ✓ | ✓ | | |-| FIM Completion(Beta) | Non-thinking mode only | Non-thinking mode only | | |-| Vision | ✓ | Not supported | | |-| PRICING(2) | 1M INPUT TOKENS (CACHE HIT) | OFF-PEAK | $0.003 | $0.022 |-| PEAK | $0.006 | $0.044 | | |-| 1M INPUT TOKENS (CACHE MISS) | OFF-PEAK | $0.15 | $0.66 | |-| PEAK | $0.3 | $1.32 | | |-| 1M OUTPUT TOKENS | OFF-PEAK | $0.6 | $1.98 | |-| PEAK | $1.2 | $3.96 | | |-| Concurrency Limit(3) | 2500 | 500 | | |--(1) Use `deepseek-flash` as the model name. The legacy names `deepseek-v4-flash` and `deepseek-v4-flash-vision-exp` are still accepted, but the corresponding models have been retired, their requests are served by the DeepSeek-V4.1-Flash-1017 model and billed at the Flash price.--(2) Off-peak rates are half of the peak rates. Peak hours are 01:00 - 04:00 and 06:00 - 10:00 UTC, Monday through Friday, excluding Chinese public holidays. All other hours are off-peak, including weekends and Chinese public holidays in full.--(3) For more details on concurrency limits, please refer to Rate Limit & Isolation.--Search and Fetch are standalone APIs billed per request.--| API | Unit | Price |-|---|---|---|-| Search | Per 1,000 successful requests | $0.75 |-| Fetch | Per 1,000 successful requests | $0.75 |--See the Search & Fetch guide for API usage and complete billing rules.--For model usage, the expense = number of tokens × price. Search and Fetch are charged per successful request at the rates above. The corresponding fees will be directly deducted from your topped-up balance or granted balance, with a preference for using the granted balance first when both balances are available.--Product prices may vary and DeepSeek reserves the right to adjust them. We recommend topping up based on your actual usage and regularly checking this page for the most recent pricing information.+# Your First API Call++The DeepSeek API uses an API format compatible with OpenAI/Anthropic. By modifying the configuration, you can use the OpenAI/Anthropic SDK or softwares compatible with the OpenAI/Anthropic API to access the DeepSeek API.++| PARAM | VALUE |+|---|---|+| base_url (OpenAI) | `https://api.deepseek.com` |+| base_url (Anthropic) | `https://api.deepseek.com/anthropic` |+| api_key | apply for an API key |+| model | `deepseek-flash`(1) `deepseek-v4-pro` |++(1) Use `deepseek-flash` as the model name. It is now served by DeepSeek-V4.1-Flash-1017, and the calling method remains unchanged. The legacy names `deepseek-v4-flash` and `deepseek-v4-flash-vision-exp` are still accepted, but the corresponding models have been retired; their requests are served by DeepSeek-V4.1-Flash-1017 and billed at the Flash price.++DeepSeek Harness is now in developer preview for agent harness developers worldwide. See the DeepSeek Harness Guide for details.++The DeepSeek API is supported by many popular AI agent and coding assistant tools. If you use tools like Claude Code, GitHub Copilot, or OpenCode, you can use DeepSeek as the backend model directly — no code required.++See the Agent Integrations Guide for details.++Once you have obtained an API key, you can access the DeepSeek model using the following example scripts in the OpenAI API format. This is a non-stream example, you can set the `stream` parameter to `true` to get stream response.++For examples using the Anthropic API format, please refer to Anthropic API.++Before running these examples, set the `DEEPSEEK_API_KEY` environment variable in your terminal to your API key.++- curl+- python+- nodejs++```+curl https://api.deepseek.com/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ${DEEPSEEK_API_KEY}" \ -d '{ "model": "deepseek-flash", "messages": [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Hello!"} ], "thinking": {"type": "enabled"}, "reasoning_effort": "high", "stream": false }'+```++```+# Please install OpenAI SDK first: `pip3 install openai`import osfrom openai import OpenAIclient = OpenAI( api_key=os.environ.get('DEEPSEEK_API_KEY'), base_url="https://api.deepseek.com",)response = client.chat.completions.create( model="deepseek-flash", messages=[ {"role": "system", "content": "You are a helpful assistant"}, {"role": "user", "content": "Hello"}, ], stream=False, reasoning_effort="high", extra_body={"thinking": {"type": "enabled"}},)print(response.choices[0].message.content)+```++```+// Please install OpenAI SDK first: `npm install openai`import OpenAI from "openai";const openai = new OpenAI({ baseURL: 'https://api.deepseek.com', apiKey: process.env.DEEPSEEK_API_KEY,});async function main() { const completion = await openai.chat.completions.create({ messages: [{ role: "system", content: "You are a helpful assistant." }], model: "deepseek-flash", thinking: {"type": "enabled"}, reasoning_effort: "high", stream: false, }); console.log(completion.choices[0].message.content);}main();+```