How to Use DeepSeek V4 in Cursor: Setup Guide (2026)
How to Use DeepSeek V4 in Cursor: Setup Guide (2026)
DeepSeek V4 launched April 24, 2026 with frontier-class coding benchmarks at a fraction of the cost. Cursor users can now wire it in directly. This is the practical setup guide as of April 26, 2026.
Last verified: April 26, 2026
Why bother
| Task | Claude Opus 4.7 | DeepSeek V4-Pro |
|---|---|---|
| Cost per million input | $15 | $1.74 |
| Cost per million output | $75 | $3.48 |
| SWE-bench Verified | 80.8% | 80.6% |
| Terminal-Bench 2.0 | 65.4% | 67.9% |
| LiveCodeBench | 88.8% | 93.5% |
| Open weights | ❌ | ✅ |
You’re trading roughly 0.2 SWE-bench points for a 22× input price reduction. Even using V4-Pro for everything, a heavy Cursor day costs cents instead of dollars.
Two paths to set this up
Path A: Direct DeepSeek API (cheapest)
Best if you want the lowest possible price and you’re OK managing one more API key.
- Get an API key from api-docs.deepseek.com — sign up, top up $5
- Open Cursor → Settings (
Cmd/Ctrl + ,) → Models - Scroll to OpenAI API Key section and toggle Override OpenAI Base URL
- Set Base URL:
https://api.deepseek.com/v1 - Paste your DeepSeek API key into the OpenAI API Key field
- Click Add Model and add:
deepseek-v4-pro(or current Pro identifier from DeepSeek docs)deepseek-v4-flash
- Verify — Cursor will ping the endpoint
- Toggle the new models on in the model picker
The catch: this routes through Cursor’s OpenAI-compatible path, so you can’t simultaneously use the Cursor-hosted models. If you want both, use Path B.
Path B: Via OpenRouter (cleanest if you mix providers)
Best if you already use OpenRouter or want to keep Cursor’s hosted models alongside DeepSeek.
- Get an OpenRouter API key at openrouter.ai
- Top up your OpenRouter balance
- Cursor → Settings → Models
- Base URL:
https://openrouter.ai/api/v1 - API Key: your OpenRouter key
- Add models:
deepseek/deepseek-v4-prodeepseek/deepseek-v4-flash
- Verify and toggle on
OpenRouter adds a small markup (typically 5%) but gives you instant access to DeepSeek, Kimi K2.6, GLM 5.1, Llama 5, and more — all behind one key.
Configure model per surface
Cursor lets you pick different models per use case. Recommended setup post-V4:
| Surface | Recommended model | Why |
|---|---|---|
| Tab autocomplete | DeepSeek V4-Flash | Low latency, near-zero cost |
| Cmd-K inline edit | DeepSeek V4-Flash | Fast iteration, cheap |
| Chat | DeepSeek V4-Pro | Best quality at 22× cost reduction |
| Composer (agent mode) | DeepSeek V4-Pro or Claude Opus 4.7 | Pick by task — V4 for code-heavy, Claude for cross-file reasoning |
| Bug fix runs | Claude Opus 4.7 | Slight SWE-bench lead, better at multi-file diff coherence |
Set per-surface model in Cursor → Settings → Models → Default Models dropdowns.
Cost in practice
A real heavy-Cursor day from a working developer (rough numbers, your mileage will vary):
- ~150 chat exchanges (avg 1K input / 2K output)
- ~30 Composer runs (avg 10K input / 5K output)
- ~3000 tab autocompletes (avg 500 input / 100 output)
On Claude Opus 4.7:
- Chat: 0.15M in × $15 + 0.3M out × $75 = $24.75
- Composer: 0.3M in × $15 + 0.15M out × $75 = $15.75
- Tab: not typically Opus
- ~$40+/day
On DeepSeek V4-Pro:
- Chat: 0.15M × $1.74 + 0.3M × $3.48 = $1.30
- Composer: 0.3M × $1.74 + 0.15M × $3.48 = $1.04
- Tab on V4-Flash: nearly free
- ~$2.50/day
That’s a 16× cost reduction on a typical workload.
Latency notes
- DeepSeek V4-Flash is the fastest tier (sub-second time-to-first-token from EU/US)
- V4-Pro is comparable to Claude Sonnet 4.7 on latency
- Routing through OpenRouter adds 30–80ms of overhead
- Tab autocomplete on V4-Flash feels at least as snappy as Cursor-hosted models
Quality tips
- Composer agent mode with V4-Pro shines on backend code, scripts, refactors, and tests. It’s slightly less polished than Claude on multi-file frontend refactors with subtle stylistic decisions.
- Long context (>200K tokens) — V4-Pro holds up well to ~500K tokens. Above that, latency and cost scale linearly. Use a chunking + summarize pass for repos >1M tokens.
- Diff quality is excellent — V4 is trained heavily on code patches, so its
diff -u-style output is reliable in Composer. - Tool use in Composer agent mode is solid in V4-Pro. V4-Flash’s tool-use reliability is noticeably worse — keep Flash for completion-only tasks.
Common gotchas
- Cursor’s “Privacy Mode” — when enabled, custom endpoints are still used, but Cursor won’t store prompts. Verify in Settings → Privacy.
- Rate limits on free DeepSeek tier — top up the API account; the free tier hits 429s under Cursor load.
- Token counter mismatch — DeepSeek’s tokenizer differs from OpenAI’s. Cursor’s in-app cost estimates may be off by ±10%; trust your DeepSeek dashboard.
- Region selection — DeepSeek’s API serves from China and Singapore primarily. EU/US latency is fine but for the absolute lowest, use OpenRouter (which load-balances across providers like Together, Fireworks, DeepInfra).
When to keep Claude or GPT-5.5 around
DeepSeek V4 is now the right default. But keep at least one of these on hand:
- Claude Opus 4.7 — best for autonomous overnight Composer runs and cross-file refactors with subtle style requirements
- GPT-5.5 — best for non-coding research questions, Browse-style tasks, multimodal
- Sonnet 4.7 as a quality floor — when V4 produces something weird, a Sonnet rerun usually catches it
A common pattern: 70% V4 / 25% Claude Opus 4.7 / 5% GPT-5.5 — saves ~80% on monthly Cursor spend with no quality regression.
Quick sanity test
After setup, ask DeepSeek V4-Pro in Cursor:
Refactor this function to be O(n log n) instead of O(n²).
Show the diff and explain the change.
You should get back a tight diff, a complexity analysis, and a suggested test in under 10 seconds. If you do, you’re set.
Last verified: April 26, 2026. Sources: api-docs.deepseek.com (DeepSeek V4 launch April 24, 2026), DeepSeek V4-Pro pricing page, Cursor official docs (cursor.com/docs), OpenRouter pricing dashboard, public benchmark posts (Terminal-Bench, SWE-bench Verified leaderboards).