aifree.dev

Free Models in OpenCode: Built-in Stealth and Compatible APIs

Complete guide to free models in OpenCode: built-in stealth models like Cat Jam Free, and free API keys from Token Harbor, OpenRouter, Groq, and Gemini.

Time
10 minutes
You need
OpenCode CLI or OpenCode Desktop · Free API key from Token Harbor, OpenRouter, Groq, or Google AI Studio
Last checked

The short answer

5 offers in this guide are live today, 5 of them with no card required. Start with Token Harbor Free Allowance: Free weekly allowance of DeepSeek V4.1 Flash, MiMo V2.6 Flash, and TH-Rudder.

  1. Token Harbor Free Allowance - Free weekly allowance of DeepSeek V4.1 Flash, MiMo V2.6 Flash, and TH-Rudder · verified
  2. OpenRouter Free AI Models - Free :free chat, embedding and rerank models at $0 through OpenRouter's API · verified
  3. Groq Free Tier - Free rate-limited Groq API access to hosted open models, no card · verified
  4. Google Gemini Developer API Free Tier - Free Gemini API tier with rate-limited access to Flash models and Gemini 2.5 Pro · verified
  5. AgentRouter Free Credits - Free AI coding credits: $25 per daily check-in and $50 per invite · verified

Last checked

Yes, OpenCode offers several free model options today without requiring a credit card. You can use the built-in free tier stealth models or connect verified free API keys from providers like Token Harbor, OpenRouter, Groq, and Google AI Studio.

What is free in OpenCode today #

OpenCode is an open-source, terminal-first and desktop AI coding assistant designed for developer workflows. Unlike proprietary coding tools that gate model execution behind strict subscription walls, OpenCode supports both bundled zero-cost models and any OpenAI-compatible or Anthropic-compatible provider.

Developers running OpenCode have several distinct avenues for zero-cost model execution:

  • Built-in stealth models: OpenCode periodically introduces zero-cost stealth models directly in its model catalog, such as Cat Jam Free. These models appear in the model selector with zero token pricing and require no separate provider subscription or credit card.
  • Token Harbor Free Allowance: Token Harbor provides a rolling free allowance for high-capability coding models including DeepSeek V4.1 Flash, MiMo V2.6 Flash, and TH-Rudder. You can claim an API key without a credit card and route tasks directly through Token Harbor's OpenAI-compatible endpoint. See Token Harbor Free Allowance.
  • OpenRouter free models: OpenRouter hosts a rotating collection of zero-cost models whose identifiers end with the :free suffix, such as Gemma, Nemotron, and MiniMax. OpenRouter accounts require no card, and its endpoint plugs directly into OpenCode. See OpenRouter Free AI Models.
  • Groq Free Tier: Groq serves open-weight models including Qwen and Llama architectures with exceptionally fast inference. Every registered account receives a rate-limited free plan with no payment method required. See Groq Free Tier.
  • Google Gemini Developer API: Google AI Studio provides free developer API keys with generous free token allowances for Gemini Flash models and Gemini 2.5 Pro. See Google Gemini Developer API Free Tier.
  • AgentRouter free credits: AgentRouter grants daily check-in credits intended specifically for coding assistants. You can sign in with GitHub or LinuxDO to accumulate credit for agent workflows. See AgentRouter free credits.

How to connect free models in OpenCode #

OpenCode supports two official configuration methods to connect external models and keys, as documented in the OpenCode Providers documentation.

Method 1: Interactive connection command #

The quickest way to add a provider or switch models is through the built-in interactive commands inside the OpenCode interface:

  1. Launch OpenCode in your terminal or open the OpenCode desktop application.
  2. Run the /connect command to launch the provider authentication wizard.
  3. Select your provider or choose a custom OpenAI-compatible endpoint.
  4. Enter your API key when prompted. OpenCode securely stores credentials in your local environment.
  5. Use the /models command to browse and select the active model for your session.

Method 2: Declarative configuration file #

