
您打开了DeepSeek,看到了一个看起来像其他AI助手的聊天框,然后注意到了像`deepseek-v4-pro`这样的模型名称、“DeepThink”切换按钮,以及一个充满token成本表的API页面。您实际上从哪里开始呢?本DeepSeek入门指南将帮助您穿越菜单。我在生产中使用V4-Pro和V4-Flash,之前使用过V3.2和R1,我将向您展示每个表面(网页聊天、移动应用、API)实际上做什么,它的成本是多少,以及您第一次任务应该选择哪个模型。结束时,您将在聊天中发送一条真实消息,评估定价,如果您愿意,还可以用Python进行第一次API调用。一杯咖啡的时间。让我们开始吧!
What DeepSeek is, in one paragraph

DeepSeek是一家中国AI实验室(成立于2023年,位于杭州,与对冲基金High-Flyer有关联),它构建大型语言模型,并将它们作为Hugging Face上的开源权重以及托管聊天和API进行发布。当前一代是 DeepSeek V4于2026年4月24日发布,提供两种开放式专家混合模型: deepseek-v4-pro (1.6T total / 49B active parameters, frontier tier) and deepseek-v4-flash (284B / 13B活跃,成本效益级别)。两者都采用MIT许可,并共享一个1,000,000-token的上下文窗口,输出最多384,000个token。如果您想了解更多关于该公司的信息,请参阅 what is DeepSeek.
你实际上会用到的DeepSeek的三个方法
大多数初学者将“DeepSeek”与聊天网站混淆。实际上有三个不同的表面,它们的行为不同:
| Surface | 适用对象 | State | Cost |
|---|---|---|---|
| Web chat (chat.deepseek.com) | 任何拥有浏览器的用户 | 每次对话保留历史记录 | 编写时免费 |
| 移动应用程序(iOS、Android) | 手机用户 | 每次对话保留历史记录 | 编写时免费 |
API (api.deepseek.com) |
Developers | 无状态 ——每次通话都需要重新发送历史记录 | Pay per token |
重要细节:初学者容易忽略的: API is stateless。网页聊天和应用程序会记住您在对话中之前说过的话;API不会。如果您在API上构建某些内容,您的代码必须在每次请求中重新发送完整的消息历史。更多内容将在下面介绍。
第1步:尝试聊天(5分钟,免费)
感知V4最简单的方式是使用托管聊天。访问chat.deepseek.com,使用电子邮件或Google账户注册,您将进入一个默认显示聊天页面的界面。 DeepSeek V4. 有一个值得了解的切换选项: DeepThink打开它告诉V4在回答之前逐步推理——速度较慢,但在数学、代码和多步骤问题上表现更好。默认情况下是关闭的。操作演示和截图如下: how to use DeepSeek.
我推荐的一个初始提示,因为它强调了两种模式:
“I have a CSV with 12 months of revenue and cost data per region. Suggest three exploratory analyses and the Python (pandas) code for each. Then list two pitfalls in interpreting the results.”
先关闭DeepThink运行一次,然后再开启DeepThink运行一次。您会看到开启模式会产生更长、更结构化的计划,并附带注意事项。这就是您在API中稍后通过[3]做出的相同权衡。 reasoning_effort 参数。
第2步:选择一个模型(V4-Pro 与 V4-Flash)
对于聊天用户,这会自动发生。对于API用户来说,这是您将做出的最重要的决定,因为输出成本相差约12倍。
| Model | Total / active params | Best for | 输出/1M个令牌 |
|---|---|---|---|
deepseek-v4-flash |
284B / 13B | 默认聊天、总结、分类、RAG | $0.28 |
deepseek-v4-pro |
1.6T / 49B | 边缘编码、复杂代理、最困难的推理任务 | $0.87 promo / $3.48 list |
从V4-Flash开始。只有在Flash上特定任务失败且性能提升足以证明开销时,才转向V4-Pro。对于更深入的优缺点分析,请参阅[5]的专用页面。 DeepSeek V4-Flash and DeepSeek V4-Pro,或浏览 DeepSeek models hub 查看完整产品系列。
那么,旧款产品呢? deepseek-chat and deepseek-reasoner ID是什么?
如果您看到过引用 deepseek-chat or deepseek-reasoner的教程,那些是V3时代遗留的模型ID。它们仍然有效——目前分别路由到 deepseek-v4-flash (非思考模式和思考模式)——但它们将被 retired on 2026-07-24 at 15:59 UTC。迁移只需一行代码:保持 base_url, just update model。如果您在生产中维护任何内容,请现在就做这个操作。
第3步:在花费一美元之前了解定价
DeepSeek按请求计费三个桶。忘记其中的任何一个是我看到初学者最常见的成本估算错误。
| Bucket | V4-Flash $/1M | V4-Pro $/1M |
|---|---|---|
| Input — cache hit | $0.0028 | $0.0145 |
| Input — cache miss | $0.14 | $0.435 promo / $1.74 list |
| Output | $0.28 | $0.87 promo / $3.48 list |
截至2026年4月的数据;请在实时环境中核实 DeepSeek API pricing 在提交前翻页。请注意,一些较旧的博客文章中提到的夜间非高峰时段折扣已于2025年9月5日停止,并且尚未恢复。
工作示例 — V4-Flash,100万次调用
2,000个token的系统提示(跨调用缓存),200个token的用户消息(每个调用不缓存),300个token的回复:
- Cached input: 2,000 × 1,000,000 = 2,000,000,000 tokens × $0.0028/M = $5.60
- Uncached input: 200 × 1,000,000 = 200,000,000 tokens × $0.14/M = $28.00
- Output: 300 × 1,000,000 = 300,000,000 tokens × $0.28/M = $84.00
- Total: $117.60
在V4-Pro上执行相同的工作负载将 $1,421.00 — 大约多10倍。这就是当你选择前沿级别时所进行的交易。对于交互式假设估计,该 DeepSeek pricing calculator 为您处理三个桶。
第4步:您的第一个API调用(Python)
DeepSeek API与OpenAI兼容。这意味着官方OpenAI Python SDK通过仅更改 base_url and api_key. Chat requests hit POST /chat/completions,与OpenAI兼容的端点。(如果更喜欢该SDK,DeepSeek还通过相同的基URL暴露了与Anthropic兼容的表面。)
首先,获取一个密钥——参见 get a DeepSeek API key 以了解逐点点击操作。然后安装SDK:
pip install openai
最简单的Python脚本:
from openai import OpenAI
client = OpenAI(
base_url="https://api.deepseek.com",
api_key="YOUR_DEEPSEEK_API_KEY",
)
resp = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Explain MoE in two sentences."},
],
temperature=1.3,
max_tokens=256,
)
print(resp.choices[0].message.content)
就这样。要开启思考模式(V4返回 reasoning_content alongside the final content), 添加两个参数:
resp = client.chat.completions.create(
model="deepseek-v4-pro",
messages=[{"role": "user", "content": "Plan a 3-step database migration."}],
reasoning_effort="high",
extra_body={"thinking": {"type": "enabled"}},
)
print(resp.choices[0].message.reasoning_content)
print(resp.choices[0].message.content)
Use reasoning_effort="max" 对于最困难的问题;您将需要 max_tokens 头部空间(高达384K)以处理长轨迹。完整的参数引用和更多示例请参阅 DeepSeek API documentation.
值得记忆的默认温度值
- 0.0 —— 代码生成,数学
- 1.0 —— 数据分析,数据清洗
- 1.3 —— 一般对话,翻译
- 1.5 —— 创意写作,诗歌
第5步:了解V4能做什么和不能做什么
V4在编码方面表现强劲(DeepSeek在发布时报告V4-Pro在SWE-Bench验证上的得分为80.6%——见 官方DeepSeek API文档 (当前技术报告链接),多语言推理,长上下文分析,以及工具调用。它在实时信息方面较弱(API中未内置网页浏览),并且图像生成不是V4聊天模型的一部分——它存在于单独的版本中,如 DeepSeek Janus. 实诚的边缘问题列表: DeepSeek limitations.
初学者常见陷阱 — 以及解决方案

| 陷阱 | Fix |
|---|---|
| “My API costs are 5× what I expected” | 您忘记了未缓存的输入桶。每个新用户消息都是对缓存前缀的缓存未命中。 |
| “My multi-turn chatbot forgot the last message” | 该API是无状态的。每次调用时重发完整数组。 messages 在您的提示中包含单词“json”以及一个简例模式,并提升。 |
| “JSON mode returned empty content” | JSON模式旨在返回有效的JSON,但不保证。 max_tokens“教程使用”。 |
构建聊天机器人或内容工具?→ deepseek-chat — should I?” |
Use deepseek-v4-flash 与您已使用的工具进行比较?→ |
Where to go next
您现在已了解表面、两个V4层级、三个定价桶以及如何发送第一个请求。选择与您构建内容相匹配的路径:
- 想在自己的GPU上运行权重?→ DeepSeek prompt engineering
- 准备深入探索?→ DeepSeek vs ChatGPT
- DeepSeek高级指南 install DeepSeek locally
- DeepSeek对初学者免费吗? DeepSeek advanced guide or browse all DeepSeek beginner guides
DeepSeek AI Guide is an independent resource and is not affiliated with DeepSeek or its parent company. Model IDs, pricing and API behaviour change; check the official DeepSeek documentation and pricing page before committing to a production decision.
Is DeepSeek free for beginners?
截至撰写本文时,DeepSeek网页聊天(chat.deepseek.com)和官方移动应用免费使用,可通过电子邮件或谷歌账户注册。API是付费的,按令牌计费,最便宜的层级(V4-Flash)起价为每百万输入令牌(缓存未命中)0.14美元,每百万输出令牌0.28美元。DeepSeek可能提供已授予的余额——一小笔可能过期的促销信用额,因此请检查计费控制台以获取当前优惠。更多详情: is DeepSeek free.
DeepSeek V4-Pro和V4-Flash的区别是什么?
V4-Pro是前沿层级(总容量1.6T / 活跃参数49B),针对最困难的编码、代理和推理任务。V4-Flash是成本效益层级(284B / 13B活跃),是聊天、摘要、分类和RAG的正确默认选项。两者共享相同的1M令牌上下文窗口和功能集;输出成本差距大约是10-12倍。并排比较: DeepSeek V4.
我该如何进行第一次DeepSeek API调用?
使用以下命令安装OpenAI Python SDK: pip install openai,然后将其指向 base_url="https://api.deepseek.com" 并使用您的DeepSeek API密钥。调用 client.chat.completions.create(model="deepseek-v4-flash", messages=[...]) against POST /chat/completions。这就是整个集成过程;OpenAI SDK的代码路径保持不变。步骤如下: DeepSeek API getting started.
DeepSeek会记住我的对话历史吗?
网页聊天和移动应用会按会话保存对话历史——您可以滚动查看过去的聊天记录。API不会保存。API是无状态的,这意味着您的客户端代码必须重新发送完整的内容。 messages 在每次请求时都会开启系统、用户和助手角色以维持上下文。这是聊天界面和开发者界面之间最大的区别。定价影响: DeepSeek context caching.
我能在自己的机器上离线运行DeepSeek吗?
是的——V4-Pro、V4-Flash、V3.2、V3.1和R1在Hugging Face上以MIT许可证发布权重,因此您可以自行托管。实际上,V4-Pro和V4-Flash是大型MoE模型,需要大量的GPU内存;大多数初学者从较小的蒸馏选项如 DeepSeek R1 Distill 或者通过Ollama进行推理。硬件配置和操作流程: running DeepSeek on Ollama.
Sources & Methodology
Primary sources
- OfficialDeepSeek API documentationEndpoints, request/response shape, model IDsLast checked: April 30, 2026
- PricingDeepSeek API pricing pagePer-1M-token rates, billing units, cache-hit pricingLast checked: April 30, 2026
- Model cardDeepSeek on Hugging FaceWeights, license, usage notes per modelLast checked: April 30, 2026
- OfficialDeepSeek official API documentation端点、模型ID和行为的标准参考Last checked: April 30, 2026
Technical references
- Technical reportDeepSeek-V3 technical report (arXiv:2412.19437)V3 architecture and training methodologyLast checked: April 30, 2026
- Technical reportDeepSeek-R1 paper (arXiv:2501.12948)R1 reasoning approach, distillation resultsLast checked: April 30, 2026
Methodology
Information in this article was checked against the official DeepSeek documentation, the article's cited primary sources, and the deepseekai.guide pricing dataset on the date shown above. Where third-party numbers are quoted, the originating source is linked inline so the reader can verify and re-check.
Data confidence
High for facts cited inline with primary-source links; medium for context narrative.
Editorial note
AI tooling moves quickly. If you spot an outdated number or a broken link, the contact link in the footer is the fastest way to flag it for the editorial team.