Models

DeepSeek V4 vs Claude for coding: scores, price and data

DeepSeek's open models against Anthropic's, on independent coding tests, per token and per task, and on where your code ends up.

Claude is much stronger at agentic coding, and DeepSeek is much cheaper. On Vals AI's independent Terminal-Bench 4.0 run, updated October 29, 2026, Claude Opus 5.5 scored 65.2% and Sonnet 5.5 64.1%, while DeepSeek's best model there, V4.1 Flash (1017), scored 31.8% and DeepSeek V4 Pro 14.1%. Per task, though, V4.1 Flash cost $0.54 against $13.20 for Opus 5.5. DeepSeek's weights are open under the MIT license, and its API stores data in China; Claude's weights are closed. On shorter, well-defined fixes the gap narrows: DeepSeek V4 Pro scored 96.4% on Vals AI's SWE-bench Verified, a test most frontier models now nearly finish.

Key takeaways

  • Long agent tasks: Opus 5.5 65.2%, Sonnet 5.5 64.1%, DeepSeek V4.1 Flash 31.8%, V4 Pro 14.1% (Vals AI, Terminal-Bench 4.0).
  • Price per million tokens: V4.1 Flash $0.30 and $1.20, V4 Pro $1.32 and $3.96, half that off-peak; Sonnet 5.5 $2 and $10, Opus 5.5 $4 and $20.
  • Cost per task on the same run: $0.54 for V4.1 Flash, $3.31 for V4 Pro, $13.20 for Opus 5.5.
  • Open weights: every DeepSeek V4 and V4.1 model is MIT-licensed; Claude can't be downloaded.
  • Data: DeepSeek's privacy policy stores data in China, and a US order removes DeepSeek from federal civilian agencies.
DeepSeek and Claude, from Vals AI, LMArena and the labs' pricing pages, October 29, 2026. Prices per million tokens, input / output, at standard (peak) rates.
DeepSeek V4.1 FlashDeepSeek V4 ProClaude Sonnet 5.5Claude Opus 5.5
Price$0.30 / $1.20$1.32 / $3.96$2 / $10$4 / $20
Off-peak price$0.15 / $0.60$0.66 / $1.98No off-peakNo off-peak
Terminal-Bench 4.0 (Vals AI)31.8%14.1%64.1%65.2%
Cost per task, same run$0.54$3.31$16.51$13.20
LMArena WebDev#16#39#3#1
Context1M1M1M1M
WeightsOpen, MITOpen, MITClosedClosed
Where the API stores dataChinaChinaUS by default; US-only optionUS by default; US-only option

Sources: Vals AI Terminal-Bench 4.0 and SWE-bench, LMArena WebDev, DeepSeek's pricing and changelog, Anthropic's pricing, opened October 29, 2026.

What is DeepSeek V4?

DeepSeek's fourth-generation models, released as a preview on April 24, 2026. The current API offers two (DeepSeek):

  • DeepSeek V4.1 Flash (deepseek-flash): released September 10, updated October 17. 552 billion backbone parameters, about 8 to 16 billion active per token, a 1M-token context and native image input. DeepSeek calls it "the smallest model in our new architecture family."
  • DeepSeek V4 Pro (deepseek-v4-pro): generally available since August 13. 1.6 trillion parameters, 49 billion active, 1M context, with low, high and max thinking effort.

Both think by default and can answer without thinking. The old deepseek-chat and deepseek-reasoner names retired on July 24, 2026, and there's no V4.1 Pro yet. All the weights are on Hugging Face under the MIT license.

How do DeepSeek and Claude compare on coding?

Long agent tasks. Vals AI runs every model through the same agent on Terminal-Bench 4.0, terminal tasks that take many steps (Vals AI):

  • Claude Opus 5.5: 65.15%, first.
  • Claude Sonnet 5.5: 64.14%, second.
  • DeepSeek V4.1 Flash (1017): 31.82%, 21st.
  • DeepSeek V4 Pro (0813): 14.14%, 38th.

DeepSeek's own figure for V4.1 Flash on the same test is 42.3%, measured in Claude Code; independent and self-reported numbers rarely match, and the independent run is the one with every model in the same harness.

Single bug fixes. On SWE-bench Verified, archived by Vals AI on September 1, DeepSeek V4 Pro scored 96.4%, second to Claude Opus 5 at 97.0% (Vals AI). The current Claude models weren't tested before it was archived. Scores that high mean the test no longer separates the leaders.

Web apps, by people's votes. On LMArena's WebDev board (October 27), Opus 5.5 ranks first (1810), Sonnet 5.5 third (1770), V4.1 Flash 16th (1665) and V4 Pro 39th (1582).

