Back to guides
Setup·September 21, 2026·9 min read

OpenClaw with DeepSeek: Setup, Model IDs and API Costs

Install the plugin, pick a model ID that still exists, and know which rate the clock is charging you.

Last reviewed on .

OpenClaw reaches DeepSeek through an official provider plugin that is installed separately — openclaw plugins install @openclaw/deepseek-provider — with provider id deepseek, key DEEPSEEK_API_KEY, an OpenAI-compatible API, and base URL https://api.deepseek.com carrying no /v1. Two facts decide whether your first run works. DeepSeek's live catalogue is two ids, deepseek-flash and deepseek-v4-pro; the deepseek-chat and deepseek-reasoner names that older tutorials use were discontinued on July 24, 2026. And OpenClaw's onboarding sets deepseek/deepseek-v4-pro as your default, which is the one model whose current billing DeepSeek's own pages disagree about.

One disambiguation before the configuration, because the search results mix them. A different OpenClaw on GitHub describes itself as "a multiplatform C++ reimplementation of original Captain Claw (1997) platformer game"; nothing from it applies here. The agent is the project at openclaw.ai, documented at docs.openclaw.ai — link that host, since documentation.openclaw.ai only redirects to it.

Install and configure it the way both projects document

install.sh
# 1. Install the provider plugin — DeepSeek support is not bundled.
openclaw plugins install @openclaw/deepseek-provider

# 2. Interactive: prompts for the key, sets deepseek/deepseek-v4-pro as default.
openclaw onboard --auth-choice deepseek-api-key

# 2b. Or scripted, with the flags OpenClaw documents for a headless install.
openclaw onboard --non-interactive \
  --mode local \
  --auth-choice deepseek-api-key \
  --deepseek-api-key "$DEEPSEEK_API_KEY" \
  --skip-health \
  --accept-risk

With the plugin installed you do not supply a base URL: the plugin publishes its own catalogue and its own compatibility behaviour. A minimal configuration is the key and the model, in JSON5.

~/.openclaw/openclaw.json
{
  env: { vars: { DEEPSEEK_API_KEY: "sk-..." } },
  agents: {
    defaults: {
      model: { primary: "deepseek/deepseek-v4-pro" },
    },
  },
}
SettingValueWhere it comes from
Provider iddeepseekOpenClaw's DeepSeek provider page
AuthDEEPSEEK_API_KEYSame page; resolution order below
API shapeOpenAI-compatibleSame page
Base URLhttps://api.deepseek.com, path /chat/completionsDeepSeek's first API call — no /v1
Plugin package@openclaw/deepseek-provider, npm 2026.9.5npm registry
Config file~/.openclaw/openclaw.json (JSON5)Gateway configuration; relocate with OPENCLAW_CONFIG_PATH
Control UIhttp://127.0.0.1:18789, Config tabSame page

OpenClaw resolves a provider key from four environment-variable shapes in a documented priority order: OPENCLAW_LIVE_DEEPSEEK_KEY as a single live override with the highest priority, then DEEPSEEK_API_KEYS as a comma- or semicolon-separated list, then DEEPSEEK_API_KEY as the primary key, then numbered DEEPSEEK_API_KEY_* entries (Control UI and keys, checked September 21, 2026). Settings then Models in the Control UI adds or replaces keys without editing the file, and the key material stays in the auth store. The trap for a server install is scope rather than spelling: OpenClaw's own page warns that if the Gateway runs as a daemon under launchd or systemd, the key has to be visible to that process, for example in ~/.openclaw/.env or via env.shellEnv.

Which DeepSeek model ids are actually alive

The rows below carry three different statuses rather than one. The sample response in DeepSeek's list-models reference shows exactly two ids, deepseek-flash and deepseek-v4-pro, while OpenClaw's bundled catalogue still offers four refs.

Model ref in OpenClawWhat DeepSeek serves for itStatus on September 21, 2026
deepseek/deepseek-flashDeepSeek-V4.1-Flash, released September 10, 2026Canonical current name; in DeepSeek's documented model list
deepseek/deepseek-v4-proModel version DeepSeek-V4-Pro-0813In DeepSeek's documented model list; OpenClaw's onboarding default; billing contested below
deepseek/deepseek-v4-flashRouted to V4.1-Flash, billed at the Flash priceLegacy name still accepted; OpenClaw keeps it as its own catalogue row, and says those "legacy rows retain their earlier bundled metadata"
deepseek/deepseek-v4-flash-vision-expRouted to V4.1-Flash, billed at the Flash priceSame as above
deepseek-chat, deepseek-reasonerNothingDiscontinued July 24, 2026 after a three-month notice given April 24, 2026

