DeepSeek V4 Pro (DeepSeek API)

DeepSeek API model DeepSeek V4 Pro through the provider-managed global endpoint.

Provider: All DeepSeek models | DeepSeek API

API Endpoint

https://api.deepseek.com/chat/completions

Quick Start (Python)

Install: pip install openai

from openai import OpenAI

client = OpenAI(
    api_key="your-deepseek-api-key",
    base_url="https://api.deepseek.com",
)

response = client.chat.completions.create(
    model="deepseek-v4-pro",
    messages=[
        {"role": "user", "content": "Hello, how are you?"},
    ],
    max_tokens=1024,
    reasoning_effort="high",
    extra_body={"thinking": {"type": "enabled"}},
)

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

Additional examples: Basic invoke, Streaming

Supported Parameters

ParameterTypeDescription
max_tokensintegerMaximum tokens to generate. (1–384000)
streambooleanStream response chunks as they are generated. Default: false.
thinking.typeenumEnable or disable thinking mode. Default: enabled.
reasoning_effortenumThinking effort when thinking mode is enabled. Default: high.

Feature Guides

Thinking Mode

DeepSeek models support provider-managed thinking mode with high and max effort controls.

Documentation

OpenAI Compatibility

Use OpenAI-compatible client libraries by changing the API base URL.

Documentation