Run DeepSeek V4 Flash for free via OpenCode in 5 minutes
Install a terminal AI agent, connect free DeepSeek credits, and make your first request to the model - no card or subscriptions required.
- 1.Open a terminal (Terminal on macOS/Linux, PowerShell on Windows) and install OpenCode with a single command: curl -fsSL https://opencode.ai/install | bash. Wait for the success message and check the version with opencode --version.
If curl is not installed, on Windows use the PowerShell installation option from the opencode.ai/docs page. You need Node.js version 20+ installed.
OpenCode ↗About this tool - 2.Sign up on the DeepSeek platform at platform.deepseek.com (sign in with Google or email). In the API Keys section, click Create new key and copy the value - it is only shown once.
Never paste your API key into public chats, screenshots, or GitHub repositories. Store it in an environment variable, not in your code.
DeepSeek Platform ↗ - 3.In the same terminal, export the key to the environment: export DEEPSEEK_API_KEY=your_key (macOS/Linux) or $env:DEEPSEEK_API_KEY="your_key" (PowerShell). Then run opencode - it will automatically pick up the deepseek provider.
To persist the key across sessions, add the export line to your ~/.zshrc or ~/.bashrc file. On Windows, use setx DEEPSEEK_API_KEY "your_key".
OpenCode ↗About this tool - 4.In the OpenCode interface, type /models, select the deepseek provider and the deepseek-v4-flash model. Confirm your choice - the model name will appear in the status bar at the bottom.
If the model is not listed, update OpenCode to the latest version: opencode upgrade. Pick the model name from the OpenCode dropdown, not from memory.
OpenCode ↗About this tool - 5.In the OpenCode input box, paste the prompt below, replacing the text in square brackets with your own task, and press Enter. The model's response will appear within a few seconds.
OpenCode can read files from the current folder: provide a path in the prompt, such as ./main.py, and the agent will pull in the content automatically.
OpenCode ↗About this toolPromptExplain what this code does in plain language and list any bugs or risks: [paste_your_code_or_file_path_here]
What this prompt doesThe prompt asks the model to explain in plain words what your code does and point out any errors or risks. Replace [paste_your_code_or_file_path_here] with a code snippet or a file path, e.g. ./app.py.
- freeOpenCodeOpenCode is a free open-source tool that runs on your computer with no limits on the number of requests.
- APIDeepSeek APINew DeepSeek accounts receive welcome credits for testing; once they run out, billing follows API rates. Check the exact bonus amount and current rates on the DeepSeek pricing page - do not rely on outdated numbers.
Why today
AI services change fast - interfaces and free limits may differ from what's described.