Choose a model for the work you need to doMe
Official APIChinaVersion 1
Writing, coding, and reasoning through the original chat API.
Writing & chatCoding
API BASE URL
https://api.deepseek.comActual API model ID
deepseek-flashRequest method / path
POST /chat/completionsAuthentication
Authorization: Bearer $API_KEYEdit request parameters
Edit JSON within the verified parameter ranges. Copy and export stop if types, required fields, or enum values are invalid.
# 先在当前终端设置环境变量:API_KEY
# 下面只创建请求文件,不执行文本中的任何命令。
cat > request.json <<'MODEL_ATLAS_REQUEST'
{
"model": "deepseek-flash",
"stream": false,
"messages": [
{
"role": "user",
"content": "请用中文介绍你可以帮助我完成哪些任务。"
}
]
}
MODEL_ATLAS_REQUEST
# 替换 request.json 内的用户占位符后再运行请求。
curl --fail-with-body --request POST "https://api.deepseek.com/chat/completions" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${API_KEY}" \
--data-binary @request.json
