We route only our hardest reasoning tasks to the GLM 5 API and cheaper models for the rest — it cracks problems the others kept getting wrong.
The GLM 5 API is Z.ai's new-generation flagship GLM model — the most capable in the family, a generational leap over the 4.x line on hard reasoning, complex coding, and demanding agentic work, with a 200K-token context window, native tool calling, and structured outputs. The GLM 5 API is OpenAI-compatible: point any existing SDK at RouterBase and set the model to glm-5. Input at $0.90 / 1M tokens, output at $2.88 / 1M tokens, cached-input reads at $0.18 / 1M — 10% below the official rate, all through one REST endpoint.
GLM 5 API: Chat
Use the GLM 5 API to reach Z.ai's new-generation flagship — GLM-5 is the most capable model in the family, a clear leap past the 4.x line on hard reasoning, complex coding, and demanding agentic work.
The GLM 5 API is Z.ai's new-generation flagship — the most capable model in the GLM family, a generational leap over the 4.x line on hard reasoning, complex coding, and demanding agentic work, with native tool calling, structured outputs, and a 200K-token context window. Routed through RouterBase, the GLM 5 API is fully OpenAI-compatible: point any existing SDK at RouterBase's base URL, set the model to glm-5, and your first GLM 5 API call goes through immediately.
Pricing for the GLM 5 API is $0.90 / 1M input tokens, $2.88 / 1M output tokens, and $0.18 / 1M cached-input reads — 10% below the official published rate. One RouterBase key reaches the GLM 5 API and 200+ other models — no Z.ai account required.
Six reasons teams ship on the GLM 5 API
From frontier-grade reasoning to a 10%-off price — six reasons GLM-5 is the model teams reach for on hard problems.
The most capable GLM yet
GLM-5 is a generational step over the 4.x line — deeper reasoning, stronger multi-step problem-solving, and better judgment on ambiguous, open-ended tasks.
Frontier reasoning
Hand the GLM 5 API a hard math, analysis, or planning problem and it works through it methodically — the depth you only get from a top-tier model.
Native tool calling
GLM-5 plans and calls tools in the OpenAI format with strong judgment about when to act — well-suited to autonomous agents tackling complex, multi-stage goals.
Long context window
The GLM 5 API holds up to a 200K-token context, so entire codebases, research dossiers, or long case histories stay in view for a single reasoning pass.
OpenAI-compatible, one key
The GLM 5 API uses the OpenAI chat-completions format, so one RouterBase key swaps GLM-5 in beside GPT-5.5, Claude, Gemini, and 200+ other models.
10% off the list price
GLM-5 runs 10% under Z.ai's published rate — $0.90 / 1M input, $2.88 / 1M output, $0.18 / 1M cached. Frontier capability at a routed price, billed per token.

Get started with the GLM 5 API in 3 steps
From sign-up to your first response in under 5 minutes.
Create a RouterBase API key
Sign up and create an API key — it reaches GLM-5 and the rest of the RouterBase catalog from a single account.
Send your first message
Point any OpenAI-compatible SDK at routerbase.com/v1 and set the model to glm-5, then send a chat-completions request. Streaming, tool calls, and structured outputs are all supported.
Inspect usage
Every GLM 5 API response returns a full token breakdown — input, output, and cached-input — so you can keep an eye on cost and cache hits per 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 5 API
Real production loads running on the RouterBase model catalog across 200+ models.
GLM-5 became our default for complex analysis through RouterBase — one line of config, and the quality jump on open-ended questions was obvious.
For multi-stage planning our agents lean on the GLM 5 API — it reasons about the whole goal instead of just the next step.
We A/B the GLM 5 API against frontier models behind one RouterBase key — it holds up on our toughest evals at a noticeably lower cost.
The GLM 5 API handles the gnarly edge cases our pipeline used to escalate to a human — fewer fallbacks, and cleaner outputs.
Switching our hardest prompts to the GLM 5 API was one base-URL change, and the answers came back sharper and better-structured.
Frequently Asked Questions
Common questions about the GLM 5 API.
The GLM 5 API is RouterBase's pass-through to Z.ai's GLM-5 — the newest, most capable model in the GLM family, a generational step over the 4.x line for hard reasoning, complex coding, and demanding agents, served over an OpenAI-compatible REST interface with native tool calling and structured outputs.