Keep the two retirement statements apart, because they read as contradictory and are not. OpenClaw states that DeepSeek retired deepseek-chat and deepseek-reasoner and that "those model IDs are no longer accessible". DeepSeek separately states that "the legacy names deepseek-v4-flash and deepseek-v4-flash-vision-exp are still accepted, but the corresponding models have been retired". Two different pairs of names, two different outcomes. DeepSeek's Models & Pricing page gives both live ids a 1M context length and a 384K maximum output, and OpenClaw's catalogue table carries the same 1,000,000 / 384,000 pair on all four of its refs.

The unresolved one. DeepSeek's September 10, 2026 announcement says "We're phasing out V4-Pro" and that "starting at 04:00 UTC on Sept 14, 2026, all deepseek-v4-pro requests will route to V4.1-Flash at V4.1-Flash rates". The change log for the same release says the opposite: "in response to user demand, we have decided to continue providing API services for DeepSeek V4 Pro after September 14, 2026, with the billing method remaining unchanged". The Models & Pricing page still lists V4 Pro with its own higher rates and carries no retirement notice. Both were read on September 21, 2026, a week after the date in question. This page will not tell you which one bills you — confirm in your own DeepSeek account before you leave the onboarding default in place, and note that the default is precisely the contested model.

What the tokens cost, and why the clock is part of the price

DeepSeek publishes peak and off-peak rates, with off-peak at half of peak. The window is narrow: "peak hours are 01:00 - 04:00 and 06:00 - 10:00 UTC, Monday through Friday, excluding Chinese public holidays. All other hours are off-peak, including weekends and Chinese public holidays in full." Seven weekday hours are peak and everything else is not, so an estimate that silently assumes peak overstates a typical bill.

ModelWindowInput, cache missInput, cache hitOutput
deepseek-flashPeak$0.30 / 1M$0.006 / 1M$1.20 / 1M
deepseek-flashOff-peak$0.15 / 1M$0.003 / 1M$0.60 / 1M
deepseek-v4-proPeak$1.32 / 1M$0.044 / 1M$3.96 / 1M
deepseek-v4-proOff-peak$0.66 / 1M$0.022 / 1M$1.98 / 1M

Read from DeepSeek's Models & Pricing page on September 21, 2026. The Flash row is independently corroborated by OpenClaw's provider page, which names "$0.30 per million input tokens, $1.20 per million output tokens, and $0.006 per million cached input tokens". The V4 Pro rows rest on the Models & Pricing page alone and sit under the contradiction above, so treat them as quoted rather than settled.

The cache column is the one that moves an agent bill, and its ratio is unusual. A cache hit on deepseek-flash is $0.006 per million against $0.30 for a miss — roughly a fiftieth of the miss rate, far below the one-tenth ratio common elsewhere, so do not carry an assumption across from another vendor. DeepSeek's caching guide says the feature "is enabled by default for all users, without needing to modify their code", that a hit requires a fully matching prefix, and that an unused cache clears "usually within a few hours to a few days". Hits and misses come back in the prompt_cache_hit_tokens and prompt_cache_miss_tokens usage fields. DeepSeek publishes no cache-write price and its pricing table has no cache-write column; that is an absent published fee, not a statement that writes are free.

An illustrative session on deepseek-flash, at DeepSeek's published rates. Assume one OpenClaw run that sends 600,000 input tokens, of which 450,000 hit the prefix cache and 150,000 miss, and receives 40,000 output tokens. At peak that is $0.045 plus $0.0027 plus $0.048, or $0.096; the same session off-peak is $0.048. The same run with no cache hits at all would be $0.228 at peak. These are token arithmetic on stated assumptions, not measured task costs and not a spending ceiling — your own cache-hit share is the variable that matters most, and OpenClaw's in-app figure will not settle it, because OpenClaw says its local costs are estimates and points at DeepSeek's pricing page as authoritative for billing.

Model capability and client tool support are two different questions

This is the part a price table cannot tell you, and it is the practical reason to use the plugin rather than a hand-rolled provider entry. DeepSeek V4 thinking sessions require replayed assistant messages from a thinking-enabled turn to carry reasoning_content on follow-up requests. OpenClaw's DeepSeek plugin backfills that field automatically, so multi-turn tool use works "even when history came from another OpenAI-compatible provider (no native reasoning_content) or from a plain assistant message", with no /new needed after switching providers mid-session. When thinking is off, including the UI's None selection, OpenClaw sends thinking: { type: "disabled" } and strips replayed reasoning_content from outgoing history. OpenClaw also maps both /think xhigh and /think max to DeepSeek's maximum reasoning_effort.