The pattern: DeepSeek handles a well-specified fix well and falls behind as tasks get longer and more open-ended, which is most of what coding agents do.

How much do DeepSeek and Claude cost?

Per million tokens, input and output:

  • DeepSeek V4.1 Flash: $0.30 and $1.20 at peak, $0.15 and $0.60 off-peak. Cache hits $0.006.
  • DeepSeek V4 Pro: $1.32 and $3.96 at peak, $0.66 and $1.98 off-peak.
  • Claude Haiku 5.5: $0.10 and $0.50, cheaper per token than V4.1 Flash.
  • Claude Sonnet 5.5: $2 and $10.
  • Claude Opus 5.5: $4 and $20.

DeepSeek's peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays, so the US working day falls in its half-price window. Every price, cache rate and limit is in DeepSeek API pricing, and Claude's in Claude API pricing.

Per task the gap is wider than per token: on the Terminal-Bench run, V4.1 Flash averaged $0.54 a task, V4 Pro $3.31, Opus 5.5 $13.20 and Sonnet 5.5 $16.51. A cheap model that fails half the time can still cost more in your own time.

Can you use DeepSeek in Claude Code?

Yes. DeepSeek runs an Anthropic-compatible endpoint, https://api.deepseek.com/anthropic, and documents setting ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN so Claude Code talks to DeepSeek instead, with deepseek-flash[1m] as the recommended model (DeepSeek). Model names starting claude-opus go to V4 Pro and other Claude names to V4.1 Flash. Anthropic doesn't support this setup, and it bills your DeepSeek account, not a Claude plan.

DeepSeek also documents Codex, OpenCode and others. Cursor offers V4.1 Flash as a built-in model outside its included usage (Cursor); GitHub Copilot has no native DeepSeek model.

Is DeepSeek safe to use for work code?

What's published:

  • Storage: DeepSeek's privacy policy says it will "collect, process and store your Personal Data in People's Republic of China" (DeepSeek).
  • Training: the policy says user input is used to improve its technology, with an opt-out by email. Its API terms don't say either way for API data.
  • Government restrictions: the US Department of Homeland Security ordered DeepSeek products excluded and removed from federal civilian agencies' systems (Federal Register, published October 20, 2026). Italy, Taiwan, South Korea, Australia and several US states restricted it in 2025.

The other route is the open weights: running DeepSeek on your own servers or a US cloud keeps code off DeepSeek's API entirely, though V4 Pro needs a large multi-GPU server. Anthropic doesn't train on API data by default and offers US-only inference.

Which should you use?

  • The hardest agentic work, or code your company won't send to China: Claude, Opus 5.5 or Sonnet 5.5.
  • High-volume, well-defined jobs on a tight budget: DeepSeek V4.1 Flash, or Claude Haiku 5.5, which costs less per token.
  • Self-hosting or fine-tuning: DeepSeek, or another open-weight model (the best open-weight models for coding).

Claude in a shared room

Poly (usepoly.co) doesn't offer DeepSeek. It runs Claude, GPT, Grok and Muse for a whole team in one browser room, each member picking their own model, with Sonnet 5.5 among the free ones. The best AI model for coding compares the leading models.

Common questions

Is DeepSeek V4 better than Claude for coding?

No, on independent agent tests. On Vals AI's Terminal-Bench 4.0 run, Claude Opus 5.5 scored 65.2% and Sonnet 5.5 64.1%, against 31.8% for DeepSeek V4.1 Flash and 14.1% for V4 Pro. DeepSeek is far cheaper per task.

Is DeepSeek cheaper than Claude?

Than Sonnet and Opus, yes: V4.1 Flash is $0.30 and $1.20 per million tokens, half that off-peak, against $2 and $10 for Sonnet 5.5. Claude Haiku 5.5, at $0.10 and $0.50, is cheaper per token than DeepSeek.

Can I use DeepSeek with Claude Code?

Yes, through DeepSeek's Anthropic-compatible endpoint, by setting ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN. It bills your DeepSeek account, and Anthropic doesn't support the setup.

Is DeepSeek open source?

Its model weights are open under the MIT license, including DeepSeek V4 Pro and V4.1 Flash, so you can run them on your own servers. Claude's weights are not available.

Is it safe to use DeepSeek for company code?

DeepSeek's privacy policy says it stores data in China and uses input to improve its models, with an opt-out by email, and the US has ordered DeepSeek out of federal civilian agencies. Running the open weights yourself avoids its API.