- 第三方接口
- 平台接口
- DocBot
- 写文档测试用
- 文档中心接口
- 活链服务
- 公司接口
- github接口
- 钉钉接口
- 飞书
- AI接口
- 阿里云接口
- 百度云API
- 百川智能
- 免key接口
- 免key接口 Copy
- 文档脚本
- 云函数
- 文档桥接项目
- IP查询
- 本地脚本
- 泡泡文档
- 扣子
- 泡泡机器人
- 扣子接口
- dify接口
deepseek
开发中
POST
https://api.deepseek.com/chat/completions
请求参数
Header 参数
Content-Type
string
必需
示例值:
application/json
Authorization
string
必需
示例值:
Bearer sk-c5e84abd1a7c4f2fb6fa5b6d314552ec
Body 参数application/json
model
string
必需
messages
array [object {2}]
必需
role
string
必需
content
string
必需
stream
boolean
必需
示例
{
"model": "deepseek-chat",
"messages": [
{
"role": "system",
"content": "你是一个AI助手,你的每次流式回复最多只能包含两个字符"
},
{
"role": "user",
"content": "你叫什么名字。"
}
],
"stream": true
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.deepseek.com/chat/completions' \
--header 'Authorization: Bearer sk-c5e84abd1a7c4f2fb6fa5b6d314552ec' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "deepseek-chat",
"messages": [
{"role": "system", "content": "你是一个AI助手,你的每次流式回复最多只能包含两个字符"},
{"role": "user", "content": "你叫什么名字。"}
],
"stream": true
}'
返回响应
🟢200成功
application/json
Body
id
string
必需
object
string
必需
created
integer
必需
model
string
必需
choices
array [object {4}]
必需
index
integer
可选
message
object
可选
logprobs
null
可选
finish_reason
string
可选
usage
object
必需
prompt_tokens
integer
必需
completion_tokens
integer
必需
total_tokens
integer
必需
prompt_tokens_details
object
必需
prompt_cache_hit_tokens
integer
必需
prompt_cache_miss_tokens
integer
必需
system_fingerprint
string
必需
示例
{
"id": "string",
"object": "string",
"created": 0,
"model": "string",
"choices": [
{
"index": 0,
"message": {
"role": "string",
"content": "string"
},
"logprobs": null,
"finish_reason": "string"
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0,
"prompt_tokens_details": {
"cached_tokens": 0
},
"prompt_cache_hit_tokens": 0,
"prompt_cache_miss_tokens": 0
},
"system_fingerprint": "string"
}