On October 15, 2026, OpenCode posted on X: “DeepSeek V4.1 Flash is now free in OpenCode.” The model ID is opencode/deepseek-v4.1-flash-free, and the OpenCode Zen docs say it “is free on OpenCode for a limited time.” We installed a clean copy of OpenCode on October 16, picked the model with no sign-in and no API key, and watched it write and run a small Node.js script in 32 seconds.
Three limits come with the deal. The free model works only inside the OpenCode app, not as an API. It caps context at 200K tokens, where the paid version takes 1M. And OpenCode hasn’t published an end date. This guide covers setup, what each limit means for your work, and what the same model costs once you need it in your own code. For background on the model itself, read what DeepSeek V4.1 Flash is. If that code calls an API, Apidog CLI lets the same agent test it from the terminal.
What OpenCode is giving away
DeepSeek V4.1 Flash went GA on DeepSeek’s API on September 10, 2026, with MIT-licensed weights. OpenCode serves it through its own model gateway, OpenCode Zen, in a free version and a paid one. Here is how they compare with the other paid routes to the same model:

| Route | Price | Context / max output | Where it works |
|---|---|---|---|
OpenCode, deepseek-v4.1-flash-free |
$0 for a limited time | 200K / 32K tokens | Inside OpenCode only |
OpenCode Zen, deepseek-v4.1-flash |
$0.30 in / $1.20 out per 1M tokens | 1M / 384K | Any client with a Zen API key |
| OpenCode Go plan | $10 a month; $80 monthly usage limit for this model | 1M / 384K | Inside OpenCode |
DeepSeek API, deepseek-flash |
$0.15 in / $0.60 out per 1M off-peak | 1M / 384K | Any client |
The context and output limits come from the model metadata OpenCode ships, which you can print with opencode models opencode --verbose. Prices come from the Zen docs, the OpenCode Go docs and DeepSeek’s pricing page, checked on October 16.
How to use DeepSeek V4.1 Flash free in OpenCode
New to the tool? Our OpenCode overview covers what the agent does. Setup takes three steps.
1. Install OpenCode
The official install script works on macOS and Linux:
curl -fsSL https://opencode.ai/install | bash
You can also use npm install -g opencode-ai or brew install anomalyco/tap/opencode. On Windows, OpenCode recommends WSL; Chocolatey (choco install opencode) and Scoop (scoop install opencode) packages exist too.
2. Pick the free model
Open a project and start the agent:
cd ~/code/orders-service
opencode
Type /models and choose DeepSeek V4.1 Flash Free. To make it the default for a project, add an opencode.json file at the project root:
{
"$schema": "https://opencode.ai/config.json",
"model": "opencode/deepseek-v4.1-flash-free"
}
3. Run a task
Work in the interactive session, or send a one-shot task from your shell:
opencode run -m opencode/deepseek-v4.1-flash-free \
"Create status.js exporting isClientError(code) for 4xx codes, add a node:assert self-test, then run it"
What our test showed
We ran OpenCode 1.19.2, the opencode-ai npm release on October 16, with empty config and data directories. opencode models opencode listed deepseek-v4.1-flash-free among ten free models. A one-line question came back in 5 seconds. The task above took 32 seconds: the model wrote status.js, ran it with node, and reported all tests passed. Both the file-write and shell tools worked.
Nothing asked us to sign in. The Zen docs describe signing in to the Console, adding billing and copying an API key, but those steps cover Zen’s paid models; the free one ran without them.
OpenCode’s metadata lists three reasoning-effort variants for the model (low, high and max) and enables image input, so you can attach a screenshot of a failing UI. PDF input is off.
The limits behind “free”

