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
Cheaper Claude Code: GLM and DeepSeek instead of Claude
In short: you can keep Claude Code and just switch the model. It works with any Anthropic-compatible address, and through JoinGonka Gateway it's answered by the open models GLM, DeepSeek and MiniMax with pay-per-token billing. Setup is one command: npx @joingonka/setup --tool claude-code.
This is no longer Claude, and we won't pretend nothing changes. Below: how the models differ, what will stop working, and what a month costs. We only compare prices for identical models: GLM and DeepSeek from us and from their official APIs; MiniMax M2.7 isn't in the comparison — MiniMax itself is shutting it down on November 18, 2026. Claude rates are given for reference — comparing different models by price per token isn't fair.
The usage numbers here aren't from forums: they're our gateway's data for October 2026 across Claude Code users.
Why Claude Code burns so many tokens
Claude Code is an agent: at every step it sends the model a system prompt, a description of its tools, the files it needs and the entire session history. So the request ends up huge and the response short. According to our gateway data, one Claude Code request averages around 89 thousand input tokens and under a thousand output: input to output runs about 120 to 1.
Over a day that adds up. Half of active Claude Code users through our gateway hit up to 1.2M tokens a day, and one in ten reaches 20M or more. At those volumes the bill is almost entirely determined by input price, and output price barely matters.
What that costs on Claude itself — for reference, Anthropic prices as of 28.10.2026:
- Subscription. Pro — $20 a month ($17 when paid yearly), Max — $100 or $200. Claude Code is included in all paid tiers, with a shared limit for chat and terminal; there's no Claude Code on the free tier.
- API. Sonnet 5.5 — $2 per 1M input tokens and $10 output, Opus 5.5 — $4 and $20, Haiku 5.5 — $0.10 and $0.50. For Sonnet and Opus, re-reading from cache is 20 times cheaper than regular input.
When your subscription limit runs out mid-task or the API bill grows faster than expected, there are two paths: cut down on context or switch models. This article is about the second.
What replaces Claude and how the models differ
The Gonka network currently has three open models, and Claude Code works with each of them:
| Model | Context | Response up to | How it behaves in the agent |
|---|---|---|---|
| GLM-5.3 Flash (Z.ai) | 390K | 8,192 tokens | Reasons before every answer: takes longer to respond, suited to tasks that need thinking |
| DeepSeek V4 Flash | 380K | 32,768 tokens | Fast, with the longest response on the network — the installer sets it as default |
| MiniMax M2.7 | 180K | 8,192 tokens | Short tasks and quick edits; sometimes shows its reasoning right in the response |
How this differs from Claude — honestly:
- Quality. These are different models. They handle typical work — edits on a clear task, tests, explanations, refactoring — just fine. On long multi-step logic and major overhauls, Claude Opus and Sonnet are stronger. Test them on your own tasks: the starting tokens are enough to see the difference.
- Images. The network's models are text-only: they won't read a screenshot or a diagram in Claude Code.
- Support. Anthropic does not officially support Claude Code working with non-Claude models through gateways. Technically it all works, but with questions — come to us, not to Anthropic support.
- Anthropic account features. While Claude Code connects to a third-party address, Remote Control is off and voice input is unavailable.
What a month costs: the same models at official APIs vs. ours
Let's compare like with like: GLM-5.3 Flash at Z.ai and the DeepSeek model at DeepSeek itself — against the same models through our gateway. Prices per 1M tokens as of 28.10.2026:
| Where | Input | Cached input | Output |
|---|---|---|---|
| Z.ai, GLM-5.3 Flash | $0.15 | $0.03 | $0.50 |
| DeepSeek, V4.1 Flash (peak / off-peak) | $0.30 / $0.15 | $0.006 / $0.003 | $1.20 / $0.60 |
| JoinGonka Gateway, any model on the network | $0.0062 | no separate price | $0.019 |
DeepSeek V4 Flash, which runs on the Gonka network, is no longer sold by DeepSeek itself — it was replaced by V4.1 Flash, so the table shows the closest model. MiniMax M2.7 isn't in the table: MiniMax itself is shutting it down on November 18, 2026, and through the gateway it costs the same as the rest.
Claude Code rereads the same things almost all the time — the system prompt and session history — so an honest calculation accounts for cache. Let's take our usage figures and 20 working days a month:
| Profile | Tokens per month | Z.ai, GLM-5.3 Flash | DeepSeek, V4.1 Flash (peak) | JoinGonka Gateway |
|---|---|---|---|---|
| Typical — like half our users | ~23M | ~$0.90 | ~$0.70 | ~$0.14 |
| Active — like one in ten | ~400M | ~$16 | ~$12 | ~$2.50 |
Assumptions: 95% of input is read from cache, about 1% of tokens goes to output. Without cache, the sums at official APIs would be 4–10 times higher. Our per-token price is plugged into this page live and changes with the GNK rate; the sums in the table are calculated at prices as of 28.10.2026.
Bottom line: the same models through the gateway come out 5–6 times cheaper than at official APIs, and roughly 2.5 times cheaper than DeepSeek off-peak. There's no subscription and no five-hour limits: you pay for actual tokens from your balance.
How to switch Claude Code to JoinGonka
Step 1. Key. Sign up at gate.joingonka.ai/register — after you confirm your address you'll receive 3M free tokens — and create a jg-… key in your dashboard.
Step 2. Installer. A single command configures Claude Code for you:
npx @joingonka/setup --tool claude-codeThe installer asks for your key and writes only its own fields into the env block of ~/.claude/settings.json: the gateway address and the key, the network model for all Claude Code aliases — the main model, opus, sonnet, and subagents (for the haiku alias, used for background tasks — MiniMax M2.7) — and the model's real context window. DeepSeek V4 Flash is installed by default; pick a different model with the --model glm flag (GLM-5.3 Flash) or --model minimax (MiniMax M2.7). At the end the installer verifies your key with a live request. The same installer also configures other programs — there are already 25 of them.
Step 3. Verification. Launch claude and run /status: it shows the gateway address and where the key came from. Then ask a question about the code — for example, “What does this file do?” in the project directory.
Set it up manually (Plan B)
Add an env block to ~/.claude/settings.json — values in this file take precedence over export in the shell:
{
"env": {
"ANTHROPIC_BASE_URL": "https://gate.joingonka.ai",
"ANTHROPIC_AUTH_TOKEN": "jg-your-key",
"ANTHROPIC_MODEL": "deepseek-ai/DeepSeek-V4-Flash-0731",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "deepseek-ai/DeepSeek-V4-Flash-0731",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "deepseek-ai/DeepSeek-V4-Flash-0731",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "MiniMaxAI/MiniMax-M2.7",
"CLAUDE_CODE_SUBAGENT_MODEL": "deepseek-ai/DeepSeek-V4-Flash-0731",
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "380000",
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": "32768"
}
}The address has no /v1: Claude Code appends the /v1/messages path itself. ANTHROPIC_AUTH_TOKEN is sent as the Authorization: Bearer header — exactly how the Claude Code documentation recommends connecting gateways. Without the key variable your subscription isn't replaced: requests go through the gateway, but with your claude.ai login and its limits. Without ANTHROPIC_MODEL, Claude Code sends its own claude-* identifier, and the gateway substitutes the default model.
The last two lines declare the real context window and the response ceiling: without them Claude Code treats an unfamiliar model as having a 200K window and compresses history too late. The values in the example are for DeepSeek V4 Flash; for GLM-5.3 Flash (zai-org/GLM-5.3-Flash) use 390000 and 8192, and for MiniMax M2.7 — 180000 and 8192.
Don't put the key in your project's .claude/settings.json — that file usually gets committed to the repository.
What to keep in mind
- Cache. With official APIs, re-reading from cache costs many times cheaper than a regular input. We don't have a separate cache price — all input is one price, and the month still comes out cheaper (see the calculation above).
- Balance. Payment is pay-as-you-go from your balance, no subscription. When your balance runs out, requests are rejected with code
402until you top up. Daily spend is visible in your dashboard. - One key for all programs. The same key works in OpenCode, Codex CLI, and Cursor, and spend comes out of a single balance.
- To go back to Claude — remove the lines pointing to the gateway from the
envblock in~/.claude/settings.json.
Want to learn more?
Explore other sections or start earning GNK right now.
Try via JoinGonka Gateway →