AI CODING · FREE MODELS
Free Models in OpenCode: Built-in Freebies, Free APIs and Local Models
OpenCode is an open-source AI coding agent for the terminal. It ships a set of limited-time free models and can connect to almost any model provider with /connect. There are three ways to run it for free: the built-in free models, the free tiers of hosted APIs, and models running on your own machine.
The short answer: built-in first, one free API as backup
- Easiest
- Install OpenCode and pick a model marked Free in /models. The official table listed 11 on 4 Dec 2026, all free for a limited time and only inside the OpenCode client.
- Longer-term free
- OpenRouter's :free models, NVIDIA NIM, Groq's Free plan and the Gemini API free tier are rate-limited but have no end date; local Ollama has no cap beyond your hardware.
- The big catch
- Free models can disappear any day and some keep your data during the free period. Keep company code and secrets off free tiers, and hold a pay-as-you-go API in reserve for work that matters.
Reading the limits: RPM, RPD and TPD
Free tiers almost all limit by these measures, and a coding agent fires many requests per task.
RPM is requests per minute, RPD requests per day, and TPM / TPD tokens per minute / per day. A coding agent sends a stream of requests as it reads files, edits code and calls tools, so a 50-a-day cap can be gone after one or two tasks. Check RPD and TPD first, then RPM.
- Limited-time freeOpenCode's built-in Free models and launch promotions: nothing else to sign up for, but they can turn paid or vanish at any time.
- Standing free tiersOpenRouter, NIM, Groq, Gemini, Cloudflare and Zhipu's Flash models: no end date, capped by RPM, RPD, TPD or a daily allowance, and the rules still change.
- One-off creditNew-user grants such as Volcengine Ark's: gone once spent, fine for a trial, not for everyday use.
- Local modelsOllama runs on your own computer with no request cap; the cost is VRAM, RAM and model size.
Global providers: seven free options
Ordered from easiest to set up; the sign-up notes column lists what each provider asks for, and anything we haven't confirmed is marked unverified.
| Provider | Free allowance | Limits | Sign-up notes | Source |
|---|---|---|---|---|
| OpenCode built-in free models | 11 limited-time free models | OpenCode client only; 5 of them, Big Pickle included, retain data while free | Login requirement unverified | OpenCode docs |
| OpenRouter :free models | $0 on any :free model | 20 a minute; 50 a day under 10 credits bought, 1,000 a day at 10+ | Account and API key | OpenRouter limits |
| NVIDIA NIM | Free prototyping, OpenAI-compatible | Most models up to 40 a minute, no card | No card; phone check unverified | NVIDIA FAQ |
| Groq Free | gpt-oss-120b, gpt-oss-20b, qwen3.8-27b | Each 30 RPM, 1K RPD, 8K TPM, 200K TPD | No payment on the Free plan | Groq rate limits |
| Gemini API free tier | Gemini 4 Hydrogen, 3.8 Flash and three more | 4 Carbon/Neon/Argon and 3.1 Pro Preview aren't free; free-tier content helps improve Google products | Not offered in China or Hong Kong; some projects need verification | Pricing, Regions |
| Cloudflare Workers AI | 10,000 Neurons a day | DeepSeek, GLM and Kimi need a paid plan | Cloudflare account | Cloudflare pricing |
| Ollama local models | Unlimited on your own machine | Bound by your VRAM and RAM; Ollama's cloud models are paid | No account for local models | Ollama pricing |
China-based providers: three free options and one paid reference
Most China-based platforms ask for a phone number and real-name ID checks; DeepSeek isn't free and is listed as a pay-as-you-go reference.
Allowances come from official docs; check each sign-up page for its phone and ID requirements.
| Provider | Free allowance | Limits | Sign-up notes | Source |
|---|---|---|---|---|
| ModelScope | Free API-Inference, OpenAI-compatible | Points per call 0.5/1/2; 200 a day for logging in, 50 more for linking Aliyun (for now) | Aliyun account link and real-name ID check | ModelScope docs |
| Zhipu BigModel | GLM-4.7-Flash (200K) and three more Flash models | Also GLM-4-Flash-250414, GLM-4.6V-Flash, GLM-4.1V-Thinking-Flash; GLM-5.3-Flash is paid | BigModel account | Zhipu pricing |
| Volcengine Ark | 500k tokens per model for new users | One-off; activate the model service first | Real-name ID check after activation | Ark docs |
| DeepSeek API (paid reference) | deepseek-flash input (cache miss) $0.15–0.30/M, output $0.6–1.2/M | Not free; half price off-peak | New-user credit and ID check unverified | DeepSeek pricing |
Connecting them in OpenCode
- Built-in free models: open OpenCode, run /models and pick one marked Free. Whether an OpenCode sign-in is needed is unverified.
- Providers already in the catalog (OpenRouter, Groq, DeepSeek and others): run /connect, choose the provider, enter its API key, then pick a model in /models. OpenRouter also reads OPENROUTER_API_KEY from the environment.
- OpenAI-compatible providers such as NVIDIA NIM (integrate.api.nvidia.com/v1) or ModelScope: add a custom provider under providers in opencode.json with the openai-compatible package, its baseURL and the model IDs.
- Local Ollama: run ollama serve and pull a model; OpenCode probes 127.0.0.1:11434 and lists it in /models with no account to connect.
- To hide the built-in free models, set OPENCODE_DISABLE_FREE_MODELS=1.
Three setups: easy, mixed, quality first
- Easy: built-in free models onlyNo other sign-ups; rotate through /models and switch when one is removed or hits its limit. Good for trying OpenCode out.
- Mixed: built-in, one free API and localUse the built-in models day to day, connect one of OpenRouter, Groq or a Zhipu Flash model as backup, and hand small edits to local Ollama to save hosted quota.
- Quality first: pay-as-you-go, free as backupMake a pay-as-you-go API such as DeepSeek the main model and keep free tiers for minor jobs; the bill stays predictable and a vanished free model can't stall you.
Caveats and open questions
We don't cover getting around rate limits, mass sign-ups or calling the free models from other tools; those can get an account or IP blocked.
- Free models get pulledEvery free model in OpenCode's table is marked limited-time; common reports say a given model stops being free after weeks or months.
- Data retentionBig Pickle, Tidepool Alpha, Seaglass Alpha, Iceman and Flint 40B retain data while free (Flint 40B for 30 days); keep company code, keys and personal data out.
- 403 and 429 errorsCommon reports: some network or data-centre IPs get a 403 on the built-in free models, and per-IP limits bring 429s sooner. Switch to another API or a local model when it happens.
- Context may be shorterCommon reports say some free variants have shorter context than the paid ones (unverified), so large-repo tasks can get cut off.
- Negative OpenRouter balanceOpenRouter says a negative balance returns 402 even on :free models.
- Gemini and Cloud creditGoogle Cloud's $300 new-user credit can't pay for the Gemini API; usage beyond the free tier is billed separately.
- Free Token Speed (token-speed-patrol)A community project that uses GitHub Actions to test free models on OpenRouter, NIM, OpenCode and others on a schedule; not official, and not checked by us.
Sources
- Console ModelsFree model list, limited-time notes, data retention and OPENCODE_DISABLE_FREE_MODELS.
- Providers/connect, /models, custom OpenAI-compatible providers, Ollama discovery and OPENROUTER_API_KEY.
- API Rate Limits:free models at 20 a minute, 50 or 1,000 a day, and 402 on a negative balance.
- Rate LimitsRPM, RPD, TPM and TPD per model on the Free plan.
- Gemini API pricingWhich models have a free tier and how free-tier content is used.
- build.nvidia.com FAQFree prototyping, 40 requests a minute and no card.
- Workers AI pricing10,000 free Neurons a day and models that need a paid plan.
- API-Inference limitsPoints per call, daily grants and the Aliyun account link.
- BigModel pricingFree Flash models and which ones are paid.
- Ark free inference quota500k tokens per model for new users and how to activate.
Sources: Each provider's official docs, read 4 Dec 2026; items marked as common reports aren't confirmed by the provider, and anything not stated is marked unverified.