Skip to main content
POST
BaseURL 说明:默认 BaseURL 为 https://direct.evolink.ai,对文本模型支持更好,支持长连接;https://api.evolink.ai 是多模态主力地址,对文本模型作为备用地址使用。

授权

Authorization
string
header
必填

##所有接口均需要使用 Bearer Token 进行认证##

获取 API Key

访问 API Key 管理页面 获取您的 API Key

使用时在请求头中添加

请求体

application/json
model
enum<string>
默认值:deepseek-v4-flash
必填

模型 ID

  • deepseek-v4-flash:快速通用,适合日常对话、摘要、抽取
  • deepseek-v4-pro:深度推理,适合复杂数学、代码与多步规划
可用选项:
deepseek-v4-flash,
deepseek-v4-pro
示例:

"deepseek-v4-flash"

input

模型输入。inputinstructions 至少提供一个。

  • 字符串形态:整段文本按一条 user 消息处理
  • 数组形态:输入项列表,支持 messagefunction_callfunction_call_outputreasoningweb_search_call 五种类型

多轮对话:接口无状态,续接对话必须把完整历史放进数组。

示例:

"用一句话介绍杭州。"

instructions
string

系统级指令,等价于插入在最前面的一条 system 消息,用于设定角色、语气与输出约束。

示例:

"你是一位严谨的技术文档工程师,回答保持简洁。"

stream
boolean
默认值:false

是否流式返回

  • false(默认):一次性返回完整响应对象
  • true:以语义化 SSE 事件推送,末尾事件为 response.completed / response.incomplete / response.failed不会发送 [DONE]
示例:

false

max_output_tokens
integer

本次生成的最大输出 token 数(含思考 token)。取值范围 1 ~ 393216(384K)。留空则由模型自行决定。

必填范围: 1 <= x <= 393216
示例:

4096

temperature
number
默认值:1

采样温度,越高输出越随机。思考模式下不生效。

必填范围: 0 <= x <= 2
示例:

1

top_p
number
默认值:1

核采样阈值,与 temperature 建议只调其一。思考模式下不生效。

必填范围: x <= 1
示例:

1

top_logprobs
integer

返回每个位置概率最高的若干候选 token 及其对数概率。

必填范围: 0 <= x <= 20
示例:

0

reasoning
object

思考模式配置。DeepSeek V4 默认开启思考,思考内容以 reasoning 输出项返回,其 token 计入输出并按输出价计费。

text
object

文本输出格式配置。

tools
工具定义 · object[]

可供模型调用的工具列表。函数工具由客户端执行并把结果以 function_call_output 回传;web_search 由服务端直接执行,无需客户端参与。

tool_choice

工具调用策略

  • none:禁止调用工具
  • auto(默认):由模型决定
  • required:必须至少调用一个工具
  • {"type": "function", "name": "get_weather"}:强制调用指定函数
  • {"type": "web_search"}:强制执行联网搜索
示例:

"auto"

响应

生成成功

Responses 接口的响应对象。

id
string

本次响应的唯一标识

示例:

"resp_9f2c1a4b8e7d"

object
string

对象类型,固定为 response

示例:

"response"

created_at
integer

创建时间,Unix 时间戳(秒)

示例:

1755000000

status
enum<string>

响应状态

  • completed:正常完成
  • in_progress:生成中
  • incomplete:因长度等原因被截断,详见 incomplete_details
  • failed:生成失败,详见 error
可用选项:
in_progress,
completed,
incomplete,
failed
示例:

"completed"

model
string

实际生成本次响应的模型 ID

示例:

"deepseek-v4-flash"

output
object[]

输出项列表,按生成顺序排列。各类型的字段:

  • reasoning:思考过程,含 idstatuscontentreasoning_text 块列表)、summary
  • message:最终回答,含 idstatusrolecontentoutput_text 块列表)
  • function_call:模型发起的函数调用,含 idstatuscall_idnamearguments,需客户端执行后以 function_call_output 回传
  • web_search_call:服务端执行的联网搜索记录,含 idstatusaction(描述本次搜索动作)
error
object | null

失败原因,成功时为 null

incomplete_details
object | null

截断原因,未截断时为 null

usage
object

Token 使用统计信息(含缓存与推理分项)