We moved our coding agents from GLM-4.5 to the GLM 4.6 API — cleaner multi-file diffs, and the lower token use shows up straight on our bill.
The GLM 4.6 API is Z.ai's newest flagship GLM model — a step up from GLM-4.5 with a 200K-token context window, stronger real-world coding, and more token-efficient agentic workflows, plus native tool calling and structured outputs. The GLM 4.6 API is OpenAI-compatible: point any existing SDK at RouterBase and set the model to glm-4-6. Input at $0.51 / 1M tokens, output at $1.87 / 1M tokens, cached-input reads at $0.0935 / 1M — 15% below the official rate, all through one REST endpoint.
GLM 4.6 API: Chat
Use the GLM 4.6 API to run Z.ai's newest flagship — a major step up from GLM-4.5 with a 200K-token context window, stronger real-world coding, and leaner, more token-efficient agentic runs.
The GLM 4.6 API is Z.ai's newest flagship — a step up from GLM-4.5 with a 200K-token context window, stronger real-world coding, and leaner, more token-efficient agentic runs, plus native tool calling and structured outputs. Routed through RouterBase, the GLM 4.6 API is fully OpenAI-compatible: point any existing SDK at RouterBase's base URL, set the model to glm-4-6, and your first GLM 4.6 API call goes through immediately.
Pricing for the GLM 4.6 API is $0.51 / 1M input tokens, $1.87 / 1M output tokens, and $0.0935 / 1M cached-input reads — 15% below the official published rate. One RouterBase key reaches the GLM 4.6 API and 200+ other models — no Z.ai account required.
Six reasons teams ship on the GLM 4.6 API
From a 200K context window to a 15%-off launch price — what makes GLM-4.6 worth shipping.
A real step up from GLM-4.5
The GLM 4.6 API is Z.ai's newest flagship — measurably better coding, reasoning, and agentic tool use than GLM-4.5, and it finishes tasks with about 15% fewer tokens.
Built for code
The GLM 4.6 API is a top-tier coding model — multi-file generation, refactoring, debugging, and sharper front-end work, with leading results on real-world coding benchmarks.
Native tool calling
The GLM 4.6 API was tuned for agents — function / tool calling works out of the box in the OpenAI format, with fewer malformed calls than 4.5 when chaining steps.
Long context window
The GLM 4.6 API takes up to a 200K-token context — fit entire repositories, long documents, or a full agent history into a single call.
OpenAI-compatible, one key
The GLM 4.6 API speaks the OpenAI chat-completions format; the same RouterBase key also routes to GPT-5.5, Claude, Gemini, and 200+ other models.
15% off the list price
GLM-4.6 runs 15% under Z.ai's published rate — $0.51 / 1M input, $1.87 / 1M output, $0.0935 / 1M cached. You pay for the tokens you use, nothing per request.

Get started with the GLM 4.6 API in 3 steps
From sign-up to your first response in under 5 minutes.
Create a RouterBase API key
Create an account and generate a key — it unlocks GLM-4.6 plus every other model in the RouterBase catalog.
Send your first message
Point any OpenAI-compatible SDK at routerbase.com/v1 and set the model to glm-4-6. Responses follow the standard chat-completions schema, with streaming and tool calls supported out of the box.
Inspect usage
Each response carries a full token breakdown — input, output, and cached-input — so you can watch cost and cache-hit rate on the GLM 4.6 API call by call.
Pay only for what you use
RouterBase passes through partner-tier pricing. Compared against the model's official published API rate.
What teams build with the GLM 4.6 API
Real production loads running on the RouterBase model catalog across 200+ models.
We switched to the GLM 4.6 API through RouterBase in one line — no SDK changes, and the bigger 200K context in 4.6 let us drop our old chunking workarounds.
Tool calling on the GLM 4.6 API is more reliable than GLM-4.5 for our agents — fewer malformed calls, still the same OpenAI format.
RouterBase lets us A/B the GLM 4.6 API against GPT and Claude behind one key — 4.6 wins our coding evals for a fraction of the cost.
Cached-input pricing plus 4.6's larger context cut our RAG bill again — long system prompts on the GLM 4.6 API barely register now.
We pointed our OpenAI SDK at RouterBase and the GLM 4.6 API just worked — upgrading from GLM-4.5 was a one-line model change.
Frequently Asked Questions
Common questions about the GLM 4.6 API.
The GLM 4.6 API is RouterBase's pass-through to Z.ai's GLM-4.6 — Z.ai's newest flagship and a clear upgrade over GLM-4.5, with a 200K context window, stronger coding and agentic tool use, and better token efficiency, served via an OpenAI-compatible REST interface with native tool calling and structured outputs.