It works only inside OpenCode
The Zen docs list the free model next to an OpenAI-compatible endpoint, which makes it look like a free API. It isn’t one. Call it from anything other than OpenCode and the gateway refuses:
curl https://opencode.ai/inference/openai/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "deepseek-v4.1-flash-free", "messages": [{"role": "user", "content": "ping"}]}'
{"type":"error","error":{"type":"FreeTierError","message":"OpenCode's free tier can only be used from within OpenCode. Download it at https://opencode.ai and keep building."}}
We got HTTP 403 on October 16, with and without an Authorization header. So the free tier covers coding in OpenCode. Your app’s backend, your own scripts that call an LLM, and other agents like Cursor or Claude Code can’t use it.
Some community plugins route other tools through a local opencode serve process so the request comes from OpenCode. They depend on behavior OpenCode hasn’t documented, and the gateway check can change on any release.
The context is 200K, not 1M
The paid model accepts 1M tokens of context and returns up to 384K. The free one stops at 200K in and 32K out. 200K covers most coding sessions. It runs out sooner on a large monorepo or a long session that reads many files, and 32K caps how much code one response can generate. When a task needs the full window, switch that session to the paid model with /models.
It’s free for a limited time, with no end date
OpenCode has run this kind of promotion before. An earlier deepseek-v4-flash-free model sat in Zen’s free list until its promotion ended. By August 21, 2026, it had left the model picker, and an OpenCode bot confirmed on GitHub issue #43805 that the removal was intentional, not a bug.
Expect the same ending here. Keep the model name in opencode.json, not in scripts, so moving to a paid model is a one-line edit.
Privacy is better than most free options
Free models in OpenCode’s list don’t all treat your code the same way. For DeepSeek V4.1 Flash Free, the Zen docs say the provider “follows a zero-retention policy and does not use your data for model training.”
That isn’t true of every free model there. Big Pickle and the MiMo models note that collected data “may be used to improve the model,” and NVIDIA’s Nemotron trials tell you not to submit personal or confidential data. For a private repo, the DeepSeek model is one of the safer free picks. OpenCode says all Zen models are hosted in the US and EU.
No published rate limits
Neither the Zen docs nor the Console docs state a request limit for free models. OpenCode doesn’t promise the free endpoint will match the paid one’s speed or availability, so expect slowdowns when demand spikes.
What the same model costs when you need the API
When the model has to run inside your product, pick a paid route. DeepSeek’s own API is the cheapest per token: $0.15 per 1M input tokens and $0.60 per 1M output tokens off-peak. Both double during peak hours (Monday to Friday, 01:00 to 04:00 and 06:00 to 10:00 UTC), and cache hits cost $0.003 per 1M off-peak. Zen’s paid deepseek-v4.1-flash charges a flat $0.30 and $1.20, the same as DeepSeek’s peak rate, and one Zen key reaches every model on the gateway.
Here’s the math for an agent turn with 20,000 input tokens and 2,000 output tokens:
- DeepSeek API, off-peak: 0.02 x $0.15 + 0.002 x $0.60 = $0.0042
- OpenCode Zen, paid: 0.02 x $0.30 + 0.002 x $1.20 = $0.0084
A thousand of those turns cost $4.20 or $8.40 before any cache discount. If you code in OpenCode every day and the free promotion ends, the Go plan is the middle option: $10 a month, an $80 monthly usage limit for this model, and OpenCode’s estimate of about 173,330 requests a month.
For peak and cache math in detail, see our DeepSeek V4.1 Flash pricing guide. For request code in several languages, see how to use the DeepSeek V4.1 Flash API.
Let OpenCode test the API with Apidog CLI
The free model can do more than write code. It can test the endpoints that code calls, from the same terminal, so nobody opens a GUI to click Send. Apidog CLI gives it commands to read your API spec, write test cases and run them. Set it up once:
npm install -g apidog-cli@latest
apidog login --with-token <YOUR_TOKEN>
npx -y skills add https://apidog.com # pick your agent when prompted
The token comes from Apidog under Account Settings, API Access Token. The last line installs Apidog’s agent skills, which teach OpenCode how to drive the CLI. Then give the agent one prompt:
Use Apidog CLI on project <id>. Export the /orders endpoints as OpenAPI and write a
typed TypeScript client from them. Then create a test case for POST /orders that
asserts a 201 and an order id, run it against the dev environment, and summarize
any failures.
These are the commands it runs, checked against Apidog CLI 2.2.7:
apidog export --project <id> --format openapi --output ./openapi.json
apidog cli-schema get test-case-create
apidog cli-schema validate test-case-create --file case.json
apidog test-case create --project <id> --file case.json
apidog run --test-case <caseId> --project <id> -e <envId> -r cli,json
Exporting the spec first means the client matches the API your team designed, not field names the model guesses. Every command returns JSON, and many include agentHints.nextSteps, so the agent knows what to run next. If the CLI refuses a write on your main branch, enable External AI Edit Permissions in the app’s AI feature settings, or have the agent work on an AI branch (apidog branch create --project <id> --type ai --name ai/orders-tests --from main). The same apidog run line with -r junit drops into CI; our Apidog CLI CI/CD pipeline has a copy-paste version.
FAQ
Is DeepSeek free in OpenCode? Yes. DeepSeek V4.1 Flash (opencode/deepseek-v4.1-flash-free) has been free in OpenCode since October 15, 2026. OpenCode calls it a limited-time offer and hasn’t given an end date.
Do I need an OpenCode account or API key? Not in our test. A fresh OpenCode 1.19.2 install ran the free model with neither. Zen’s paid models need an API key from the OpenCode Console.
Can I call the free model from my own code? No. Requests from outside OpenCode get a 403 FreeTierError. Use DeepSeek’s API or Zen’s paid deepseek-v4.1-flash instead.
Is it the full DeepSeek V4.1 Flash? OpenCode lists it in the same deepseek-flash family as the paid model, with lower limits: 200K context and 32K output instead of 1M and 384K. OpenCode hasn’t said whether anything else differs.
Does OpenCode train on my code when I use it? The Zen docs say this model’s provider keeps zero data and doesn’t train on it. Other free models in the list have different terms, so check before you switch.
Are there other ways to use V4.1 Flash for free? Yes: the MIT-licensed weights and DeepSeek’s chat app. Our guide to every free option for DeepSeek V4.1 Flash ranks them, and Is DeepSeek free? covers the whole model line.
Use it while it lasts
The free model passed our file-and-shell test in 32 seconds, and it costs $0 as long as you stay inside OpenCode and under 200K tokens. Install OpenCode, set opencode/deepseek-v4.1-flash-free as your model, and add Apidog CLI so the same agent tests what it builds. Keep the model name in opencode.json, and the end of the promotion becomes a config change. Download Apidog to open the test reports your agent uploads with --upload-report.