A generic openai-completions custom provider pointed at a DeepSeek-compatible endpoint gets none of that backfill, and no DeepSeek thinking format unless you declare the compatibility block yourself — OpenClaw's ds4 page shows the shape, including thinkingFormat: "deepseek" and supportsReasoningEffort. That gap is the usual explanation for a tool turn that succeeds once and then fails on the follow-up.

Two DeepSeek-side limits belong in the same decision. Strict-mode tool calling lives on a different base URL, https://api.deepseek.com/beta, and requires "strict": true on each function plus "additionalProperties": false; that is not where the plugin points by default. And DeepSeek's tool calling guide states that "the Chat Completion API does not support inserting tool calls mid-conversation but does support inserting system messages mid-conversation; to insert tool calls, use the Anthropic API or the Responses API instead" — a limit of the endpoint OpenClaw's plugin uses, with two documented alternatives rather than a model limitation.

On model support, the two sources agree. The FEATURES column of DeepSeek's Models & Pricing page marks Tool Calls, JSON Output, the Responses API and the Anthropic API as supported on both deepseek-flash and deepseek-v4-pro, and separates them on vision — supported on deepseek-flash, not supported on deepseek-v4-pro. OpenClaw states that multi-turn tool use works on all four of its refs. What neither side documents is parallel tool calls, so that one is genuinely open rather than answered either way.

Verify in three steps, then the failures worth naming

Check the layers in order, because each one fails differently. First the catalogue: openclaw models list --provider deepseek, or openclaw models list --all --provider deepseek to inspect the plugin's static catalogue without a running Gateway, then openclaw models set deepseek/deepseek-flash if you want the uncontested model rather than the onboarding default. Second, one short non-streaming prompt and then a streaming one, which is where an authentication or base-URL problem surfaces cleanly. Third — and only third — a tool call followed by a second turn on the same session, which is the only step that exercises the reasoning_content replay described above.

SymptomMost likely causeWhat to check first
401DeepSeek's documented code for "authentication fails due to the wrong API key"Whether the Gateway process can see the key at all — daemon installs need it in ~/.openclaw/.env or env.shellEnv. Then the four-shape resolution order above
402"You have run out of balance"DeepSeek bills a prepaid balance and spends granted balance first; top up on DeepSeek's side
404Not a DeepSeek-documented status at allA base URL with a wrong or extra path segment; a model ref aliased under agents.defaults.models but never registered in models.providers.<id>.models[]; or a proxy in front
429Concurrency, not a token budgetDeepSeek's rate-limit page publishes 2,500 concurrent connections for deepseek-flash and 500 for deepseek-v4-pro, counts a request as one connection "from the time it is sent until the model response is complete", and applies the limit per account regardless of which key is used
Tool turn fails after the first replyA custom route without the plugin's compatibility behaviourWhether you are on @openclaw/deepseek-provider or a hand-declared openai-completions provider; a route change discards the previous route's metadata
Usage display reads $0Omitted cost metadata on a custom providerOpenClaw defaults an unstated route to cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, and an omitted context window falls back to 200,000

The 404 row deserves its own sentence, because it is the one the documentation cannot explain for you. DeepSeek's error-code table lists 400, 401, 402, 422, 429, 500 and 503 and contains no 404, so a 404 here is evidence about your routing rather than about DeepSeek. What DeepSeek actually returns for an unknown model id is undocumented and untested here. The error reference covers the equivalent status codes on Kunavo's own endpoint.

Direct, gateway, local: which route wins

Kunavo serves no DeepSeek model. Its text models are Claude, Gemini and OpenAI families, so there is no Kunavo route to a DeepSeek model and this page is not offering one. What does transfer is the mechanism, which is worth knowing if the reason you are reading a DeepSeek setup page is that you want one key across model families rather than DeepSeek specifically.

