DeepSeek V4.1 Flash Free in OpenCode: How-To
On this page What you get for $0
Independent and reader-supported. Some links may earn us a commission; it never changes our rankings. Editorial policy
DeepSeek V4.1 Flash is free in OpenCode for now: no API key, no card. We tested it on OpenCode 1.19.3. Setup steps, the model ID, limits, costs and fixes.
Short answer: yes, it works, and it took us under ten seconds to see it. On October 17, 2026 we installed OpenCode 1.19.3 on a clean test machine, picked opencode/deepseek-v4.1-flash-free, and asked it to fix a broken function. No account, no API key, no billing page. The catch is in the fine print of OpenCode Zen: the free model is “available for a limited time”, it has a smaller context window than paid DeepSeek, and it only answers inside the OpenCode app.
What you get for $0
| Free in OpenCode | Paid routes | |
|---|---|---|
| Model ID | opencode/deepseek-v4.1-flash-free | opencode/deepseek-v4.1-flash or deepseek-flash |
| Price per 1M tokens | $0 input · $0 output · $0 cached | From $0.15 in / $0.60 out (DeepSeek off-peak) |
| Context / output | 200K / 32K tokens | 1M / 384K tokens |
| Where it works | Only inside OpenCode | Any client with your key |
| Account needed | No (in our test) | Yes, plus prepaid credit |
| End date | None published | n/a |
What DeepSeek V4.1 Flash is
DeepSeek released V4.1 Flash on September 10, 2026. It is a 552B-parameter mixture-of-experts model that activates 8B parameters when reading input and 16B when writing, takes text and images, and supports a 1M-token context on DeepSeek’s API. The weights are on Hugging Face under the MIT license, though at 552B total parameters this is not a laptop model. DeepSeek claims it beats its own V4 Pro on performance, cost and speed, and it now routes old deepseek-v4-pro calls to V4.1 Flash until V4.1 Pro ships. Treat the benchmark side as DeepSeek’s claim, not ours.
Why it matters for coding agents: DeepSeek says the KV cache needs a quarter of the GPU memory of the previous version. Agents re-read huge contexts on every step, so cheaper cache hits are where most of the savings show up. That is also why the cached-input price is tiny.
How to use DeepSeek V4.1 Flash free in OpenCode
- Install OpenCode. Use
curl -fsSL https://opencode.ai/install | bash,npm install -g opencode-aiorbrew install anomalyco/tap/opencode. On Windows, the OpenCode docs recommend WSL. - Open your project.
cdinto the repo and runopencode. Run/initonce so it writes an AGENTS.md file describing your codebase. - Pick the model. Type
/modelsand choose DeepSeek V4.1 Flash Free. With no provider connected, our install listed only the free Zen models, so it is easy to spot. - Make it the default (optional). Put the snippet below in
opencode.jsonin the project root. - Start in Plan mode. Press Tab to switch to Plan, which suggests changes without editing files, then switch back to Build when the plan looks right.
{
"$schema": "https://opencode.ai/config.json",
"model": "opencode/deepseek-v4.1-flash-free"
}
For scripts, use the non-interactive mode: opencode run -m opencode/deepseek-v4.1-flash-free "your task" < /dev/null. Our bug-fix run finished in 8.8 seconds of wall time, including startup.

What it costs once the free window ends
No end date is published, and OpenCode rotates its free list often, so plan for a paid route. These are the official rates we checked on October 17, 2026.
- DeepSeek API direct (pricing): model
deepseek-flash. Peak $0.30 input, $1.20 output, $0.006 cache hit per 1M tokens. Off-peak is exactly half: $0.15, $0.60 and $0.003. - OpenCode Zen paid: $0.30 input, $1.20 output, $0.006 cached read per 1M tokens, paid from a prepaid balance. Zen passes card fees through at 4.4% + $0.30 per top-up.
- OpenCode Go: $10 a month (Go) or $40 (Go Plus). Both include V4.1 Flash, with $80 and $160 of monthly V4.1 Flash usage at the same peak and off-peak token rates.
Vietnam angle: DeepSeek’s peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays. That is 8 to 11 AM and 1 to 5 PM in Vietnam. Evenings and weekends bill at the off-peak rate, so long refactors are cheaper after work.

Common errors and fixes
- 403 FreeTierError – “OpenCode’s free tier can only be used from within OpenCode.” We got this when calling the Zen endpoint with curl. The free model only works through the OpenCode app. Use
opencode run, or switch to a paid key for other tools. - “UnknownError: Unexpected server error” – we got this when we used the paid ID
opencode/deepseek-v4.1-flashwithout connecting a Zen key, and again with a typo (deepseek-v4-1-flash-free). Check the dot in v4.1 and the-freesuffix. - opencode run hangs with no output – in our script it sat silent for about three minutes. Running it from a non-interactive shell left it waiting on stdin. Adding
< /dev/nullfixed it right away. - Context fills up on big repos – the free variant stops at 200K tokens. Point it at specific files with
@mentions, start fresh sessions per task, or move to the 1M-context paid route. - Old model names – on DeepSeek’s API,
deepseek-v4-flashanddeepseek-v4-procurrently route to V4.1 Flash and bill at Flash rates. Switch todeepseek-flashso nothing breaks when DeepSeek retires the aliases.
Our take
For side projects, learning, and trying an agent workflow before paying, the free model is the easiest zero-cost route into a capable coding agent we’ve seen this month. OpenCode also says this provider keeps no data and does not train on it, which is not true of every free model on its list. For client work, CI pipelines, or anything that needs the full 1M context, go straight to DeepSeek’s API and schedule heavy jobs off-peak. See our DeepSeek V4.1 Flash tool page for the model itself, our best AI agents for coding roundup for alternatives to OpenCode, and best local AI models if you’d rather keep code on your own machine.
Frequently asked questions
Is DeepSeek V4.1 Flash really free in OpenCode?
Yes, for now. OpenCode’s Zen docs list DeepSeek V4.1 Flash Free at $0 for input, output and cached reads, “for a limited time” with no end date. We ran it on October 17, 2026 without signing in or adding a card.
What is the model ID?
Inside OpenCode use opencode/deepseek-v4.1-flash-free. The paid Zen version is opencode/deepseek-v4.1-flash. On DeepSeek’s own API the model name is deepseek-flash.
What are the limits of the free version?
OpenCode’s model catalog gives the free variant a 200K-token context window and 32K output tokens. The paid DeepSeek route offers 1M context and up to 384K output. The free model also only answers requests that come from the OpenCode app.
Can I call the free model from my own scripts?
No. A direct API call returns HTTP 403 with FreeTierError: “OpenCode’s free tier can only be used from within OpenCode.” You can still script it with opencode run, which goes through the app.
How much does DeepSeek V4.1 Flash cost if I pay?
DeepSeek’s API charges $0.30 input and $1.20 output per 1M tokens at peak, half that off-peak. OpenCode Zen’s paid version is $0.30 / $1.20. OpenCode Go starts at $10 a month with V4.1 Flash included.
Does the free model train on my code?
OpenCode says the DeepSeek V4.1 Flash Free provider follows a zero-retention policy and does not use your data for training. That is not true of every free model on Zen, so check the privacy section before switching.
Found this useful? Share it with someone comparing AI tools.