Knowledge Base Sections ▾
Navigation
▸ Start here By rolesCategories
- OpenCode: free models, providers and API key
- Cursor + Gonka AI - cheap LLM for coding
- Claude Code + Gonka AI - LLM for the terminal
- DeepSeek Harness: Your Own Provider via JoinGonka Gateway
- Codex CLI: your own key instead of a subscription
- Pi + JoinGonka Gateway — terminal agent on cheap inference
- omp (Oh My Pi) + JoinGonka Gateway: an agent with model roles
- Zoo Code + JoinGonka Gateway: Migrating from Roo Code to Gonka models
- Kilo Code + Gonka AI — AI-Agent in VS Code
- ZCode: GLM Coding Plan tiers, prices and limits
- Hermes Agent + DeepSeek on the Gonka network — an autonomous agent for pennies
- OpenClaw + Gonka AI - affordable AI agents
- Continue.dev + Gonka AI - AI for VS Code/JetBrains
- Cline + Gonka AI - AI agent in VS Code
- Aider + Gonka AI - pair programming with AI
- LangChain + Gonka AI - AI applications for pennies
- n8n + Gonka AI - automation with cheap AI
- Open WebUI + Gonka AI - your own ChatGPT
- LibreChat + Gonka AI — open-source ChatGPT
- Roo Code + Gonka AI — Autonomous AI Agent in VS Code
- LlamaIndex + Gonka AI — RAG applications for pennies
- PydanticAI + Gonka — typed AI agents for pennies
- Vercel AI SDK + Gonka AI — AI applications in TypeScript for pennies
- TanStack AI + Gonka — AI applications in TypeScript for pennies
- API quick start — curl, Python, TypeScript
- JoinGonka Gateway — a full overview
- Management Keys — SaaS on Gonka
- How Much Does an AI API Cost: Price Comparison per Million Tokens
- How to buy AI tokens and an API key: 3 methods in 2026
- Free AI API: tokens on sign-up and for referrals
- Cursor Pro request limit reached — breakdown and cheaper alternative
- Cheaper Claude Code: GLM and DeepSeek instead of Claude
- Claude Code + DeepSeek V4 Flash: How to Connect It and What a Task Costs
- Cline is burning money — why the agent spends so much
- OpenClaw is expensive — why the agent burns through tokens and how to save
- OpenRouter alternative: the same models, many times cheaper
- Best AI model for coding in 2026: comparison and prices
- Cheap alternative to GitHub Copilot without limits
- A cheap Windsurf alternative without credits or limits
- The cheapest API for AI agents in 2026
- JetBrains IDE + JoinGonka Gateway — your own endpoint instead of credits
- GitHub Copilot BYOK — own models instead of quotas
- Zed + JoinGonka Gateway — cheap inference in your editor
- MiniMax Code: MiniMax agent with your own key via Gonka
- Warp + JoinGonka Gateway — terminal agent on your own endpoint
- Trae + JoinGonka Gateway — Gonka network models in AI-IDE
- Cherry Studio + JoinGonka Gateway — desktop AI client
- OpenHands + JoinGonka Gateway: agent on your own endpoint
- Qwen Code after the closure of qwen-oauth: working via JoinGonka Gateway
- Goose + JoinGonka Gateway: your own provider and key in the keyring
- Crush + JoinGonka Gateway: Charm agent on Gonka network models
- Kimi Code CLI: Moonshot AI agent on your key via Gonka
- Factory Droid + JoinGonka Gateway: BYOK on Gonka network models
- MiMo Code + JoinGonka Gateway: Xiaomi agent on Gonka network models
Tools
OpenCode: free models, providers and API key
In short: OpenCode itself is free — its code is open under the MIT license. It also ships with free models: as of November 2, 2026 these are GLM-5.3-Flash Free, DeepSeek V4.1 Flash Free, Big Pickle and five more. They need no account, but they only run inside OpenCode and only while the promotion lasts. Any other provider — OpenAI, Anthropic, OpenRouter, a local Ollama or your own OpenAI-compatible API — is connected with the /connect command or a block in opencode.json.
Below is the full list of free models with their terms plus the command that prints today's list; how to pick and switch models; how to connect a provider and where OpenCode stores API keys. JoinGonka Gateway connects with a single command, npx @joingonka/setup --tool opencode: GLM, DeepSeek and MiniMax with pay-per-token billing. Sign up and get 3M free tokens. At the end — what a month of work in OpenCode costs with different providers.
Which models in OpenCode are free
Free models are built into OpenCode: they need no account and no key — just pick one in /models. As of November 2, 2026 there are eight:
| Model | Context | What happens to your data |
|---|---|---|
| GLM-5.3-Flash Free | 200K | The provider doesn't store requests or train models on them |
| DeepSeek V4.1 Flash Free | 200K | The provider doesn't store requests or train models on them |
| Big Pickle | 200K | A model with no named author; requests may be used to improve it |
| MiMo-V2.6-Flash Free | 200K | Requests may be used to improve the model |
| Nemotron 3.5 Lightning Free | 262K | NVIDIA trial access: requests are logged, so don't send personal or confidential data |
| Nemotron 3.5 Super VL Free | 1M | Same terms as Nemotron 3.5 Lightning Free |
| Flint 40B Free | 262K | Requests are stored for 30 days and may be used to improve the model |
| Beam Free | 1M | Doesn't train on requests, stores them for 30 days; not available in every country |
The rules are the same for all eight: they're free for a limited time and only work inside OpenCode itself — you can't call them over the API from another program. The lineup changes every few weeks: some models go paid or disappear, new ones arrive. You can hide free models from the list with the OPENCODE_DISABLE_FREE_MODELS=1 environment variable.
How to get today's list. OpenCode serves its model catalog at a public address, no key required. This command prints the ids of all free models (you'll need jq):
curl -s https://opencode.ai/inference/v1/models | jq -r '.data[] | select(.cost.text.input.price == 0) | .id'The response will include glm-5.3-flash-free, deepseek-v4.1-flash-free, big-pickle and the rest. Inside OpenCode such a model is called opencode/<id>, for example opencode/glm-5.3-flash-free.
How to pick and switch models in OpenCode
You set the model in OpenCode in three ways:
- The
/modelscommand inside OpenCode opens a list of every available model: free ones and models from connected providers. Your choice applies to the current session and doesn't touch the config. The same window opens withCtrl+X, thenM, andF2cycles through recent models. - The default model — the
"model"line inopencode.jsoninprovider/modelformat, for example"model": "joingonka/zai-org/GLM-5.3-Flash". The global config lives in~/.config/opencode/(opencode.jsonoropencode.jsonc), the project one inopencode.jsonat the project root; the project config overrides the global one. - The
--modelflag sets the model for a single run:opencode run --model opencode/glm-5.3-flash-free "Explain this repo".
A coding agent needs a model that calls tools reliably and holds a long history. Free models are fine for trying OpenCode, but GLM-5.3-Flash Free and DeepSeek V4.1 Flash Free have a 200K window and are only free during the promotion. Models from the Gonka network via JoinGonka Gateway — GLM, DeepSeek and MiniMax — come with standard pay-per-token billing, and GLM's window is almost twice as large:
| Model | Context | When to use it |
|---|---|---|
joingonka/zai-org/GLM-5.3-Flash | 390K | Tasks that need thinking: the model reasons before answering, so it takes longer |
joingonka/deepseek-ai/DeepSeek-V4-Flash-0731 | 380K | Everyday work: fast, with the longest output on the network — up to 32,768 tokens; it's the one the installer sets |
joingonka/MiniMaxAI/MiniMax-M2.7 | 180K | Short tasks and quick edits |
All three cost the same, so the choice is about behavior, not money. For more on the models, see our guides to GLM-5.3 Flash and DeepSeek V4 Flash; the current list from the network is served by GET https://gate.joingonka.ai/v1/models.
OpenCode providers: how to connect your own API key
OpenCode pulls its provider list from the open models.dev catalog: it has more than 75 providers — OpenAI, Anthropic, Google Vertex AI, OpenRouter, DeepSeek, Z.ai, Moonshot AI, MiniMax, xAI, Groq, Together AI, Amazon Bedrock, Azure and others. Local models connect through Ollama, LM Studio, llama.cpp or vLLM; OpenCode 2 detects running Ollama, LM Studio and vLLM on its own.
How to connect a provider. Inside OpenCode there's the /connect command: pick a provider, paste your API key, then choose a model in /models. From the terminal, opencode auth login does the same. Where the key is stored depends on the version:
- OpenCode 1 — in the file
~/.local/share/opencode/auth.json; - OpenCode 2 — in its own database
~/.local/share/opencode/opencode.db, the exact path is printed byopencode debug paths db. OpenCode 2 reads theauth.jsonfile only once — when migrating from the first version. Saved keys are listed byopencode auth list.
Subscriptions instead of a key. ChatGPT Plus or Pro, GitHub Copilot — even the free Copilot Free works — and GitLab Duo connect without an API key, with usage drawn from your plan's limits. Anthropic explicitly forbids using a Claude Pro or Max subscription in third-party apps, and OpenCode has had no built-in plugin for it since version 1.3.0.
Your own OpenAI-compatible provider — a gateway or your own server — is described by a provider block in opencode.json: provider id, the @ai-sdk/openai-compatible package, the API address, and models with their context windows. Its key is saved with the same opencode auth login command. A ready-made block for JoinGonka is in the next section.
Your options for paying for models in OpenCode, as of November 2, 2026:
| Option | Cost | What to keep in mind |
|---|---|---|
| Free OpenCode models | $0 | During the promo and only inside OpenCode; GLM-5.3-Flash Free and DeepSeek V4.1 Flash Free have a 200K window |
| GitHub Copilot Free | $0 | The limits and model lineup of GitHub's free plan |
:free models on OpenRouter | $0 | 20 requests per minute and 50 per day; after buying $10 in credits — 1000 per day. An agent spends a request on every step, so 50 doesn't last long |
| Local models (Ollama, LM Studio) | $0 for tokens | You need your own GPU; speed and quality depend on the hardware and the model size |
| OpenCode Console (formerly Zen) | At the provider's price, plus 4.6% and $0.31 on every top-up; GLM-5.3 Flash — $0.15 per 1M input, $0.03 from cache and $0.50 output | Pay as you go; in /connect it's the OpenCode entry |
| OpenCode Go | $10 per month, Go Plus — $40 | A subscription with a monthly dollar limit per model; you can spend no more than 20% of the monthly amount in five hours, 50% in a week |
| OpenRouter (paid models) | GLM-5.3 Flash — from $0.0285 per 1M input and $0.0923 output | Each provider sets its own price and cache discount |
| Official APIs (Z.ai, DeepSeek, MiniMax) | Z.ai: GLM-5.3 Flash — same as Console. DeepSeek: $0.30 per 1M input, $0.006 from cache and $1.20 output at peak hours, half price off-peak | A separate key and balance for each. GLM-5.3 Flash on Z.ai is the same model as on the Gonka network, and since 09/10/2026 DeepSeek has been serving version V4.1 under the name V4 Flash — not the one on the network (V4 Flash 0731). MiniMax closed M2.7 to new users on 10/19 and shuts it down on 11/18/2026 |
| JoinGonka Gateway | $0.0062 per 1M input and $0.019 output, one price for all models | 3M free tokens on sign-up, pay as you go, one key for OpenCode, Claude Code, Codex and Cursor |
How to connect JoinGonka to OpenCode
1. Key. Sign up at JoinGonka Gateway — a new account gets 3M free tokens. In your dashboard, create an API key (format jg-xxx). The same key works in Claude Code, Codex CLI, Cursor, and any OpenAI-compatible client — usage is billed from a single balance.
2. Installer. One command registers the JoinGonka provider in the global OpenCode config — the gateway address and network models with their context windows and output ceilings — and sets DeepSeek V4 Flash as the default model if you haven't picked your own yet:
npx @joingonka/setup --tool opencodeThe installer will ask for the key itself and save it where your version looks for it: in OpenCode 1 — in auth.json, in OpenCode 2 — in its key database, then verify via opencode auth list that OpenCode 2 sees the key. So run the installer after installing OpenCode. If OpenCode 2 appeared after the installer, run the installer again or execute opencode auth login joingonka, choose manual key entry, and paste the key jg-…. Without a key, OpenCode 2 will send the request without authorization and get the error "Demo unavailable — no active billing account for this request". The gateway address, model IDs, and setup for other programs are in the Gonka API documentation.
Set up manually (Plan B)
Step 1 — describe the provider. Add the block below to ~/.config/opencode/opencode.json. Both versions of OpenCode understand this format; in OpenCode 2 the provider key is marked deprecated but is still read.
{
"$schema": "https://opencode.ai/config.json",
"model": "joingonka/deepseek-ai/DeepSeek-V4-Flash-0731",
"provider": {
"joingonka": {
"npm": "@ai-sdk/openai-compatible",
"name": "JoinGonka (Gonka)",
"options": { "baseURL": "https://gate.joingonka.ai/v1" },
"models": {
"zai-org/GLM-5.3-Flash": { "name": "GLM-5.3 Flash", "limit": { "context": 390000, "output": 8192 } },
"deepseek-ai/DeepSeek-V4-Flash-0731": { "name": "DeepSeek V4 Flash", "limit": { "context": 380000, "output": 32768 } },
"MiniMaxAI/MiniMax-M2.7": { "name": "MiniMax M2.7", "limit": { "context": 180000, "output": 8192 } }
}
}
}
}Step 2 — save the key. In OpenCode 2: opencode auth login joingonka and enter the key manually — the key will go into the database ~/.local/share/opencode/opencode.db. In OpenCode 1: opencode auth login, the Other option, provider id joingonka, and the key — it will go into ~/.local/share/opencode/auth.json. The provider must be described before logging in, otherwise OpenCode 2 will respond "Integration not found". The apiKey field does not need to be added to the config.
The limit block is required: without it, OpenCode doesn't know the model's window and won't compress history in time.
Check: opencode run --model joingonka/deepseek-ai/DeepSeek-V4-Flash-0731 "Write a one-line Python function that adds two numbers." — or launch opencode and ask it to write a function. If you got a response, setup is complete. In /models the JoinGonka models should appear, and in opencode auth list — the JoinGonka line.
What a month of working in OpenCode costs
An agent spends tokens differently than a chat: every request includes a system prompt, tool descriptions, files, and history. According to our gateway data for October 2026, the average OpenCode request is about 76 thousand tokens on input and less than a thousand on output. For half of active OpenCode users, a day of work is up to 2.6 million tokens; for one in ten, it's 23 million and more.
Almost the entire agent input repeats from request to request, and providers that have cache pricing charge less for such tokens. So we calculate using OpenCode's own estimate for GLM-5.3 Flash: a typical request has 1,000 new tokens, 55,000 from cache, and 200 on output. A month is 20 working days, and the model is the same everywhere — GLM-5.3 Flash:
| Profile | Tokens per month | Z.ai or Console | OpenRouter, cheapest provider | OpenCode Go | JoinGonka Gateway |
|---|---|---|---|---|---|
| Typical — like half of users | ~52M | ~$1.80 | ~$0.70 | $10 | ~$0.32 |
| Active — like one in ten | ~460M | ~$15.50 | ~$6.20 | $10 | ~$2.90 |
Through the gateway it comes out many times cheaper than at Z.ai and Console, and about twice as cheap as the cheapest provider for such a load on OpenRouter — as of November 2, that's Darkbloom: $0.065 per 1M on input, $0.012 from cache, and $0.18 on output. We don't have a separate cache price, but at prices as of November 2, all input through the gateway costs less than other GLM-5.3 Flash providers charge for cache alone. The amounts are calculated at prices as of November 2, 2026; our per-token price on this page is substituted live and changes with the GNK rate.
The $10 Go subscription only pays off if you almost entirely use up its monthly GLM-5.3 Flash limit: that's about 1.6 billion tokens per month, or 80 million per working day. One in ten of our OpenCode users does 23 million+ per day.
Frequently asked questions
Is OpenCode free? Yes: the program is free and open source (MIT license), and the built-in free models work without an account. You only pay for models from other providers — that's who you pay for tokens.
Which models are free in OpenCode? As of November 2, 2026 — eight: GLM-5.3-Flash Free, DeepSeek V4.1 Flash Free, Big Pickle, MiMo-V2.6-Flash Free, Nemotron 3.5 Lightning Free, Nemotron 3.5 Super VL Free, Flint 40B Free and Beam Free. The list changes — the current one is printed by the command in the section above.
Where do I get an API key for OpenCode? OpenCode itself has no key — the key is issued by the model provider. For Console and Go you create it in the OpenCode Console dashboard, for JoinGonka — in the gateway dashboard (jg-…), for the rest — at the provider. The key is inserted via /connect or opencode auth login.
What is the OpenCode API? That name refers to two different things. The OpenCode Console API is the Console models at https://opencode.ai/inference/… with a key oc_sk_…: you can call them from your own scripts too, except the free ones. And OpenCode itself exposes the HTTP API of its server: it's started by the opencode serve command, and your own clients and SDKs connect to it.
Do I need an OpenCode Go subscription? No. Go is one of the ways to pay for models. With your own provider, for example JoinGonka, no subscription is needed: you pay the provider for tokens.
Does this work in OpenCode 2? Yes: OpenCode 2 reads the same provider block. It stores keys in its own database, and the installer puts the key there itself. If you installed OpenCode 2 after running the installer — run the installer again.
Why isn't JoinGonka in the /connect list? OpenCode takes that list from the models.dev catalog. While we're not there, the provider is described in opencode.json — which is exactly what the installer does.