How to Use DeepSeek V4 Flash 0731 in Cursor & Claude Code (2026)
The Short Answer
DeepSeek V4 Flash 0731 is OpenAI/Responses-API compatible and Codex-adapted, so it drops into Cursor, Claude Code, and OpenCode as a custom model. Point each tool at DeepSeek’s API base with your key and select deepseek-v4-flash-0731. Cost: ~$0.0056/task vs ~$0.28 for Opus 5.
Step 1 — Get a DeepSeek API Key
Create a key in the DeepSeek platform. Note the OpenAI-compatible base URL from their docs and the model id deepseek-v4-flash-0731 (the older deepseek-chat / deepseek-reasoner names were retired July 24, 2026).
Step 2 — Cursor
- Settings → Models.
- Add a custom OpenAI-compatible provider: paste DeepSeek’s base URL and API key.
- Add model
deepseek-v4-flash-0731and enable it. - Select it in the chat/agent model picker.
Step 3 — Claude Code / OpenCode
Both accept OpenAI-compatible endpoints. Set the base URL and API key via env vars or config, then set the model to deepseek-v4-flash-0731. Because the 0731 build natively supports the Responses API, JSON output, and tool calls, agent loops and multi-file edits work without shims.
Step 4 — Route by Difficulty (Recommended)
Don’t run everything on one model. A common 2026 setup:
- Routine edits / high volume → DeepSeek V4 Flash 0731 (~$0.0056/task)
- Hard multi-step refactors → Claude Opus 5 ($5/$25) or GPT-5.6 Sol ($5/$30)
- Value middle tier → Grok 4.5 ($2/$6)
Why It’s Worth It
At $0.14/$0.28 per MTok off-peak (cache-hit input $0.0028), Flash 0731 is ~50× cheaper per task than a frontier model while scoring 82.7 on Terminal-Bench 2.1 and 69.1 on the AA Coding Index. Speculative decoding (DSpark) keeps latency low. For 80% of everyday coding, it’s more than enough.
Sources
- DeepSeek API docs & pricing: api-docs.deepseek.com
- OpenRouter — DeepSeek V4 Flash 0731: openrouter.ai/deepseek/deepseek-v4-flash-0731