Knowledge Base Sections ▾
Navigation
▸ Start here By rolesCategories
- Cursor + Gonka AI - cheap LLM for coding
- Claude Code + Gonka AI - LLM for the terminal
- OpenClaw + Gonka AI - affordable AI agents
- OpenCode + Gonka AI - free AI for code
- 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
- Hermes Agent + Gonka AI — Autonomous Agent for Pennies
- Kilo Code + Gonka AI — AI-Agent in VS Code
- 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
- Cursor Pro request limit reached — breakdown and cheaper alternative
- Claude Code is cheaper — bill breakdown and switching
- Cline is burning money — why the agent spends so much
- OpenClaw is expensive — why the agent burns through tokens and how to save
- OpenRouter: Cheap Alternative — Comparison with JoinGonka Gateway
- 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
- ZCode: Cheap GLM inference instead of GLM Coding Plan
- 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
- Pi + JoinGonka Gateway — terminal agent on cheap inference
Tools
ZCode: Cheap GLM inference instead of GLM Coding Plan
In June 2026, Z.ai released ZCode 3.0 — a desktop agentic development environment which the company calls the «Official Harness for GLM-5.2». The product quickly gained attention: its own agent core, autonomous tasks via /goal, multi-agent mode, and remote session control straight from Telegram. However, along with the wave of reviews came a wave of questions from early GLM Coding Plan subscribers: quotas are calculated in "prompts" within 5-hour windows, usage is tripled during peak hours, lower plans allow only one concurrent request, and users on Hacker News complain about sudden blocks after a heavy day of work.
The good news: ZCode officially supports a custom provider — you can connect any OpenAI- or Anthropic-compatible API and pay for actual tokens instead of subscription quotas. In this guide, we will break down what ZCode is and how the GLM Coding Plan is structured, then step-by-step configure ZCode for the JoinGonka Gateway — a gateway for the decentralized Gonka network, which has already added GLM-5.2 to its registry. The result: the same tool, the same open-weight models, but the economics are based on tokens and are hundreds of times cheaper than centralized APIs.
What is ZCode: Agentic development environment from Z.ai
ZCode is not a «chat sidebar editor», but an ADE: you describe a goal, the agent creates a plan, edits files, runs checks, and iterates until the result is achieved. It works as a desktop application on macOS and Windows (Linux build is in beta status).
Key features of version 3.0:
- ZCode Agent — native agent core with deep GLM-5.2 integration; in addition to it, you can connect third-party agents (Claude Code, Codex, Gemini CLI, and others);
- Goal-mode (
/goal) — long autonomous tasks: plan → execution → step-by-step verification; - Multi-agent — parallel work of multiple agents on a project;
- Remote control — starting and controlling sessions from Telegram, WeChat, and Feishu: the agent runs on your machine, and you answer questions from your phone.
The client itself is free, and Z.ai gives new users a daily GLM-5.2 token quota for trial. After that — either a GLM Coding Plan subscription or your own API key. And this is where it is worth diving into the details, as the subscription model is the most discussed part of the product.
GLM Coding Plan: Price, limits, and quotas
GLM Coding Plan is a Z.ai subscription that provides access to GLM models in ZCode and two dozen other third-party tools. As of the publication date (July 2026), the basic grid looks like this — but prices and promos change, so verify with the live page z.ai/subscribe:
| Plan | Price, $/mo | Quota | Concurrent requests |
|---|---|---|---|
| Lite | $18 (on promo — from ~$12.6) | «Prompts» in 5h windows + weekly cap | 1 |
| Pro | $72 | ×4 of Lite | 1 |
| Max | $160 | ×16 of Lite | up to 30 |
What subscribers are complaining about (Hacker News and GitHub threads):
- Peak multiplier. During peak hours (14:00—18:00 UTC+8 — evening in Asia, morning/day in Europe), each request deducts quota with a ×3 coefficient, off-peak — ×2. You have to plan consumption according to Beijing time zone.
- Quota in «prompts», not tokens. It is opaque exactly how many tokens are left; there are stories in threads like «I burned ~17M tokens on GLM — and got a four-day block».
- One concurrent request on Lite and Pro. For an agentic environment, this is significant: ZCode's own multi-agent mode and any parallel sub-agents are bottle-necked by the queue.
- GLM-5.2 consumes quota faster than smaller models — the flagship burns the limit with its own multiplier.
The conclusion is simple: for calm solo development, the subscription works honestly. But the more «agentic» your workflow is — parallel tasks, long autonomous sessions, overnight runs — the more often the quota model turns into a lottery. The alternative is paying for actual tokens: no windows, multipliers, or queues — however much the agent consumed, that much is deducted. This is exactly the model that the built-in ZCode custom provider mechanism provides, and it can be set up in five minutes.
BYOK in ZCode: Your own API key and custom provider
ZCode officially has built-in support for BYOK: the documentation expressly permits adding "any service compatible with OpenAI or Anthropic protocols" — public APIs, enterprise channels, and even self-hosted installations. It can be configured in three ways:
- Connect button on the welcome screen → "Set Your API Key";
- Manage Models in the model selector;
- Gear icon → Settings → Model Settings → Add Provider.
Specify the OpenAI Base URL and/or Anthropic Base URL plus the API Key for the provider — ZCode will automatically fetch the list of available models.
Three common stumbling blocks:
- Z.ai endpoints differ. The Coding Plan subscription only works via the coding-endpoint
https://api.z.ai/api/coding/paas/v4; the general/api/paas/v4with a subscription key will return an error — a classic reason for "I'm getting 401/429 even though my plan is paid". - "Works in Claude Code ≠ works in ZCode". Environment variables like
ANTHROPIC_BASE_URLused to configure Claude Code are not read by ZCode: it has its own provider settings storage. Configure it specifically via Settings. - "Model is visible in the selector ≠ key has quota". The model list is fetched from the provider's API, while availability depends on the balance and limits of your specific key.
Next steps — practice: connect the JoinGonka gateway to ZCode and get the GLM stack for tokens.
Setting up JoinGonka Gateway in ZCode: GLM for tokens
JoinGonka Gateway — a gateway to the decentralized Gonka network with two native protocols: OpenAI-compatible /v1/chat/completions and Anthropic Messages /v1/messages. The economy is pay-per-token: no 5-hour windows, ×3 peak multipliers, or a limit of one parallel request; consumption is visible in the dashboard in real-time, and the gateway does not store the content of prompts.
Step-by-step (using the current Custom Provider interface):
| Step | Action |
|---|---|
| 1. Key | Register — gate.joingonka.ai/register (new accounts get 10M free tokens), and create an API key in the Keys section. More details in 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 format jg-… |
| 5. API format | Chat completions (/chat/completions) |
| 6. Model | Add Model → Model ID deepseek-ai/DeepSeek-V4-Flash-0731, Context window 380000. You can also add moonshotai/Kimi-K2.6 and MiniMaxAI/MiniMax-M2.7; the current list is available via GET /v1/models. |
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).
Verification: select the created model and ask the agent any question. If the response arrives, everything is working; error 401 — check your key, 402 — account balance. If «Model request failed» appears on DeepSeek V4 Flash with Thought Level Max — set the Thought Level to High and retry the request.
Tip: The command npx @joingonka/setup --tool zcode will print the ready-to-use values for the fields below (base URL, key, model ID with current limits) and verify via a live request that the gateway accepts them. ZCode itself is configured only via the UI — it does not have a file that can be safely edited, so you must insert the values manually.
Price Comparison: Coding Plan, Z.ai API, OpenRouter, and Gonka
How much GLM inference costs on various channels (prices per 1M tokens; competitor prices fixed as of July 2026, JoinGonka price is pulled live to the page from the API gateway):
| Channel | Input, $/1M | Output, $/1M | Billing Model |
|---|---|---|---|
| Z.ai API (GLM-5.2) | $1.40 (cached input — $0.26) | $4.40 | per token |
| GLM Coding Plan | $18—160/mo | subscription: "prompt" quotas, ×3 peak multiplier, concurrency limits | |
| OpenRouter (z-ai/glm-5.2) | $0.93 | $3.00 | per token; no free version of GLM-5.2 available |
| JoinGonka Gateway | $0.0032 | $0.0097 | per token, Gonka network |
The two-to-three order of magnitude difference is not marketing rounding, but a different economy: computations are performed by participants of a decentralized network who earn from the work itself, not from data center margins. A detailed breakdown of how this works and its applicability limits can be found in our article on the cheapest AI API.
Fair disclaimer regarding GLM-5.2: the network will set the exact price of the model at the moment of activation (the table above shows the current live prices for network models). The figures on this page are updated automatically; there is no need to recalculate anything manually.
GLM-5.2 in the Gonka network: Status and FAQ
The zai-org/GLM-5.2-FP8 model has already been added to the Gonka network's on-chain registry: the configuration specifies a context window of up to 400K tokens, and the model itself is a heavy one (requiring more than a terabyte of VRAM per replica). The rollout is currently underway: the network nodes are warming up the weights. Once the checks turn green, the model will automatically appear in the gateway's model list — the base URL and key remain the same; in ZCode, you will just need to select it in the selector.
About the model itself: open weights under the MIT license, MoE architecture with ~750B parameters (about 40B active per token), native window up to 1M tokens. According to Z.ai, on SWE-bench Pro, the model shows 62.1 — higher than GPT-5.5, and on FrontierSWE it lags behind Claude Opus 4.8 by about a percentage point. For an open-weight model, this is the top tier in coding.
FAQs:
- Why are there 429s right after a new model is enabled? — This is the rollout phase: some nodes are still loading weights. Repeat the request in a few seconds — the load balancer will find an active node.
- What is available today? — Kimi K2.6, MiniMax M2.7, and DeepSeek V4 Flash: all three models work in ZCode via the same custom provider; the configuration from this guide is fully functional right now.
- What about privacy? — The gateway does not store the content of prompts and responses; statistics only include consumption aggregates.
- When is the Coding Plan more profitable? — If you work solo, stay within the Lite quota, and do not run parallel agents, a subscription with a flat rate is convenient and predictable. Calculate based on your profile: for active agent work, paying for tokens through the network is orders of magnitude cheaper, whereas for light code edits a couple of times a day, the difference may not be noticeable.
- Will this work for other tools? — Yes: the same endpoint works in Claude Code, Cursor, Cline, and any OpenAI/Anthropic-compatible client.