GLM / Aug 26, 2026

GLM-5.1 API Pricing and GLM-5.3 Migration Controls

Plan GLM API migration with Z.AI price rows, cached-input tracking, GLM-5.3 capability checks, web search fees, and AIWave route governance.

Keyword report: 2026-08-25Tier 1/2 developer focusSources checked Aug 26, 2026

This guide uses source checks from Aug 26, 2026. Provider and gateway prices can change; preserve the checked date with every forecast.

Why This Topic Matters Now

`glm api` and `glm-5 api` remain part of the AIWave Tier 1 and Tier 2 content calendar, but GLM content should not be reduced to a single model comparison. The current Z.AI pricing page checked on Aug 26, 2026 lists multiple GLM rows, cached-input columns, tool fees, image pricing, video pricing, audio pricing, and agent pricing. The developer docs also point readers toward GLM-5.3 migration material. For production teams, that means migration and finance review need to happen together.

This guide is written for engineering leaders in the United States, United Kingdom, Germany, Netherlands, France, Japan, and Singapore who are deciding whether a GLM route belongs in a multi-model stack. It separates direct Z.AI pricing facts from AIWave gateway decisions, then translates those facts into route acceptance tests, cached-input controls, web search governance, and release gates. The aim is not to pick one model forever; it is to make model changes auditable.

Source Facts Checked Today

Z.AI pricing checked on Aug 26, 2026 lists USD prices per 1M tokens. The text model table lists GLM-5.1 at $1.4 input, $0.26 cached input, and $4.4 output; GLM-5 at $1 input, $0.2 cached input, and $3.2 output; and GLM-5-Turbo at $1.2 input, $0.24 cached input, and $4.0 output. It also lists GLM-4.7 at $0.6 input, $0.11 cached input, and $2.2 output.

The same Z.AI page checked on Aug 26, 2026 lists built-in web search at $0.01 per use. It lists GLM-Image at $0.015 per image and CogView-4 at $0.01 per image, plus several video and audio model rows. Those rows matter because GLM workflows increasingly mix text, search, vision, and agent steps. A finance forecast should treat tool calls and media calls as separate cost dimensions rather than hiding them inside a text-token average.

AIWave pricing checked for this run remains a DeepSeek V4 public rate card, not a complete GLM public rate card. That distinction is important. A GLM buyer using AIWave should use the live AIWave models endpoint and account ledger for available route names, then keep any Z.AI direct pricing assumptions in a separate comparison tab with the checked date. Do not copy a provider row into a gateway forecast unless the gateway has published that exact row.

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.

Migration areaRiskControl
Model versionA GLM-5.3 route behaves differently from older routesRun acceptance tests before promotion
Cached inputForecast assumes cache behavior not yet measuredLog cache-hit share by prompt template
OutputLong reasoning answers dominate spendSet route-specific max token budgets
Web search$0.01 per use can accumulateAllowlist search routes and cap daily calls
Media callsImage/video rows do not match text rowsTrack by feature family
Gateway comparisonProvider and gateway rows get blendedPreserve row owner and checked date

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")

ROUTES = {
    "glm_review": {
        "model": "glm-5",
        "source_checked_at": "2026-08-26",
        "max_tokens": 900,
        "web_search_allowed": False,
    }
}

def complete_with_route(route_name: str, prompt: str):
    route = ROUTES[route_name]
    return client.chat.completions.create(
        model=route["model"],
        messages=[{"role": "user", "content": prompt}],
        max_tokens=route["max_tokens"],
        temperature=0.2,
    )

Start With a Versioned Acceptance Set

GLM migration should begin with an acceptance set, not a dashboard. Choose representative prompts across extraction, reasoning, coding, multilingual support, and any tool-using workflow. Run the same set on the current route and the candidate GLM route, then store quality notes, status, latency, input tokens, cached input tokens, output tokens, and tool calls. A migration is only ready when the team can explain quality gain, cost movement, and failure behavior.

Keep Cached Input Separate

Cached input is a first-class pricing column on the Z.AI page, so it deserves a first-class ledger column. Prompt templates, policy blocks, schema instructions, and reference packs can create repeated prefixes, but a small template change can reset the measured cache pattern. Store prompt template version, context size, route name, cache-hit share, and source date. Do not claim a recurring discount until a week of traffic proves the workload actually repeats the right prefix.

Control Web Search Use

Z.AI lists web search at $0.01 per use. That sounds simple, but search-enabled agents can call tools repeatedly when the prompt is broad. Use an allowlist for routes that may search, set per-request and per-workspace caps, and log search use beside token usage. For support bots, search may be disabled unless the query clearly requires current external facts. For analyst workflows, search can be enabled with citation and cost evidence.

Separate Media Workflows

GLM media rows should not be averaged into text generation. A workflow that occasionally uses image generation or OCR has a different budget pattern from a text-only review assistant. Create separate route labels for text, search, image, video, audio, and agent features. That makes it possible to explain a month-end variance without rereading raw prompts. It also lets the product team disable a high-variance feature without blocking normal chat traffic.

AIWave Route Governance

When using AIWave, keep the OpenAI-compatible client contract stable and change the `model` parameter only after acceptance. Pin approved GLM route names in configuration, not prompt text. Store the route owner, source checked date, model family, and fallback policy. If a route moves from GLM-5 to a GLM-5.3 candidate, create a migration record instead of silently changing a string in production configuration.

Procurement Notes

A procurement reviewer should ask four questions. Which Z.AI rows were checked and on what date? Which AIWave route names are actually available to the account? Which token and tool fields does the ledger expose? Which feature families are excluded from the first production rollout? Answers to those questions prevent a migration from turning into an unbounded experiment across text, search, media, and agent features.

Final Checklist

A GLM migration is ready when the acceptance set passes, cached-input behavior is measured, output caps are route-specific, web search has an explicit allowance, media features are separated, and provider prices are not mixed with gateway rows. Recheck Z.AI pricing before a finance forecast, recheck AIWave route availability before launch, and require a written owner for any GLM-5.3 promotion.

Source Links

Related AIWave Links