DeepSeek v4

Published: (April 23, 2026 at 11:01 PM EDT)
1 min read

Source: Hacker News

The DeepSeek API uses a format compatible with OpenAI and Anthropic. By adjusting the configuration, you can use the OpenAI/Anthropic SDKs or any software that works with their APIs to access DeepSeek.

Configuration

  • Base URL (OpenAI): https://api.deepseek.com
  • Base URL (Anthropic): https://api.deepseek.com/anthropic
  • API Key: Apply for an API key

Model options

  • deepseek-v4-flash
  • deepseek-v4-pro
  • deepseek-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 an API key, you can call the DeepSeek model using the OpenAI API format. The example below shows a non‑stream request; set "stream": true to receive a streaming response.

For Anthropic‑style requests, see the Anthropic API guide.

curl 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
      }'
0 views
Back to Blog

Related posts

Read more »