DeepSeek V4 Flash for Coding: Cost, Modes, and Setup

Evaluate DeepSeek V4 Flash by API cost, reasoning modes, Claude Code and OpenCode setup, and the boundary between stable model IDs and dated builds.

Contents

DeepSeek V4 Flash is worth testing for frequent coding calls, narrow subagent work, and tasks with an automatic pass condition. A low price per token does not remove the cost of long reasoning, client errors, or retries. Compare Flash with a larger model on the same repository instead of assuming it is a cheaper equivalent.

Want to run a small, measurable trial? On August 13, 2026, the BetterToken catalog listed deepseek-v4-flash-0731 at about $0.095 per million input tokens and $0.191 per million output tokens. Create your own API key and begin with one safe task. Record the effective model and usage in Workspace, and recheck the catalog before production.

Identify the model and mode

DeepSeek’s V4 announcement introduced the V4 preview family. As of August 13, 2026, the official models and pricing page lists stable API model IDs deepseek-v4-flash and deepseek-v4-pro. Their served MODEL VERSION values are DeepSeek-V4-Flash-0731 and DeepSeek-V4-Pro-0813.

A version label tells you which build the provider currently serves; it is not automatically the string accepted by every endpoint. BetterToken listed deepseek-v4-flash-0731 and deepseek-v4-pro on the same date, but not deepseek-v4-pro-0813. Copy the model ID from the selected provider’s current catalog instead of appending 0813 by assumption.

EndpointFlash buildPro buildModel ID to configure
Official DeepSeek APIDeepSeek-V4-Flash-0731DeepSeek-V4-Pro-0813deepseek-v4-flash or deepseek-v4-pro
BetterToken, checked August 13deepseek-v4-flash-0731deepseek-v4-proCopy the current BetterToken catalog ID

The official DeepSeek V4 Flash model card describes 284 billion total parameters, 13 billion active parameters, and a one-million-token context window.

The model supports thinking and non-thinking behavior. A million-token context is a technical limit, not a promise that a million tokens of code will be retrieved and followed equally well. Test information placed in the middle of a long context and verify that project rules survive a long tool history.

Calculate cache-hit and cache-miss cost

DeepSeek’s current API pricing lists $0.0028 per million cache-hit input tokens, $0.14 per million cache-miss input tokens, and $0.28 per million output tokens.

For 200,000 uncached input tokens and 20,000 output tokens:

0.2 × $0.14 + 0.02 × $0.28 = $0.0336.

If all input tokens were cache hits, the same token shape would cost $0.00616. Full cache reuse is an optimistic boundary. Agent histories change as tools return results, so measure the actual cache split and the number of retries.

Compare Non-Think, High, and Max

The official model card reports these results for Non-Think, High, and Max respectively: LiveCodeBench 55.2, 88.4, and 91.6; Terminal Bench 2.0 49.1, 56.6, and 56.9; SWE Verified 73.7, 78.6, and 79.0; SWE Pro 49.1, 52.3, and 52.6; and MRCR 1M 37.5, 76.9, and 78.7.

These are vendor/model-card results, not an independent production benchmark. They suggest that High can provide a large gain over Non-Think on some tasks, while Max adds a smaller increment on several rows. Do not make Max the default until the additional output and latency improve accepted results on your workload.

A practical starting point is Non-Think for extraction or obvious local edits, High for bug fixes and multi-file review, and Max for the hardest debugging or long agent plans. This is a test plan, not a universal capability guarantee.

Use Flash with Claude Code

DeepSeek’s coding-agent guide documents an Anthropic-compatible endpoint and a split where Pro is the main model while Flash handles Haiku/subagent work:

export ANTHROPIC_BASE_URL="https://api.deepseek.com/anthropic"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
export ANTHROPIC_MODEL="deepseek-v4-pro[1m]"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4-flash"
export CLAUDE_CODE_SUBAGENT_MODEL="deepseek-v4-flash"

Restart the client and verify the Base URL, the effective subagent model, and one tool call. A text-only answer is not enough to prove agent compatibility.

  1. Export the endpoint, key placeholder, main model, and subagent model for the same provider.
  2. Restart Claude Code, run a read-only task that includes one tool call, and confirm the effective model and usage before allowing file changes.

Use Flash with OpenCode

The official guide requires OpenCode 1.14.24 or newer. Check opencode --version, use /connect to choose DeepSeek, provide the key through the credential dialog, and select Flash only if it appears in the current provider list. The official endpoint used deepseek-v4-flash on August 13; BetterToken used deepseek-v4-flash-0731. Do not swap these names without checking the selected endpoint.

Test at least two turns with a tool call. Thinking-mode history must preserve reasoning_content; issue #24130 records a failure after a tool result, and PR #24146 contains a related fix. Separately, the current DeepSeek guide requires OpenCode 1.14.24 or newer. A different OpenCode issue reported a 32K client-side output cap while the model documentation allows a larger maximum. Distinguish the model limit from the effective value sent by the adapter.

Measure the accepted task

Compare Non-Think, High, and Max on identical commits and prompts. Record passed tests, time to an acceptable diff, input/output/reasoning tokens, retries, scope violations, and language drift. One GitHub report describes unexpected Chinese output, while a Reddit discussion mixes successful repository work with missed requirements and repeatable task errors. These are individual reports without a shared harness, so use them as test cases, not measured prevalence.

Flash is economical when narrow tasks finish reliably. If retries consume the savings, a larger model may be cheaper per accepted change even with a higher unit price.

Sources

Ready to optimize your LLM workflow?

Join thousands of developers building faster, smarter, and more cost-effective AI applications with BetterToken.

Get Started for Free