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
- Cheapest AI API: Provider Comparison 2026
- 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
ZCode: GLM Coding Plan tiers, prices and limits
ZCode is an agentic development environment from Z.ai. The app is free — you pay for the model: five days on the Start Plan trial, then either a GLM Coding Plan subscription with a quota measured in credits, or your own API key. The calculator below converts credits into tokens and works out what the same volume would cost on pay-per-token billing.
ZCode Calculator: plans in tokens and the cost of pay-per-token
The GLM Coding Plan measures usage in credits. The table converts credits into tokens, and below you can see what the same volume costs if you pay per token.
What the GLM Coding Plan includes
| Plan | Price | Credits per week | GLM-5.3 million tokens per month | GLM-5.3-Flash million tokens per month |
|---|---|---|---|---|
| Start Plan (trial) | free, 5 days | — | 15 for the whole period | 25 for the whole period |
| Lite | $18 per month | 10 000 | 279 | 845 |
| Pro | $80 per month | 60 000 | 1 675 | 5 070 |
| Max | $168 per month | 140 000 | 3 907 | 11 830 |
Estimate based on the Z.ai formula: credits = (input × coefficient + cached input × coefficient + output × coefficient) / 10,000. Currently in the calculation: 95% of input tokens are cached, 50% of work happens during peak hours.
Pay-per-token: Z.ai API vs JoinGonka
The same GLM-5.3-Flash model and the same volume. Either way, you pay only for the tokens you use.
| Where to pay | Per month |
|---|---|
| Z.ai API (GLM-5.3-Flash) | $11.50 |
| JoinGonka Gateway (GLM-5.3-Flash) | $1.87 |
GLM-5.3-Flash runs on the Gonka network. JoinGonka doesn't have the flagship GLM-5.3, so its price isn't included in the comparison.
Fine-tune the calculation
At every step the agent resends the conversation history — this part comes from cache. Z.ai assumes 95—98% in its estimates. With JoinGonka, input tokens are paid in full, and the calculation accounts for that.
Work during Z.ai peak hours
Peak is Monday through Friday, 14:00—18:00 Beijing time (UTC+8). Outside peak hours the subscription deducts half as many credits. This doesn't affect pay-per-token.
Z.ai plans, coefficients, and prices verified October 12, 2026 (pricing page · credits formula · API prices ). The JoinGonka price is pulled from the gateway API and updates automatically.
What ZCode is and what the Start Plan trial gives you
ZCode isn't an "editor with a chat panel" — it's an ADE: you describe a goal, the agent builds a plan, edits files, runs checks and repeats until it's done. It's a desktop app for macOS, Windows and Linux; the documentation calls it "ZCode for GLM-5.3".
What it can do:
- ZCode Agent and subagents — a dedicated agentic core that splits a task across several workers;
- Goal mode (
/goal) — long autonomous tasks: planning, execution and step-by-step verification; - Remote control and bot channels — the agent runs on your machine while you answer its questions from your phone;
- Automations and idle-time jobs — non-urgent work can be queued and, for subscribers, runs in the service's spare capacity without using up quota (not available on the trial or with your own key).
The Start Plan trial. It switches on automatically when you sign in to ZCode with your account — no payment needed. For five days straight it gives you 8M tokens a day: 3M on GLM-5.3 and 5M on GLM-5.3-Flash. It's a one-off quota to get acquainted — it doesn't renew after the fifth day. After that you have two options: a GLM Coding Plan subscription or your own API key.
GLM Coding Plan tiers: prices, credits and limits
GLM Coding Plan is a Z.ai subscription. It unlocks the GLM-5.3 and GLM-5.3-Flash models in ZCode and two dozen other tools: Claude Code, Codex, OpenCode, Cursor and more. Prices and quotas on the z.ai/subscribe page as of October 12, 2026:
| Plan | Price per month | Credits per 5 hours | Credits per week |
|---|---|---|---|
| Lite | $18 | 2,000 | 10,000 |
| Pro | $80 | 12,000 | 60,000 (6× more than Lite) |
| Max | $168 | 28,000 | 140,000 (14× more than Lite) |
Pay quarterly and the price drops 20%, annually — 30%: Lite works out to $12.60 per month.
How credits are spent. Z.ai publishes the formula: credits = (input × coefficient + cached input × coefficient + output × coefficient) / 10,000. The coefficients depend on the model:
| Model | Input | Cached input | Output |
|---|---|---|---|
| GLM-5.3 | 6.9 | 1.7 | 24 |
| GLM-5.3-Flash | 2.3 | 0.56 | 8 |
GLM-5.3-Flash burns through quota three times slower than the flagship GLM-5.3. On every step an agent resends the whole conversation history, and almost all of that input comes from cache, so in practice the cache coefficient is what determines your quota. To see how many tokens that means under your workload, use the calculator at the top of the article.
What to know before buying:
- Two counters. The five-hour quota replenishes five hours after you spend it, and the weekly one resets every seven days from the moment of purchase. Run out and you wait for the reset: the subscription never draws from your account balance.
- Peak hours. Monday through Friday, 14:00–18:00 Beijing time (UTC+8), credits are charged at the full rate; the rest of the time they drain twice as slowly.
- Parallel work. Z.ai doesn't state a number of concurrent requests. The rules describe the plans like this: Lite — one project, Pro — one or two, Max — two or more; off-peak the limit is higher.
- The subscription key works only in supported tools and only at a separate coding endpoint. You can't call it from your own script.
- No refunds. Per Z.ai's rules, a paid subscription is non-refundable.
Why the price is in dollars. The service has two platforms with identical plans and capabilities. Z.ai is the international one: prices in dollars, payment by card or via PayPal. BigModel is the platform for China with prices in yuan: according to the ZCode docs, plans there cost ¥118, ¥538 and ¥1,078 per month. You can sign in to ZCode through either one.
Account top-ups and subscriptions are two different things. Your account balance is for paying for API tokens and resource packages. The subscription is paid separately and doesn't draw from the balance.
Using your own API key in ZCode: custom provider
ZCode has built-in BYOK support: you can hook up any service compatible with the OpenAI or Anthropic protocol. Then you pay the provider for tokens, and subscription quotas don't apply to you. There are three ways to reach the setting:
- the Connect button on the start screen → "Set Your API Key";
- Manage Models in the model list;
- the gear icon → Settings → Model Settings → Add Provider.
A provider needs a name, a Base URL and an API Key; models are added with the Add Model button by identifier, and a saved provider has to be switched on with the toggle.
The three most common mistakes:
- Z.ai's endpoints are not interchangeable. The subscription works only through the coding endpoint
https://api.z.ai/api/coding/paas/v4, while the general/api/paas/v4charges your account balance. That's where the "1113 Insufficient Balance" error comes from when your subscription is paid up. - "Works in Claude Code" doesn't mean "works in ZCode." Environment variables like
ANTHROPIC_BASE_URL, which are how you configure Claude Code, aren't read by ZCode: it keeps its own settings store. Set the values in Settings. - The model shows up in the list but doesn't respond. The model list comes from the provider, but availability depends on your key's balance and limits.
Next comes practice: we connect the JoinGonka gateway to ZCode and get GLM-5.3-Flash with pay-per-token billing.
Setting up the JoinGonka Gateway in ZCode: GLM with pay-per-token billing
JoinGonka Gateway is a gateway to the decentralized Gonka network with two protocols: OpenAI-compatible /v1/chat/completions and Anthropic Messages /v1/messages. Pay per token: no five-hour windows, no weekly cap, no peak hours; usage is visible in your dashboard right away, and the gateway does not store request contents.
Step by step (current Custom Provider interface):
| Step | Action |
|---|---|
| 1. Key | Sign up — gate.joingonka.ai/register (new accounts get 3M free tokens), create an API key in the Keys section. More details in the API Quick Start. |
| 2. Provider | ZCode → Settings → Model Settings → Add Provider. Name: JoinGonka |
| 3. Base URL | https://gate.joingonka.ai/v1 |
| 4. API Key | your key in the form jg-… |
| 5. API format | Chat completions (/chat/completions) |
| 6. Model | Add Model → Model ID zai-org/GLM-5.3-Flash; in the Advanced panel set Context window 390000 and Max output tokens 8192. deepseek-ai/DeepSeek-V4-Flash-0731 and MiniMaxAI/MiniMax-M2.7 are added the same way; the current list and limits are at GET /v1/models. |
| 7. Enable | Turn on the provider toggle: a saved provider is disabled, and until you enable it its models won't appear in the list. |
In older versions of ZCode, there are two separate fields instead: OpenAI Base URL (https://gate.joingonka.ai/v1) and Anthropic Base URL (https://gate.joingonka.ai — the client will add the path itself).
Check: select the model you created and ask the agent any question. If you get a response, everything works; error 401 — check your key, 402 — account balance. If "Model request failed" appears on DeepSeek V4 Flash with Thought Level Max — switch to High and repeat the request.
Tip. The command npx @joingonka/setup --tool zcode will print ready-to-use values for these fields — base URL, key, model id and its real limits — and verify with a live request that the gateway accepts them. ZCode itself is configured only through the interface: it has no file that can be safely edited, so the values are pasted in by hand.
GLM prices per token: Z.ai API, OpenRouter and JoinGonka
How much GLM costs when you pay per token (prices per 1M tokens; for Z.ai and OpenRouter — as of October 12, 2026, the JoinGonka price is inserted into the page from the gateway API):
| Where | Input, $/1M | Cached input, $/1M | Output, $/1M |
|---|---|---|---|
| Z.ai API (GLM-5.3) | $1.40 | $0.26 | $4.40 |
| Z.ai API (GLM-5.3-Flash) | $0.15 | $0.03 | $0.50 |
| OpenRouter (z-ai/glm-5.3-flash) | $0.15 | — | $0.50 |
| JoinGonka Gateway (GLM-5.3-Flash) | $0.0062 | $0.0062 | $0.019 |
On the same GLM-5.3-Flash model, JoinGonka's input is 24 times cheaper and output is 27 times cheaper. But an agent takes almost all of its input from cache, and Z.ai's cache is five times cheaper than regular input; with JoinGonka, input is paid in full. So on real workloads the difference is smaller — the calculator at the top of the article works it out.
The GLM Coding Plan subscription isn't in this table: there you don't pay per token, but a fixed sum for a quota in credits. Why the Gonka network price is lower and where the limits of applicability lie — see the article about the cheapest AI API. The JoinGonka row updates itself: all models on the network share a single price.
GLM-5.3-Flash on the Gonka network and frequently asked questions
The Gonka network serves the Z.ai model: zai-org/GLM-5.3-Flash was accepted by governance proposal #101 and is served by the gateway alongside DeepSeek V4 Flash and MiniMax M2.7. The flagship GLM-5.3 is not on the network — the lighter and faster model from the same line was chosen instead.
About the model itself: open weights under the MIT license, a MoE architecture with 320B parameters (18B active per token). This is a reasoning model: it thinks before answering, and that reasoning takes several hundred tokens even for a simple question. So don't lower the response length limit, and for quick edits lower the Thought Level — at the API level that's reasoning_effort: low. For a detailed breakdown of the model and its limits, see the article GLM-5.3 Flash on the Gonka network.
Frequently asked questions:
- Does ZCode have its own API? — ZCode is an app; it doesn't have an API. The API is provided by Z.ai (pay-per-token from your account balance) or any compatible provider you've connected with your own key. A subscription key won't work outside the supported tools.
- What should I do when the five-hour quota runs out? — Wait for the reset or switch the model to your own pay-per-token provider: your subscription settings are not lost.
- How do I pay in JoinGonka? — USDT, a bank card, or GNK. There's no subscription: you top up your balance and spend it per token.
- Who is the subscription right for? — Those who need a fixed payment and the flagship GLM-5.3: it's not on the Gonka network. Pay-per-token suits uneven workloads — you only pay for what you use.
- Why do I sometimes get 429s or a queue on GLM-5.3-Flash? — The model is served by a subset of the network's hosts; during peak minutes a request may wait for a free slot. Try again in a few seconds — the load balancer will find a free node. Current status is on the gateway status page.
- What about privacy? — The gateway does not store the contents of requests or responses; the stats show only total usage.
- Will this work for other tools? — Yes: the same endpoint works in Claude Code, Cursor, Cline, and any OpenAI- or Anthropic-compatible client.