RouteWins whenWhat you give up
Direct DeepSeek with the official pluginYou want DeepSeek's models and the plugin's reasoning_content handling, at DeepSeek's own published ratesA separate prepaid balance, peak/off-peak timing, and the unresolved V4 Pro billing question on the default model
An OpenAI-compatible gateway as a custom providerYou switch between model families on one key and one balanceA DeepSeek model is not among them at Kunavo; and a proxy route loses OpenAI-only request shaping, cannot re-enable compat.supportsDeveloperRole, and carries no metadata you do not declare
DeepSeek weights on a third-party cloudYou already buy from that cloudDifferent ids and different prices — OpenClaw's Volcano Engine catalogue carries its own DeepSeek refs, volcengine/deepseek-v4-pro-260425 and volcengine/deepseek-v4-flash-260425, which are not api.deepseek.com and must never anchor a "DeepSeek costs X" claim
Local, via OpenClaw's documented ds4 routemacOS with Metal support, no per-request chargeNot a bundled plugin; configure it under models.providers.ds4. OpenClaw warns that a tiny --ctx 4096 passes a curl test but fails agent runs, and to use at least --ctx 32768
A subscription clientFlat-rate daily use suits you better than metered tokensOpenClaw has no paid tier to subscribe to at all, so nothing here is unlocked by paying the project

For the gateway row, the configuration is the same two levers. Either declare models.providers.<id> with baseUrl, apiKey, api: "openai-completions" and a models[] array listing at least each id, or onboard against the endpoint with --auth-choice custom-api-key, --custom-base-url and --custom-model-id. Model refs are always provider/model, and the silent failure is aliasing a model under agents.defaults.models without registering it in models.providers.<provider>.models[] — OpenClaw's custom-provider reference states that the alias "neither restricts overrides nor registers a new runtime model by itself". Kunavo's base URL for that route is https://api.kunavo.com/v1, with exactly one /v1 — the opposite of DeepSeek's no-suffix convention, and the likeliest source of a 404 when someone copies one page's value into the other's field.

For a sense of scale on that alternative, here is the same assumed session shape — 600,000 input tokens and 40,000 output tokens, with no cache assumed — priced at live Kunavo catalog rates. These are different models on a different endpoint, so this is a shape comparison and not a same-task cost comparison with the DeepSeek figures above; cheapest listed rate and lowest cost to finish a task are separate claims, and only your own run settles the second.

ModelInput / output per 1MEstimate for the assumed session
Claude Haiku 4.5$0.40 / $2.00$0.320
Gemini 3.8 Flash$0.525 / $2.625$0.420
Claude Sonnet 4.6$1.20 / $6.00$0.960

Illustrative token arithmetic on the stated assumptions, not a measured task cost and not a bill ceiling. Kunavo's catalog amount is a billing floor rather than a cap: when the upstream reports its charge, the bill is the greater of catalog cost and upstream cost times the applicable markup. Cache charges and external tools sit outside this example. The minimum top-up is $10 in prepaid credit — a funding minimum, not a task fee or a subscription. See billing details and caching.

If that adjacent route is what you actually want, start at the integrations overview for the base URL and key setup, then quickstart for a first call, and create a Kunavo account when you are ready to fund a key. Treat it as a published configuration reference rather than a compatibility result: OpenClaw has not been runtime-tested against Kunavo's endpoint. Staying on OpenClaw and choosing a model instead? OpenClaw pricing separates the free software from the metered bill, best API for OpenClaw compares routes by task, and OpenAI-compatible API covers the base-URL conventions this page keeps warning about.

FAQ

How do I use DeepSeek with OpenClaw?

Install the provider plugin first, because DeepSeek support does not ship inside OpenClaw: run openclaw plugins install @openclaw/deepseek-provider, then openclaw onboard --auth-choice deepseek-api-key, which prompts for your key and sets deepseek/deepseek-v4-pro as the default model. The provider id is deepseek, the key is read from DEEPSEEK_API_KEY, the API is OpenAI-compatible and the base URL is https://api.deepseek.com. With the plugin installed you do not set a base URL yourself — a minimal config is the key under env.vars and the model under agents.defaults.model.primary in ~/.openclaw/openclaw.json. Read from OpenClaw's own DeepSeek provider page at v2026.9.5 on September 21, 2026; no install was performed here.

What is the DeepSeek base URL, and does it need /v1?

DeepSeek's documented base URL is https://api.deepseek.com with no /v1 suffix, and the chat endpoint sits at /chat/completions — its own first-call example posts to https://api.deepseek.com/chat/completions. The same table publishes a second base URL for its Anthropic-format surface, https://api.deepseek.com/anthropic, so path segments here are meaningful rather than cosmetic. Whether DeepSeek also accepts an https://api.deepseek.com/v1 alias is not stated either way in its documentation, so use the documented value rather than adding or dropping the segment on a guess. Do not copy the convention across endpoints: Kunavo's OpenAI-compatible base URL is https://api.kunavo.com/v1 with exactly one /v1, which is the opposite shape. Checked September 21, 2026.

