DeepSeek Provider Setup: Authentication and Model Selection
Learn how to set up DeepSeek as an AI provider, including API key authentication and model selection. This guide is for developers integrating DeepSeek's OpenAI-compatible API.
Read this when
- You want to use DeepSeek with OpenClaw
- You need the API key env var or CLI auth choice
DeepSeek offers powerful AI models through an API that works with OpenAI's format.
| Property | Value |
|---|---|
| Provider | deepseek |
| Auth | DEEPSEEK_API_KEY |
| API | OpenAI-compatible |
| Base URL | https://api.deepseek.com |
Install plugin
Install the official plugin, then restart Gateway:
openclaw plugins install @openclaw/deepseek-provider
openclaw gateway restart
Getting started
Get your API key
Generate an API key at platform.deepseek.com.
Run onboarding
openclaw onboard --auth-choice deepseek-api-key
Prompts you for your API key and sets deepseek/deepseek-v4-flash as the default model.
Verify models are available
openclaw models list --provider deepseek
To view the plugin's static catalog without a running Gateway:
openclaw models list --all --provider deepseek
Non-interactive setup
For scripted or headless setups, provide all flags directly:
openclaw onboard --non-interactive \
--mode local \
--auth-choice deepseek-api-key \
--deepseek-api-key "$DEEPSEEK_API_KEY" \
--skip-health \
--accept-risk
Warning
If Gateway runs as a daemon (launchd/systemd), confirm that
DEEPSEEK_API_KEYis accessible to that process (for example, in~/.openclaw/.envor throughenv.shellEnv).
Built-in catalog
| Model ref | Name | Input | Context | Max output | Notes |
|---|---|---|---|---|---|
deepseek/deepseek-v4-flash | DeepSeek V4 Flash | text | 1,000,000 | 384,000 | Default model; V4 thinking-capable surface |
deepseek/deepseek-v4-pro | DeepSeek V4 Pro | text | 1,000,000 | 384,000 | V4 thinking-capable surface |
deepseek/deepseek-chat | DeepSeek Chat | text | 1,000,000 | 384,000 | Deprecated V4 Flash non-thinking compatibility name |
deepseek/deepseek-reasoner | DeepSeek Reasoner | text | 1,000,000 | 384,000 | Deprecated V4 Flash thinking compatibility name |
Warning
DeepSeek will remove
deepseek-chatanddeepseek-reasoneron July 24, 2026 at 15:59 UTC. They currently route to DeepSeek V4 Flash in non-thinking and thinking mode, respectively. Move configured model refs todeepseek/deepseek-v4-flashordeepseek/deepseek-v4-probefore the cutoff.
OpenClaw's local cost estimates follow DeepSeek's published cache-hit, cache-miss, and output rates. DeepSeek can adjust those rates; its Models & Pricing page is authoritative for billing.
Tip
V4 models support DeepSeek's
thinkingcontrol. OpenClaw also replays DeepSeekreasoning_contenton follow-up turns so thinking sessions with tool calls can continue. Use/think xhighor/think maxwith DeepSeek V4 models to request DeepSeek's maximumreasoning_effort; both map to"max".
Thinking and tools
DeepSeek V4 thinking sessions need replayed assistant messages from a
thinking-enabled turn to include reasoning_content on follow-up requests.
OpenClaw's DeepSeek plugin fills that field in automatically, so normal
multi-turn tool use works on deepseek/deepseek-v4-flash and
deepseek/deepseek-v4-pro even when history came from another
OpenAI-compatible provider (no native reasoning_content) or from a plain
assistant message. No /new required after switching providers mid-session.
When thinking is off (including the UI None selection), OpenClaw
sends thinking: { type: "disabled" } and removes replayed reasoning_content
from outgoing history, keeping the session on the non-thinking DeepSeek path.
Use deepseek/deepseek-v4-flash for the default fast path. Use
deepseek/deepseek-v4-pro for the stronger model when you can accept higher
cost or latency.
Live testing
To run only the DeepSeek V4 direct-model checks from the modern model live suite:
OPENCLAW_LIVE_PROVIDERS=deepseek \
OPENCLAW_LIVE_MODELS="deepseek/deepseek-v4-flash,deepseek/deepseek-v4-pro" \
pnpm test:live src/agents/models.profiles.live.test.ts
Verifies both V4 models complete and that thinking/tool follow-up turns preserve the replay payload DeepSeek requires.
Config example
{
env: { DEEPSEEK_API_KEY: "sk-..." },
agents: {
defaults: {
model: { primary: "deepseek/deepseek-v4-flash" },
},
},
}
Related
-
Model selection, Choosing providers, model refs, and failover behavior.
-
Configuration reference, Full config reference for agents, models, and providers.