For persistent team setups or automated environments, you can define your providers declaratively in your opencode.jsonc configuration file, following the OpenCode Configuration specifications.

To add a provider that is not in the /connect list, add it under provider in opencode.json with the OpenAI-compatible package, the base URL from the provider's own dashboard or docs, and the model IDs it lists, as shown in Custom provider. Use only the base URL and model IDs the provider publishes; they change as free lineups rotate.

Limits and the catch #

While these models cost nothing out of pocket, free tiers come with operational trade-offs that developers must anticipate:

  • Rate-limited free tiers: Free providers enforce request and token throttles. When an agent loops through multiple file edits, automated tests, and tool executions, tight per-minute quotas can trigger temporary pauses.
  • Model rotation: Free promotional models and OpenRouter :free lineups rotate over time. A model available this week might be replaced or adjusted next month.
  • Code privacy: Free open models and public proxy endpoints may log prompts or retain telemetry for quality improvement. Do not route proprietary business logic or sensitive secrets through public free tiers without reviewing the provider's privacy policy.

Offers in this guide

OfferFree partWho can claimCardEndsChecked
Token Harbor Free AllowanceFree tierAnyoneNo cardNo end date
OpenRouter Free AI Models50 requests/dayAnyoneNo cardNo end date
Groq Free TierFree tierAnyoneNo cardNo end date
Google Gemini Developer API Free TierFree tierAnyoneNo cardNo end date
AgentRouter Free Credits$25AnyoneNo cardNo end date

Compare in a best list

Frequently asked questions

Is OpenCode completely free to use?
Yes, the OpenCode application itself is open source and free to install. You can run it at no cost using built-in stealth models like Cat Jam Free or by connecting your own free API keys.
Do I need a credit card to use free models in OpenCode?
No, none of the free providers featured in this guide require a credit card during signup. Token Harbor, OpenRouter, Groq, and Google AI Studio all allow free account registration without billing details.
How do I switch the active model in OpenCode?
You can switch models at any time by typing /models in the chat prompt or by configuring the default model entry in your opencode.jsonc file.
What happens when my free API limit is reached?
If you hit a rate limit or daily allowance ceiling, the provider returns a rate limit notification. You can wait for the reset window to clear or switch OpenCode to an alternative free provider.
Can OpenCode connect to locally hosted models?
Yes, OpenCode supports any local server providing an OpenAI-compatible endpoint, such as Ollama or vLLM, allowing completely offline coding assistance.

Sources

Steps and limits were checked against these official pages.

Share:XThreadsLinkedInReddit

More guides

Never miss new offers and news

New tools, credits, and AI news are added regularly. Pick how you want to hear about them.

Telegram channel

Join @aifree_dev and get new free AI offers and news right in your Telegram feed.

Browser notifications

Turn on push notifications and get an alert on this device whenever something new is posted. No account needed.

Email newsletter

A weekly digest of new, changed and expiring free AI offers. Double opt-in, one-click unsubscribe. See the latest issue.

Unsubscribe anytime. Privacy

Frequently asked questions

What is aifree.dev?

aifree.dev helps everyone access AI through a curated directory of free AI tools, API credits, free tiers, and startup programs for coding, image, voice, video, and students - verified regularly.

How are offers presented?

Each offer includes its access details, free models when available, and expiration information when provided. Limited-time deals stay visible so they are easy to compare.

Do education and startup programs need verification?

Yes. Providers usually ask students to verify their status with a school email, student ID, or a program like the GitHub Student Pack, and ask startups to verify company details such as age, funding, or website. Check each offer’s claim page for the exact requirements.

What kinds of free AI offers are listed?

Free tiers and free trials from AI providers, free API credits, startup and student programs, and free tools for coding, image generation, voice, and video.

How can I suggest a tool or report a broken link?

Use the submit form: paste the offer page URL and a short note. A person checks every submission before anything is listed. Broken links and changed terms go through the same form.

Know a good one?

Tell us about an AI tool worth knowing. Found a broken link? We want to hear that too.

Submit an offer