DeepSeek-V4-Pro-0813 Publish

dares25732 pts0 comments

Your First API Call | DeepSeek API Docs

Skip to main content

On this page<br>Your First API Call

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(1)deepseek-v4-flash<br>deepseek-v4-pro<br>(1) The deepseek-v4-flash model has been updated to DeepSeek-V4-Flash-0731, and the deepseek-v4-pro model has been updated to DeepSeek-V4-Pro-0813. The calling method remains unchanged — simply use deepseek-v4-flash or deepseek-v4-pro to access the latest version.

Integrate with Agent Tools​

The DeepSeek API is supported by many popular AI agent and coding assistant tools. If you use tools like Claude Code, GitHub Copilot, or OpenCode, you can use DeepSeek as the backend model directly — no code required.

See the Agent Integrations Guide for details.

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.

curl<br>python<br>nodejs<br>curl https://api.deepseek.com/chat/completions \<br>-H "Content-Type: application/json" \<br>-H "Authorization: Bearer ${DEEPSEEK_API_KEY}" \<br>-d '{<br>"model": "deepseek-v4-pro",<br>"messages": [<br>{"role": "system", "content": "You are a helpful assistant."},<br>{"role": "user", "content": "Hello!"}<br>],<br>"thinking": {"type": "enabled"},<br>"reasoning_effort": "high",<br>"stream": false<br>}'

# Please install OpenAI SDK first: `pip3 install openai`<br>import os<br>from openai import OpenAI

client = OpenAI(<br>api_key=os.environ.get('DEEPSEEK_API_KEY'),<br>base_url="https://api.deepseek.com")

response = client.chat.completions.create(<br>model="deepseek-v4-pro",<br>messages=[<br>{"role": "system", "content": "You are a helpful assistant"},<br>{"role": "user", "content": "Hello"},<br>],<br>stream=False,<br>reasoning_effort="high",<br>extra_body={"thinking": {"type": "enabled"}}

print(response.choices[0].message.content)

// Please install OpenAI SDK first: `npm install openai`

import OpenAI from "openai";

const openai = new OpenAI({<br>baseURL: 'https://api.deepseek.com',<br>apiKey: process.env.DEEPSEEK_API_KEY,<br>});

async function main() {<br>const completion = await openai.chat.completions.create({<br>messages: [{ role: "system", content: "You are a helpful assistant." }],<br>model: "deepseek-v4-pro",<br>thinking: {"type": "enabled"},<br>reasoning_effort: "high",<br>stream: false,<br>});

console.log(completion.choices[0].message.content);

main();

Integrate with Agent Tools<br>Invoke The Chat API

deepseek openai content model anthropic stream

Related Articles