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.
- Token Harbor Free Allowance - Free weekly allowance of DeepSeek V4.1 Flash, MiMo V2.6 Flash, and TH-Rudder · verified
- OpenRouter Free AI Models - Free :free chat, embedding and rerank models at $0 through OpenRouter's API · verified
- Groq Free Tier - Free rate-limited Groq API access to hosted open models, no card · verified
- Google Gemini Developer API Free Tier - Free Gemini API tier with rate-limited access to Flash models and Gemini 2.5 Pro · verified
- 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
:freesuffix, 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:
- Launch OpenCode in your terminal or open the OpenCode desktop application.
- Run the
/connectcommand to launch the provider authentication wizard. - Select your provider or choose a custom OpenAI-compatible endpoint.
- Enter your API key when prompted. OpenCode securely stores credentials in your local environment.
- Use the
/modelscommand 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
:freelineups 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.
- Cline setup guide: For running the Cline VS Code extension with zero-cost models, check how to use an AI coding agent for free.
- Directory of coding tools: Browse our verified free AI coding tools directory for editors, agents, and router promotions.
Offers in this guide
| Offer | Free part | Who can claim | Card | Ends | Checked |
|---|---|---|---|---|---|
| Token Harbor Free Allowance | Free tier | Anyone | No card | No end date | |
| OpenRouter Free AI Models | 50 requests/day | Anyone | No card | No end date | |
| Groq Free Tier | Free tier | Anyone | No card | No end date | |
| Google Gemini Developer API Free Tier | Free tier | Anyone | No card | No end date | |
| AgentRouter Free Credits | $25 | Anyone | No card | No 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.
More guides
- Is Claude Free?
- Is GitHub Copilot Free?
- Is Cursor Free?
- Is Perplexity Pro Free?
- Is ElevenLabs Free?
- Is Runway Free?
- Is Hailuo AI Free?
- Is Leonardo AI Free?
- How to Get a Free Gemini API Key
- How Students Can Get ChatGPT Plus Free
- Free Alternatives to ChatGPT Plus Features
- How Students Can Get Google Gemini (AI Pro) Free
- How to Use an AI Coding Agent for Free
- Free API for Claude Code and Cline: Compatible Providers
- How to Get a Free GPU for AI
- How to Apply for AI Startup Credits
- How to Get Free Claude API Credits
- How to Get a Free Groq API Key
- Free AI Image Generation: In the Browser and by API
- Free OpenAI API Access in 2026: What's Actually Free
- Free Embeddings and Reranking APIs in 2026
- Free Text-to-Speech APIs in 2026
- Free Speech-to-Text APIs in 2026
- Free AI Video Generators in 2026
- Free Image Generation APIs in 2026
- Free Web Search APIs for LLM Agents in 2026
- Free Vector Databases for RAG in 2026
- Free DeepSeek API in 2026: What Is Actually Free
- Free Qwen, GLM and Kimi API in 2026: Where They Are Free
- Free Mistral API in 2026: Studio Free Mode, Codestral and Vibe
- Free Llama API in 2026: Where Llama Is Still Free
- Free Grok API in 2026: What xAI Actually Offers
- OpenRouter Free Models: Limits, Credits and API Setup
- Free Hugging Face Inference: Credits, ZeroGPU and Spaces
- Free AI APIs With No Credit Card in 2026
- Track Free-Tier Changes Automatically
- How to Run AI Locally for Free
- Free Vision APIs: Read Images and Screenshots for Free
- Free Reasoning Model APIs: Thinking Models for Free
- Free Translation APIs in 2026: DeepL, Google, Azure, Amazon and LLMs
- Free AI for Teachers in 2026: Lesson Planning, Grading and Slides
- How to Run an AI Agent for $0 in 2026: Models, Search and Vector DB
- Free AI for Nonprofits in 2026: Google, Microsoft, Canva, OpenAI and Claude
- Free AI Coding Tools for Students in 2026: Copilot, JetBrains, Cursor and More
- How to Fine-Tune an LLM for $0 in 2026: Colab, Kaggle and Unsloth
- Best Free AI APIs for Vietnamese in 2026: Benchmark Scores and Free Tiers
- Free AI Writing Assistants in 2026: ChatGPT, Gemini, Claude, Notion AI, Grammarly and Copilot
- Free AI Chat Without Login in 2026: Duck.ai, ChatGPT, Gemini, Perplexity, Copilot and HuggingChat
- Free Web Scraping APIs in 2026: Firecrawl, ZenRows, ScraperAPI, Jina Reader, Apify and More
- Free OCR and Document AI APIs in 2026: Google Document AI, Azure, AWS Textract, Mistral OCR, Tesseract
- Free AI Music Generators in 2026: Suno, Udio, Stable Audio, ACE-Step and What You May Do With the Songs
- Free Hosting for AI Apps in 2026: Vercel, Cloudflare, Hugging Face Spaces, Render, Fly.io, Cloud Run
- Free AI for Data Analysis in 2026: ChatGPT, Claude, Google Colab and Kaggle
- Free AI Presentation Makers in 2026: Gamma, Pitch, SlidesAI and Beautiful.ai Compared
- Free AI Research Tools in 2026: Elicit, Semantic Scholar, NotebookLM, Consensus and Scite
- Best Free AI APIs for Spanish, Portuguese and Indonesian in 2026: Published Scores and Free Tiers
- Free AI for Job Seekers in 2026: Resume, Cover Letter and Interview Practice
- Free AI Credits for Hackathons: No Card, No Waiting
- Free AI Voice Generators in 2026
- Free AI Image Editors in 2026
- Free AI Subtitle Generators in 2026
- Free AI courses