---
title: "Free Models in OpenCode: Built-in Stealth and Compatible APIs"
slug: "free-models-opencode"
description: "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."
published: "2026-11-12"
updated: "2026-11-13"
verifiedAt: "2026-11-13"
canonical: "https://aifree.dev/learn/free-models-opencode"
---

# 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: 2026-11-13

## 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](https://aifree.dev/offer/token-harbor-free.md): Free weekly allowance of DeepSeek V4.1 Flash, MiMo V2.6 Flash, and TH-Rudder (verified 2026-10-12)
2. [OpenRouter Free AI Models](https://aifree.dev/offer/openrouter-free-models.md): Free :free chat, embedding and rerank models at $0 through OpenRouter's API (verified 2026-11-06)
3. [Groq Free Tier](https://aifree.dev/offer/groq-free-tier.md): Free rate-limited Groq API access to hosted open models, no card (verified 2026-10-12)
4. [Google Gemini Developer API Free Tier](https://aifree.dev/offer/google-gemini-developer-api-free-tier.md): Free Gemini API tier with rate-limited access to Flash models and Gemini 2.5 Pro (verified 2026-11-06)
5. [AgentRouter Free Credits](https://aifree.dev/offer/agentrouter-free-credits.md): Free AI coding credits: $25 per daily check-in and $50 per invite (verified 2026-11-06)

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](https://aifree.dev/offer/token-harbor-free).
- **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](https://aifree.dev/offer/openrouter-free-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](https://aifree.dev/offer/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](https://aifree.dev/offer/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](https://aifree.dev/offer/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](https://opencode.ai/docs/providers).

### 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](https://opencode.ai/docs/config).

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](https://opencode.ai/docs/providers). 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.

## Related guides and tools

- **Free APIs for coding agents:** To configure free endpoints for Claude Code, Cline, and other terminal assistants, read the [free API for Claude Code and Cline guide](https://aifree.dev/learn/free-api-for-claude-code-cline).
- **Cline setup guide:** For running the Cline VS Code extension with zero-cost models, check [how to use an AI coding agent for free](https://aifree.dev/learn/free-ai-coding-agent).
- **Directory of coding tools:** Browse our verified [free AI coding tools directory](https://aifree.dev/free-ai-coding-tools) for editors, agents, and router promotions.

## Offers in this guide

| Offer | Free part | Who can claim | Card | Ends | Checked |
| --- | --- | --- | --- | --- | --- |
| [Token Harbor Free Allowance](https://aifree.dev/offer/token-harbor-free.md) | Free tier | Anyone | No card | No end date | 2026-10-12 |
| [OpenRouter Free AI Models](https://aifree.dev/offer/openrouter-free-models.md) | 50 requests/day | Anyone | No card | No end date | 2026-11-06 |
| [Groq Free Tier](https://aifree.dev/offer/groq-free-tier.md) | Free tier | Anyone | No card | No end date | 2026-10-12 |
| [Google Gemini Developer API Free Tier](https://aifree.dev/offer/google-gemini-developer-api-free-tier.md) | Free tier | Anyone | No card | No end date | 2026-11-06 |
| [AgentRouter Free Credits](https://aifree.dev/offer/agentrouter-free-credits.md) | $25 | Anyone | No card | No end date | 2026-11-06 |

## 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

- https://opencode.ai/docs/providers
- https://opencode.ai/docs/config
- https://tokenharbor.ai
- https://openrouter.ai/models?variant=free
- https://console.groq.com
- https://ai.google.dev/gemini-api/docs/pricing

HTML page: https://aifree.dev/learn/free-models-opencode
