GLM-5.4 API pricing and integration
GLM-5.4 through OpenAI-compatible Chat Completions: Z.ai's Loop Transformer flagship with a 1M-token context window, up to 128K output tokens and thinking mode.
Use this model via API
This model is available through the paid API. Create an account, add funds and create an API key. The $2 Playground credit is for supported text models only, not API calls.
Sign up for API accessPaste the model ID, live price, base URL and a working request straight into your coding agent.
What is GLM-5.4?
Use the exact API model ID glm-5.4 with /v1/chat/completions; the page URL uses glm-5-4, but requests need the dot. Z.ai released GLM-5.4 on November 23, 2026 as its latest flagship and its first model built on the Loop Transformer architecture, which runs a block of middle layers twice instead of adding parameters. Z.ai documents a 1M-token context window, up to 128K output tokens, thinking mode, streaming, function calling, context caching and structured JSON output, with text, image, video and file input. Z.ai also notes that the model can fall into very long thinking loops on some tasks, so set max_tokens and a client timeout, and measure output tokens on your own workload before budgeting. GLM-5.3 and GLM-5 remain separate model IDs with their own rates. The table below shows the live Crazyrouter input, output, cache-read and cache-write rates; this page quotes no vendor list price because Z.ai had not published a pay-as-you-go rate for GLM-5.4 when it was last reviewed.
Works with the OpenAI SDKs, LangChain, Cursor, Cline and any tool that accepts a custom base URL.
Streaming, tools and structured output depend on the model and upstream channel. Check the required feature on your channel before production use.
The rates come from Crazyrouter's billing table; discounts vary by model.
Compare against Claude, GPT, Gemini, DeepSeek and more without juggling vendor accounts.
GLM-5.4 API quickstart
Point your OpenAI SDK at https://api.crazyrouter.com/v1 and set the model to glm-5.4.
curl https://api.crazyrouter.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $CRAZYROUTER_API_KEY" \
-d '{
"model": "glm-5.4",
"messages": [{"role": "user", "content": "Explain the tradeoffs of this architecture decision."}],
"stream": true
}'Estimated workload costs
Best use cases
Works with developer tools
OpenAI SDKs
Set base_url to https://api.crazyrouter.com/v1 and model to glm-5.4.
Cursor, Cline, Continue
Add Crazyrouter as a custom OpenAI-compatible provider and pick the model from the list.
LangChain / LlamaIndex
Use the OpenAI chat model class with the Crazyrouter base URL.
GLM-5.4 FAQ
What base URL do I use for GLM-5.4?
https://api.crazyrouter.com/v1. Chat completions go to /v1/chat/completions.
How is usage billed?
Per token, at the input/output rates shown on this page. Your balance is debited per request; there is no subscription.
Does it support streaming and function calling?
Support varies by model and upstream channel. The request example is a starting point; verify streaming, tools and structured output separately before production use.
Can I switch to another model later?
Change the model string. The same key works for every model in the Crazyrouter catalogue.
Where do I see the current price?
The pricing page lists live rates for every model, including group discounts if you are logged in.
Guides and comparisons
GuideGLM 4.6 API Guide 2026: Building RAG Apps and Agents with Zhipu Models
A GLM 4.6 API guide for teams evaluating Zhipu models for retrieval-augmented generation, tool use, and agent-style application design.
TutorialGLM-4.6 API Guide: Zhipu AI's Latest Model for Developers
"Complete developer guide to GLM-4.6 by Zhipu AI — features, API setup, code examples, pricing, and comparison with GPT-4o and Claude Sonnet."
GuideWhat Is GLM-5.3-Prime? API Access, Pricing, and Verified First Response
GLM-5.3-Prime is a GLM-family model listed for token-based API access. See its catalog specifications, current price row, and an actual first response.
Podcast
AI Dev Tools: The Crazyrouter Podcast
Short episodes for developers on AI APIs, gateways, cost control and coding tools.
Latest episodes
EP196 · Oct 29, 2026 · 6:53
AI API Security Posture — Turn Controls Into Continuous Evidence
A practical guide to AI API security posture: inventory exposure, verify controls continuously, protect keys and data, constrain tools, and turn security assumptions into evidence that operators can act on.
EP195 · Oct 28, 2026 · 7:21
AI API Policy Drift — Detect When Production Rules Stop Matching Intent
A practical guide to policy drift in AI APIs: version routing and safety rules, detect stale enforcement, compare intended and observed behavior, and restore control before small gaps become incidents.
