Skip to main content
DeepSeek provides endpoints for large language models. See their library of models here. We recommend experimenting to find the best-suited model for your use-case. Here are some general recommendations:
  • deepseek-v4-flash (default): fast V4 model, 1M context. Hybrid thinking + non-thinking.
  • deepseek-v4-pro: flagship V4 model, 1M context. Hybrid thinking + non-thinking.
DeepSeek does not have rate limits. See their docs for information about how to deal with slower responses during high traffic.

Installation

Authentication

Set your DEEPSEEK_API_KEY environment variable. Get your key from here.

Example

Use DeepSeek with your Agent:
View more examples here.

Parameters

DeepSeek extends the OpenAI-compatible interface and supports most parameters from the OpenAI model. Note: DeepSeek supports JSON mode but not native json_schema structured outputs, so supports_native_structured_outputs is set to False. Use use_json_mode=True for structured output.

Available Models

The legacy ids deepseek-chat and deepseek-reasoner still work and route server-side to the V4 models (deepseek-chat to non-thinking, deepseek-reasoner to thinking), but you should migrate to deepseek-v4-flash / deepseek-v4-pro.

Thinking mode

V4 models run with thinking enabled by default, so you get reasoning_content out of the box. Control it with the use_thinking flag: For agent scenarios, DeepSeek recommends reasoning_effort="max". The API default is "high". While thinking is active, temperature, top_p, presence_penalty and frequency_penalty are ignored by the API.