This guide uses source checks from Sep 16, 2026. Provider and gateway prices can change; preserve the checked date with every forecast.
Why This Topic Matters Now
GLM route planning is moving beyond plain text. The Z.AI pricing page returned HTTP 200 during the Sep 16 run and exposes several billing families: text tokens, cached input, built-in web search, image generation, video rows, audio rows, and agent rows. A previous AIWave article covered GLM cached-input regression tests. This one focuses on the next production question: how do you govern GLM routes when search and media fees can sit beside token usage?
For Tier 1 and Tier 2 teams, the practical risk is not that GLM is hard to call. The risk is that a tool-enabled route enters production with a text-token budget and then later starts generating web searches, screenshots, images, or audio steps that were never reviewed. A release gate should separate text, cache, tools, and media before the route leaves staging.
Source Facts Checked Today
AIWave /api/pricing checked on Sep 16, 2026 returned HTTP 200, success=true, 64 live rows, top-level pricing_version a42d372ccf0b5dd13ecf71203521f9d2, auto_groups=['default'], and group_ratio default=1 and vip=0.9. The static /api/v1/pricing endpoint checked during the same run returned HTTP 200, checked=2026-09-10, currency=USD, unit=per_1m_text_tokens, pricing_version 8c7a0c0b30661ccbc13d142cb54d1e4ae445fe774b2c6fa501080db97c7a3e56, and 64 model rows. Selected static rows were qwen3.8-max at $2.678053 input and $8.034160 output per 1M tokens, qwen3.6-flash at $0.267805 input and $1.606832 output, GLM-5.1 at $2.10 input, $0.680001 cache-hit input, and $6.5999997 output, GLM-5 at $1.55 input, $0.400001 cache-hit input, and $4.96 output, and DeepSeek Flash at $0.70 input, $0.0233 cache-hit input, and $2.10 output. VIP-key estimates multiply the same base rows by 0.9.
Z.AI pricing returned HTTP 200 during the Sep 16 run. The Sep 15 keyword report summarized the official page as showing GLM model families, OpenAI SDK compatibility, and pricing concepts covering input, cached input, storage, output, built-in Web Search, image generation, video, audio, and agent rows. Treat exact provider rows as dynamic and recheck before a published table or purchase review.
AIWave public pricing JSON checked during this run lists GLM-5.1 at $2.10 input, $0.680001 cache-hit input, and $6.5999997 output per 1M tokens; GLM-5 at $1.55 input, $0.400001 cache-hit input, and $4.96 output; GLM-5-turbo at $1.80 input, $0.480001 cache-hit input, and $5.40 output; and GLM-4.7 at $0.93 input, $0.21999987 cache-hit input, and $3.41000031 output. Those are AIWave base rows with effective_date 2026-08-27.
Planning Matrix
A source-dated planning matrix keeps the page useful for engineers and procurement reviewers. It turns a search query into an auditable route decision instead of a loose model preference.
| Route dimension | Production risk | Control |
|---|---|---|
| Text generation | Output dominates spend | max-token budget |
| Cached input | Template drift breaks estimates | prompt-version ledger |
| Web search | Tool calls bill outside text rows | allowlist and cap |
| Image generation | Media units do not match text tokens | separate route label |
| Video or audio | Different unit and review owner | feature-family approval |
| Agent rows | Multi-step loops expand quickly | step ceiling and stop reason |
Implementation Pattern
The implementation pattern keeps credentials as placeholders, pins the AIWave base URL, records the model, and leaves room for route-specific controls. Production applications should move credentials into environment or secret storage.
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY_HERE", base_url="https://aiwave.live/v1")
GLM_ROUTE_POLICY = {
"model": "glm-5.1",
"max_tokens": 900,
"web_search_allowed": False,
"media_allowed": False,
"pricing_checked_at": "2026-09-16",
}
def run_glm_text_route(prompt: str):
response = client.chat.completions.create(
model=GLM_ROUTE_POLICY["model"],
messages=[{"role": "user", "content": prompt}],
max_tokens=GLM_ROUTE_POLICY["max_tokens"],
temperature=0.15,
)
return {"policy": GLM_ROUTE_POLICY, "usage": response.usage}
Split Text, Tool, and Media Approval
The first GLM gate is a taxonomy gate. A text route, a search-enabled route, an image route, a video route, an audio route, and an agent route should have separate labels and owners. Even if the same model family appears in several paths, the release evidence is different. A text route needs output caps and cache fields. A search route needs tool caps. A media route needs unit-specific budgeting and data classification.
Keep Web Search Explicit
Built-in web search is useful for current external facts, but it should never be a hidden behavior in a normal text route. The release gate should say which tasks may search, how many searches can occur per request, which domains or source classes are acceptable, and whether citations are required. The receipt should include tool count or a separate search ledger so the bill can be reconciled without reading prompt text.
Treat Media as a Separate Product Surface
Images, video, and audio are not just larger text prompts. They introduce different units, data handling rules, review workflows, and support questions. A GLM media route should use a separate configuration key, route label, and acceptance set. Product teams should be able to disable media routes without disabling plain text generation. That separation also keeps procurement from approving a text budget that accidentally covers media generation.
Measure Cached Input Without Guessing
GLM rows include cached input in AIWave's public pricing JSON, but cached-input estimates only make sense when prompt structure repeats. Store system prompt version, context pack hash, cache policy, route name, and receipt field. If a team changes the template every deploy, the cache assumption should be reset. Cache measurements belong in the route ledger, not in a one-time spreadsheet note.
Cap Agent Loops
Agent rows or tool-using flows can multiply calls through planning, searching, drafting, verifying, and retrying. A release gate should set max steps, max tool calls, max output, retry ceiling, and stop reason capture. Without these controls, one vague task can consume more budget than a hundred normal chat requests and leave only a hard-to-read transcript behind.
Attach AIWave and Provider Sources Separately
Provider docs explain direct-platform concepts. AIWave rows explain gateway base rates and current group ratios. Both are useful, but they should stay in separate fields. For GLM, record the Z.AI URL and checked date for provider concepts, then record AIWave /api/v1/pricing and /api/pricing for gateway base rows and live ratio context. Do not paste provider rows into an AIWave route forecast unless that exact row is verified in the gateway source.
Internal Links for GLM Buyers
This guide should send GLM evaluators to Models docs, Chat Completions, Pricing JSON, Status, Trust, and Pricing. Those pages provide route, request, status, and pricing evidence without making unsupported reliability or scale claims.
Final Checklist
A GLM production route is ready when text, search, media, and agent behaviors are separated; output caps are explicit; cache measurement is live; search and media have owners; step ceilings prevent loops; and AIWave plus Z.AI sources are stored with checked dates. Recheck official pricing before public tables and keep the final route decision in an auditable release packet.