DeepSeek API 新增完整应用套件和 Harness 开发者预览版

关键要点

  • DeepSeek API 现提供完整的应用套件,包括网络搜索、文件输入、URL 读取、模型安全、ASR 和 TTS,并兼容 OpenAI 和 Anthropic 格式。
  • DeepSeek-V4.1-Flash-1017 使用 deepseek-flash 模型名称,仍接受旧名称 deepseek-v4-flash 和 deepseek-v4-flash-vision-exp,并按 Flash 价格计费。
  • DeepSeek Harness 面向全球智能体开发者开放了开发者预览版,DeepSeek API 还可与 Claude Code、GitHub Copilot 和 OpenCode 集成,并作为这些工具的后端模型。

DeepSeek 现已提供完整的应用 API 套件,包括网络搜索、文件输入、URL 读取、模型安全、ASR 和 TTS。DeepSeek API 使用兼容 OpenAI 和 Anthropic 的格式,因此开发者只需更改配置,即可通过现有的 OpenAI 或 Anthropic SDK 及兼容软件调用其模型。

DeepSeek API 配置采用兼容 OpenAI 和 Anthropic 的端点

开发者将 OpenAI 格式的 base_url 设为 https://api.deepseek.com,将 Anthropic 格式的 base_url 设为 https://api.deepseek.com/anthropic。必须使用 API 密钥,可从 DeepSeek 平台的 API 密钥页面获取。文档列出了两个模型名称:deepseek-flash 和 deepseek-v4-pro。

deepseek-flash 现由 DeepSeek-V4.1-Flash-1017 提供服务

deepseek-flash 这个模型名称现由 DeepSeek-V4.1-Flash-1017 提供服务,调用方式保持不变。旧名称 deepseek-v4-flash 和 deepseek-v4-flash-vision-exp 仍可使用,但对应模型已停用。使用这些旧名称发出的请求将由 DeepSeek-V4.1-Flash-1017 提供服务,并按 Flash 价格计费。

DeepSeek Harness 面向 Agent Harness 开发者推出开发者预览版

DeepSeek Harness 现已面向全球 agent harness 开发者推出开发者预览版。详情见 DeepSeek Harness Guide,其中包含预览版快速入门指南。

DeepSeek API 支持 Claude Code、GitHub Copilot 和 OpenCode 作为后端模型

DeepSeek API 受到热门 AI Agent 和编码助手工具的支持。Claude Code、GitHub Copilot 或 OpenCode 用户无需编写代码,即可直接使用 DeepSeek 作为后端模型。设置详情见 Agent Integrations Guide。

DeepSeek Chat API 调用使用启用思考功能的 deepseek-flash

文档提供了 Chat API 的 OpenAI 格式示例脚本,涵盖 curl、Python 和 Node.js。示例向 chat/completions 端点发送请求,将模型设为 deepseek-flash,设置一条内容为 "You are a helpful assistant," 的系统消息和一条用户消息。示例将 thinking 设为 enabled,将 reasoning_effort 设为 high,并将 stream 设为 false。将 stream 设为 true 会返回流式响应。运行示例前,开发者需将 DEEPSEEK_API_KEY 环境变量设为自己的 API 密钥。Python 示例需要 OpenAI SDK,可通过 pip3 install openai 安装;Node.js 示例需要 OpenAI SDK,可通过 npm install openai 安装。Anthropic API 格式的示例见单独的 Anthropic API guide。

DeepSeek API 端点、模型和请求参数

  • OpenAI 格式的 base_url:https://api.deepseek.com
  • Anthropic 格式的 base_url:https://api.deepseek.com/anthropic
  • 可用模型名称:deepseek-flash 和 deepseek-v4-pro
  • deepseek-flash 由 DeepSeek-V4.1-Flash-1017 提供服务,并按 Flash 价格计费
  • 旧名称 deepseek-v4-flash 和 deepseek-v4-flash-vision-exp 仍可使用,但对应模型已停用
  • Chat API 请求示例将 thinking 设为 enabled,将 reasoning_effort 设为 high,并将 stream 设为 false
  • API 密钥从 DEEPSEEK_API_KEY 环境变量读取
  • 完整的应用 API 套件包括网络搜索、文件输入、URL 读取、模型安全、ASR 和 TTS

常见问题

DeepSeek API 使用哪些基础 URL?

DeepSeek API 使用 https://api.deepseek.com 作为 OpenAI 格式的 base_url,使用 https://api.deepseek.com/anthropic 作为 Anthropic 格式的 base_url。

DeepSeek-V4.1-Flash-1017 提供哪个模型?

deepseek-flash 这个模型名称现由 DeepSeek-V4.1-Flash-1017 提供服务,调用方式保持不变。使用旧名称 deepseek-v4-flash 和 deepseek-v4-flash-vision-exp 发出的请求也由 DeepSeek-V4.1-Flash-1017 提供服务,并按 Flash 价格计费,但对应模型已停用。

DeepSeek Harness 是什么?

DeepSeek Harness 现已面向全球 agent harness 开发者推出开发者预览版。详情见 DeepSeek Harness Guide。

免责声明:本页面信息可能来自第三方,仅供参考,不代表 Gate 的观点或意见,亦不构成任何财务、投资或法律建议。数字资产交易风险较高,请勿仅依赖本页面信息作出决策。具体内容详见声明。
评论
0/400
暂无评论