AI agents · OpenClaw · self-hosting · automation

Quick Answer

How to Use DeepSeek V4 Flash 0731 in Cursor & Claude Code (2026)

Published:

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

  1. Settings → Models.
  2. Add a custom OpenAI-compatible provider: paste DeepSeek’s base URL and API key.
  3. Add model deepseek-v4-flash-0731 and enable it.
  4. 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.

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