curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-chat",
"messages": [
{
"role": "user",
"content": "请介绍一下你自己"
}
]
}
'{
"id": "930c60df-bf64-41c9-a88e-3ec75f81e00e",
"model": "deepseek-chat",
"object": "chat.completion",
"created": 1770617860,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "你好!我是 DeepSeek,一个强大的 AI 助手。我擅长通用对话、代码生成、数学推理等多种任务。",
"reasoning_content": "让我来分析这个问题...",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 16,
"completion_tokens": 10,
"total_tokens": 26,
"prompt_cache_hit_tokens": 0,
"prompt_cache_miss_tokens": 16
},
"system_fingerprint": "fp_eaab8d114b_prod0820_fp8_kvcache"
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error"
}
}{
"error": {
"code": 403,
"message": "Access denied for this model",
"type": "permission_error",
"param": "model"
}
}{
"error": {
"code": 404,
"message": "Specified model not found",
"type": "not_found_error",
"param": "model"
}
}{
"error": {
"code": 413,
"message": "Request body too large",
"type": "request_too_large_error",
"param": "messages"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error"
}
}DeepSeek - 完整参数文档
- 使用 OpenAI SDK 格式调用 DeepSeek 模型
- 同步处理模式,实时返回对话内容
- 支持
deepseek-chat(通用对话)和deepseek-reasoner(深度推理)两个模型 - 纯文本对话:单轮或多轮上下文对话
- 系统提示词:自定义 AI 的角色和行为
- 流式输出:支持 SSE 流式返回
- 工具调用:支持 Function Calling
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-chat",
"messages": [
{
"role": "user",
"content": "请介绍一下你自己"
}
]
}
'{
"id": "930c60df-bf64-41c9-a88e-3ec75f81e00e",
"model": "deepseek-chat",
"object": "chat.completion",
"created": 1770617860,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "你好!我是 DeepSeek,一个强大的 AI 助手。我擅长通用对话、代码生成、数学推理等多种任务。",
"reasoning_content": "让我来分析这个问题...",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 16,
"completion_tokens": 10,
"total_tokens": 26,
"prompt_cache_hit_tokens": 0,
"prompt_cache_miss_tokens": 16
},
"system_fingerprint": "fp_eaab8d114b_prod0820_fp8_kvcache"
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error"
}
}{
"error": {
"code": 403,
"message": "Access denied for this model",
"type": "permission_error",
"param": "model"
}
}{
"error": {
"code": 404,
"message": "Specified model not found",
"type": "not_found_error",
"param": "model"
}
}{
"error": {
"code": 413,
"message": "Request body too large",
"type": "request_too_large_error",
"param": "messages"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error"
}
}https://direct.evolink.ai,对文本模型支持更好,支持长连接;https://api.evolink.ai 是多模态主力地址,对文本模型作为备用地址使用。授权
##所有接口均需要使用Bearer Token进行认证##
获取 API Key:
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
对话模型名称
deepseek-chat:通用对话模型deepseek-reasoner:深度推理模型,擅长数学、编程和复杂逻辑推理
注意:deepseek-reasoner 不支持 temperature、top_p、tools、tool_choice、response_format 参数,传入会被上游拒绝
deepseek-chat, deepseek-reasoner "deepseek-chat"
对话消息列表,支持多轮对话
不同角色的消息具有不同的字段结构,请选择对应角色查看
1- System Message
- User Message
- Assistant Message
- Tool Message
Show child attributes
Show child attributes
思考模式控制(Beta)
说明:
- 用于控制
deepseek-reasoner模型的深度思考功能 - 启用后模型会在回复前进行深度推理
Show child attributes
Show child attributes
频率惩罚参数,用于减少重复内容
说明:
- 正值会根据 token 在已生成文本中出现的频率进行惩罚
- 值越大,越不容易重复已出现的内容
- 默认值: 0(不惩罚)
-2 <= x <= 20
限制生成内容的最大 token 数量
说明:
- 设置后模型会在达到该数量时停止生成
- 不设置则由模型自行决定生成长度
x >= 14096
存在惩罚参数,用于鼓励生成新话题
说明:
- 正值会根据 token 是否已在文本中出现过进行惩罚
- 值越大,越倾向于讨论新话题
- 默认值: 0(不惩罚)
-2 <= x <= 20
指定响应格式
说明:
- 设置为
{"type": "json_object"}可启用 JSON 模式 - JSON 模式下模型会输出合法的 JSON 格式内容
Show child attributes
Show child attributes
停止序列,模型遇到这些字符串时会停止生成
说明:
- 可以是单个字符串或字符串数组
- 最多支持 16 个停止序列
是否以流式方式返回响应
true: 流式返回,通过 SSE(Server-Sent Events)逐块实时返回内容false: 等待完整响应后一次性返回
false
流式响应选项
仅在 stream=true 时有效
Show child attributes
Show child attributes
采样温度,控制输出的随机性
说明:
- 较低值(如 0.2): 更确定、更聚焦的输出
- 较高值(如 1.5): 更随机、更有创意的输出
- 默认值: 1
0 <= x <= 21
核采样(Nucleus Sampling)参数
说明:
- 控制从累积概率前多少的token中采样
- 例如 0.9 表示从累积概率达到90%的token中选择
- 默认值: 1.0(考虑所有token)
建议: 不要同时调整 temperature 和 top_p
0 <= x <= 11
工具定义列表,用于 Function Calling
说明:
- 最多支持 128 个工具定义
- 每个工具需要定义名称、描述和参数 schema
128Show child attributes
Show child attributes
控制工具调用行为
可选值:
none:不调用任何工具auto:模型自动决定是否调用工具required:强制模型调用一个或多个工具
默认值:未提供 tools 时为 none,提供 tools 时为 auto
none, auto, required 是否返回 token 的对数概率
说明:
- 设置为
true时,响应中会包含每个 token 的对数概率信息
返回概率最高的前 N 个 token 的对数概率
说明:
- 需要
logprobs设置为true - 取值范围:
[0, 20]
0 <= x <= 20响应
对话生成成功
对话完成的唯一标识符
"930c60df-bf64-41c9-a88e-3ec75f81e00e"
实际使用的模型名称
"deepseek-chat"
响应类型
chat.completion "chat.completion"
创建时间戳
1770617860
对话生成的选择列表
Show child attributes
Show child attributes
Token 使用统计信息
Show child attributes
Show child attributes
系统指纹标识
"fp_eaab8d114b_prod0820_fp8_kvcache"