Which DeepSeek model should OpenClaw use?

DeepSeek's live catalogue is two ids: deepseek-flash (DeepSeek-V4.1-Flash, released September 10, 2026) and deepseek-v4-pro (DeepSeek-V4-Pro-0813). deepseek-flash is the canonical current name and the one with uncontested published rates, so it is the safe default; switch to it with openclaw models set deepseek/deepseek-flash. OpenClaw's onboarding writes deepseek/deepseek-v4-pro instead, so that is the model most people land on without choosing it. Two older ids are gone entirely: deepseek-chat and deepseek-reasoner were discontinued on July 24, 2026 after a three-month notice DeepSeek posted on April 24, 2026, which is why a tutorial written before that date will not run as written.

Why does OpenClaw's cost display not match what DeepSeek charges?

Because OpenClaw says itself that the figures are estimates: "OpenClaw's local costs are estimates" and "its Models & Pricing page is authoritative for billing". Two things widen the gap. DeepSeek bills at peak or off-peak rates depending on the hour, with off-peak at half the peak rate, and peak covers only 01:00-04:00 and 06:00-10:00 UTC Monday through Friday, excluding Chinese public holidays. And OpenClaw still carries deepseek-v4-flash and deepseek-v4-flash-vision-exp as separate catalogue rows, saying those "legacy rows retain their earlier bundled metadata", while DeepSeek serves those names from V4.1-Flash and bills them at the Flash price. Reconcile against DeepSeek's own balance, not the client's readout.

Why am I getting a 401 or a 404 from OpenClaw with DeepSeek?

A 401 is DeepSeek's documented code for a wrong API key, and the most common cause that is not actually a bad key is a key your shell can see and the Gateway cannot: OpenClaw's own page says that if Gateway runs as a daemon under launchd or systemd, DEEPSEEK_API_KEY must be available to that process, for example in ~/.openclaw/.env or via env.shellEnv. A 404 is different, because DeepSeek documents no 404 at all — its error table is 400, 401, 402, 422, 429, 500 and 503. So a 404 in this setup points at something other than DeepSeek's documented behaviour: a base URL carrying a wrong or extra path segment, a model ref that was aliased under agents.defaults.models but never registered in models.providers.<id>.models[], or a proxy sitting in front. What DeepSeek returns for an unknown model id is not documented and was not tested here.

Does OpenClaw or DeepSeek have a free tier?

OpenClaw itself is free and has no paid tier to buy: its homepage states "No subscription. No hosted tier. No token." and the project is stewarded by an independent 501(c)(3), with the npm package declaring the MIT license. DeepSeek is the opposite: its Models & Pricing page describes a prepaid balance only, with fees "directly deducted from your topped-up balance or granted balance", and that page publishes no free tier, trial quota or signup credit. Read that as no free tier on the page that sets the prices, rather than as a first-party denial that promotional credit exists anywhere. Costs beyond tokens are the machine the Gateway runs on and any paid tools your agent calls.

Can I point OpenClaw at Kunavo for DeepSeek?

No. Kunavo serves no DeepSeek model — its text models are Claude, Gemini and OpenAI families — so there is no Kunavo route to a DeepSeek model, and pointing the deepseek provider at Kunavo would not produce one. The mechanism transfers even though the model does not: the same models.providers.<id> entry, or openclaw onboard --auth-choice custom-api-key with --custom-base-url and --custom-model-id, is how you would add Kunavo as an OpenAI-compatible provider for a Claude, Gemini or GPT model, using https://api.kunavo.com/v1 as the base URL. That route is a reading of OpenClaw's documentation, not a compatibility test: Kunavo has not runtime-tested OpenClaw.

Every OpenClaw and DeepSeek statement above was read from those projects' own documentation and registries on September 21, 2026, against OpenClaw v2026.9.5; the provider page, the pricing page, the change log, the September 10 announcement, the list-models reference, the error-code table, the rate-limit page and the custom-provider rules were each re-fetched directly for this page. Nothing was installed, onboarded or called: no OpenClaw run, no request to api.deepseek.com, and no runtime test against Kunavo. Kunavo token rates come from the live catalog, and every dollar figure is illustrative token arithmetic rather than a measured cost.