Deal Hunter Global deals · verified daily
中文

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.

Last verified 2026-12-04 Official provider docs

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.

ProviderFree allowanceLimitsSign-up notesSource
OpenCode built-in free models11 limited-time free modelsOpenCode client only; 5 of them, Big Pickle included, retain data while freeLogin requirement unverifiedOpenCode docs
OpenRouter :free models$0 on any :free model20 a minute; 50 a day under 10 credits bought, 1,000 a day at 10+Account and API keyOpenRouter limits
NVIDIA NIMFree prototyping, OpenAI-compatibleMost models up to 40 a minute, no cardNo card; phone check unverifiedNVIDIA FAQ
Groq Freegpt-oss-120b, gpt-oss-20b, qwen3.8-27bEach 30 RPM, 1K RPD, 8K TPM, 200K TPDNo payment on the Free planGroq rate limits
Gemini API free tierGemini 4 Hydrogen, 3.8 Flash and three more4 Carbon/Neon/Argon and 3.1 Pro Preview aren't free; free-tier content helps improve Google productsNot offered in China or Hong Kong; some projects need verificationPricing, Regions
Cloudflare Workers AI10,000 Neurons a dayDeepSeek, GLM and Kimi need a paid planCloudflare accountCloudflare pricing
Ollama local modelsUnlimited on your own machineBound by your VRAM and RAM; Ollama's cloud models are paidNo account for local modelsOllama 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.

ProviderFree allowanceLimitsSign-up notesSource
ModelScopeFree API-Inference, OpenAI-compatiblePoints 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 checkModelScope docs
Zhipu BigModelGLM-4.7-Flash (200K) and three more Flash modelsAlso GLM-4-Flash-250414, GLM-4.6V-Flash, GLM-4.1V-Thinking-Flash; GLM-5.3-Flash is paidBigModel accountZhipu pricing
Volcengine Ark500k tokens per model for new usersOne-off; activate the model service firstReal-name ID check after activationArk docs
DeepSeek API (paid reference)deepseek-flash input (cache miss) $0.15–0.30/M, output $0.6–1.2/MNot free; half price off-peakNew-user credit and ID check unverifiedDeepSeek pricing

Connecting them in OpenCode

  1. Built-in free models: open OpenCode, run /models and pick one marked Free. Whether an OpenCode sign-in is needed is unverified.
  2. 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.
  3. 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.
  4. 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.
  5. 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

Stay within the rules

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.

Sources

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.