Skip to content
HN On Hacker News ↗

Your First API Call | DeepSeek API Docs

▲ 2091 points 1607 comments by impact_sy 2mo ago HN discussion ↗

Pangram verdict · v3.3

We believe that this document is fully human-written

1 %

AI likelihood · overall

Human
100% human-written 0% AI-generated
SEGMENTS · HUMAN 1 of 1
SEGMENTS · AI 0 of 1
WORD COUNT 164
PEAK AI % 1% · §1
Analyzed
Apr 24
backend: pangram/v3.3
Segments scanned
1 windows
avg 164 words each
Distribution
100 / 0%
human / AI fraction
Verdict
Human
Pangram v3.3

Article text · 164 words · 1 segments analyzed

Human AI-generated
§1 Human · 1%

The DeepSeek API uses an API format compatible with OpenAI/Anthropic. By modifying the configuration, you can use the OpenAI/Anthropic SDK or softwares compatible with the OpenAI/Anthropic API to access the DeepSeek API.PARAMVALUEbase_url (OpenAI)https://api.deepseek.combase_url (Anthropic)https://api.deepseek.com/anthropicapi_keyapply for an API keymodel*deepseek-v4-flashdeepseek-v4-prodeepseek-chat (to be deprecated on 2026/07/24)deepseek-reasoner (to be deprecated on 2026/07/24)* The model names deepseek-chat and deepseek-reasoner will be deprecated on 2026/07/24. For compatibility, they correspond to the non-thinking mode and thinking mode of deepseek-v4-flash, respectively.Invoke The Chat API​Once you have obtained an API key, you can access the DeepSeek model using the following example scripts in the OpenAI API format. This is a non-stream example, you can set the stream parameter to true to get stream response.For examples using the Anthropic API format, please refer to Anthropic API.curlpythonnodejscurl https://api.deepseek.com/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ${DEEPSEEK_API_KEY}" \ -d '{ "model": "deepseek-v4-pro", "messages": [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Hello!"} ], "thinking": {"type": "enabled"}, "reasoning_effort": "high", "stream": false }'