Skip to content
One AI API Key
Blog

GLM-5.4 API guide: calling glm-5.4 through the Coding Plan

How to use GLM-5.4: the glm-5.4 model ID, Coding Plan access from $18 a month, why it is not on pay-as-you-go yet, credit multipliers, and a curl example.

One AI API Key TeamPublished 16 min read
On this page

GLM-5.4 is live, but you cannot call it the way you call most models. It is not on a public pay-as-you-go token endpoint, there is no rate-card entry for it, and the only official path to it today is a GLM Coding Plan subscription starting at 18 US dollars a month. Inside that plan the model answers to the ID glm-5.4 over an OpenAI-compatible interface, which is good news for anyone with existing GLM code, because it means the request shape you already use keeps working.

This post is the practical guide to getting a request through. It covers where GLM-5.4 is and is not available, the model ID and the plan path, why you have to select the model manually, a working OpenAI-compatible request you can adapt, the credit multipliers that decide how fast you burn quota, the state of third-party router access, and the honest gaps. If you want the pricing detail behind the plan, that lives in our GLM-5.4 pricing post, and the launch overview is in GLM-5.4 launch.

Z.ai announcement of GLM-5.4 launch for Coding Plan subscribers
Z.ai released GLM-5.4 on 23 November 2026 to GLM Coding Plan subscribers, with the model ID glm-5.4.

Where GLM-5.4 is available today

The availability picture is narrow, and it is the most important thing to understand before you write any code. Z.ai released GLM-5.4 on 23 November 2026 to GLM Coding Plan subscribers only. It is not on the pay-as-you-go token API. Z.ai’s public price page still lists GLM-5.3 as the newest model you can buy by the token, at 1.40 dollars input and 4.40 dollars output per million tokens.

That means there are two situations, and they lead to different instructions. If you are a Coding Plan subscriber, you can call glm-5.4 right now through the plan. If you are not a subscriber, you cannot call it through Z.ai’s official API at all today. Your options are to subscribe or to wait for a third-party router to add it, and as of launch day the routers have not, which we cover below. There is no third option, and no amount of API work gets you around the plan wall on the official endpoint.

This is the same availability split that shapes the whole launch, and it is worth reading the GLM-5.4 vs GLM-5.3 comparison to see what you get by moving from the token-API flagship to the plan-only one.

The model ID and the plan path

The model ID is glm-5.4. That is the string you pass in the model field of a request. It follows the same naming pattern as the rest of the line, so glm-5.3 becomes glm-5.4 and nothing else about the identifier changes.

The plan path is the GLM Coding Plan, which starts at 18 US dollars a month on the Lite tier, with Pro at 80 dollars and Max at 168 dollars. All three tiers carry GLM-5.4. The plan meters usage through a dual pool, a 5-hour rolling allowance plus a larger weekly allowance, and subscribers running GLM-5.4 get 50% more weekly quota than they got on GLM-5.3. Off-peak usage is billed at half the credit rate, with peak defined as Monday to Friday, 14:00 to 18:00 Singapore time.

Select the model manually, there is no auto-upgrade

One detail that catches people on day one. Having a Coding Plan subscription does not automatically route your requests to GLM-5.4. You have to select glm-5.4 explicitly as the model. Z.ai did not make the new flagship the default, and there is no auto-upgrade from GLM-5.3.

The practical consequence is that if you point an existing GLM integration at the plan endpoint and leave the model string as glm-5.3, you will keep hitting GLM-5.3, not GLM-5.4. Nothing breaks and nothing tells you that you are on the older model. You just get last generation’s answers. So the first thing to check after subscribing is that your client is actually sending glm-5.4 in the model field. This is a deliberate design choice by Z.ai, and it makes sense given that the two models behave differently and consume quota differently, but it does mean the upgrade is opt-in at the request level rather than something that happens to you.

Once you have selected it, the request interface is OpenAI-compatible. That is the standard shape Z.ai uses across the GLM line, and it means you point your existing OpenAI SDK or client at Z.ai’s endpoint, swap in the base URL and key, change the model string to glm-5.4, and the rest of your code is unchanged.

An OpenAI-compatible request

Here is the request shape. This is the standard GLM OpenAI-compatible format, the same structure Z.ai uses across the line and the same structure every OpenAI-compatible endpoint accepts. It is not an officially published GLM-5.4 snippet, because Z.ai has not published a GLM-5.4-specific example yet. Treat it as a template to adapt to your plan credentials and endpoint, and check Z.ai’s own documentation for the exact base URL tied to your subscription.

glm-5.4 OpenAI-compatible request
curl https://api.z.ai/api/paas/v4/chat/completions \
-H "Authorization: Bearer $ZAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "model": "glm-5.4",
  "messages": [
    {"role": "system", "content": "You are a careful code reviewer."},
    {"role": "user", "content": "Review this function for security issues and explain each finding."}
  ],
  "stream": true
}'

Three things to notice about that request. The model field is glm-5.4, which is the only GLM-5.4-specific part, and it is the part you must change manually as covered above. The endpoint and auth header follow the OpenAI-compatible convention, bearer token in the authorization header, JSON body, chat completions path. And streaming is set with "stream": true, which matters for this model specifically because it reasons heavily and you will want tokens as they arrive rather than waiting on the full response.

A few practical points on adapting that request. The messages array is the standard OpenAI shape, so a system message setting behavior followed by one or more user and assistant turns works exactly as it does on any OpenAI-compatible endpoint. The system prompt in the example asks the model to act as a careful code reviewer on purpose, since that is the deployment pattern early testing suggests GLM-5.4 is best suited to. If you are sending images instead of text, the user message content becomes an array of parts with a text part and an image part, which is the standard multimodal extension of the same OpenAI shape, though the exact image field Z.ai accepts is not documented yet and is covered in our GLM-5.4 vision post.

Because the interface is OpenAI-compatible, you can use any OpenAI SDK instead of raw curl. Set the base URL to Z.ai’s endpoint, put your plan key in the client, set model to glm-5.4, and the standard client.chat.completions.create call works. That is the practical benefit of Z.ai keeping to the OpenAI shape, and it is why migrating from GLM-5.3 is mostly a one-line change on the model string, plus the manual selection step. If you already route traffic through a gateway that normalizes OpenAI-compatible providers, adding Z.ai as a provider and glm-5.4 as a model is the same integration work as any other OpenAI-compatible backend.

The credit multipliers, and why output dominates your bill

The Coding Plan meters usage in credits rather than raw tokens, and the way tokens convert to credits is through a per-model multiplier table. Z.ai publishes these for GLM-5.3, and they are the best guide to how GLM-5.4 will consume your quota, because they reveal which direction of usage is expensive.

For GLM-5.3, per 10,000 tokens, the credit multipliers are:

Direction Credits per 10k tokens
Input 6.9
Cached input 1.7
Output 24

Read that table and the shape is clear. Output costs 24 credits per 10,000 tokens, which is roughly three and a half times the 6.9 credits that input costs, and roughly fourteen times the 1.7 credits that cached input costs. Cached input is the cheap direction by a wide margin, which is Z.ai’s way of rewarding you for reusing context the model has already processed. Output is the expensive direction, and for a reasoning-heavy model that is the direction that matters.

GLM-5.4’s multipliers are not published. Nobody outside Z.ai can tell you whether they match GLM-5.3’s or are higher to reflect the larger model. But the GLM-5.3 table tells you what to watch. A model that emits a million output tokens draws down your credit pool roughly fourteen times faster than one that reads a million cached tokens. For a model like GLM-5.4, which early testing showed generating over a million reasoning tokens on a single hard task, the output multiplier is effectively the number that decides how long your plan lasts. When Z.ai publishes the 5.4 table, that is the row to look at first.

GLM-5.4 pricing and credit multipliers compared across GLM models
Credit multipliers decide quota burn. GLM-5.3 output costs 24 credits per 10k tokens, about 3.5x its input rate. GLM-5.4 multipliers are not published.

One practical lever on cost is timing. Off-peak requests are billed at a 50% credit rate, so the same reasoning-heavy request costs half the credits outside Monday to Friday, 14:00 to 18:00 Singapore time. For long agent runs or batch evaluation, scheduling outside the peak window is the simplest way to double what a tier buys you.

GLM-5.4 Coding Plan quota showing the dual 5-hour and weekly pool and 50 percent weekly increase
The dual pool and the 50% weekly bump govern how much GLM-5.4 you can call through the plan.

Third-party routers are not live yet

With most launches, third-party routers pick a new model up quickly and give you a second access path. As of 23 November 2026, that has not happened for GLM-5.4, and it is worth knowing before you go looking.

OpenRouter does not list GLM-5.4. Requests for the model return a 404, which means it has not been added to the router’s catalogue. TeamoRouter has a GLM-5.4 page, but it shows “Coming Soon” rather than a live endpoint, so the model is announced there but not callable. Artificial Analysis, which tracks model pricing and performance, also returns a 404 for GLM-5.4, consistent with the model being absent from its index. There is no AWS Bedrock or Fireworks availability either.

So the honest statement is that there is no working third-party router access to GLM-5.4 on launch day. If you were hoping to call it through a router you already use, without subscribing to the Coding Plan, that path does not exist yet. The routers that have GLM-5.4 pages are showing placeholders. Verify the model is actually listed and callable on any router before you build against it, and confirm the router’s own pricing, which is set by the router rather than Z.ai. Our router-access coverage in Inkling 2 Mini cheapest hosted explains how to compare hosted access across providers. For models you can reach by token today, GLM-5.4 alternatives covers the open models competing for the same work.

That leaves the Coding Plan as the only working door. If you need GLM-5.4 today, subscribing is the way, and the Lite tier at 18 dollars a month is the entry point.

Migrating from GLM-5.3 on the token API

If you are currently calling GLM-5.3 through the pay-as-you-go API, the mechanics of switching to GLM-5.4 are simple but the access model is not, and it is worth being precise about which is which.

Mechanically, almost nothing changes. The request shape is identical, the OpenAI-compatible interface is the same, and the model string goes from glm-5.3 to glm-5.4. Your error handling, your streaming setup, your retry logic, all of it carries over unchanged. In terms of code, the migration is close to a one-line diff.

What changes is the access model. GLM-5.3 is on the token API, so you pay per token and you can call it with any valid key. GLM-5.4 is not on the token API, so the same key that calls GLM-5.3 by the token will not call GLM-5.4. You need a Coding Plan subscription, and the request has to go through the plan with the plan’s credential, possibly a different base URL. The migration is not purely a model-string change if you are coming from the token API. You are also moving from metered billing to a subscription.

The practical consequence is that you should not plan a hard cutover. Keep GLM-5.3 on the token API for the traffic that is working, subscribe to the plan for evaluation, and route a slice of traffic to GLM-5.4 to compare on your real tasks before you decide whether to move. That is especially sensible given the model profiles as a reviewer and planner rather than a bulk generator, which means the right architecture is likely a mix, with GLM-5.4 handling the reasoning-heavy work and a cheaper model handling bulk generation.

The honest gaps

There are several things Z.ai has not published for GLM-5.4, and each one affects how you build against the API.

First, there is no official rate-card entry. GLM-5.4 has no per-token price and is not on the pay-as-you-go API, so there is no rate card row to read. Our GLM-5.4 pricing post tracks that number.

Second, there are no published rate limits for the plan endpoint. Z.ai has not documented requests-per-minute, tokens-per-minute, or concurrency caps. The weekly quota is the only published constraint. Build with retry and backoff, since a plan endpoint that meters weekly usage will enforce a ceiling somewhere even if the number is not printed.

Third, the credit multipliers for GLM-5.4 are not published. GLM-5.3’s are, and they show output as the dominant cost, but you cannot compute GLM-5.4 quota burn precisely until Z.ai publishes the 5.4 table.

Fourth, image input is confirmed but undocumented at the edges. The supported formats and size limits are not published. Our GLM-5.4 vision post covers what that means for a screenshot-to-code pipeline.

None of these gaps are unusual for a launch-day model, and all of them are the kind that close as Z.ai publishes documentation. But they are real today, and building against a model with no rate card, no published rate limits, and no credit table means building defensively.

Error handling and retries

Because there are no published rate limits for the plan endpoint, the way you handle errors matters more than it would on a documented API. The weekly quota is the one published constraint, and hitting it will look different from hitting a per-minute rate limit, so your client should be ready for both.

Build with retry and exponential backoff on transient failures. Early testing showed the model has a real but recoverable tool-call failure rate, around 1.56%, with roughly two thirds of those failures succeeding on a retry. That number comes from a coding harness rather than the raw API, so do not read it as a guaranteed API error rate, but the shape of the finding is useful: some requests fail for transient reasons and succeed when you try again.

Distinguish the errors you can act on from the ones you cannot. Quota exhaustion is not something backoff fixes, since the allowance resets on the plan’s boundary, so that error should stop your job and surface to you rather than retry in a loop. A transient server error is the opposite and should retry with backoff. The safe default is to retry transient failures a bounded number of times with growing delay, and to stop and alert on anything that looks like a quota or authentication problem.

One more practical note. Set generous timeouts. A model that reasons across many steps and can generate a very large number of tokens on a hard task will sometimes take noticeably longer than a smaller model on the same prompt. Early testing measured GLM-5.4 taking 431 minutes at max reasoning effort on a hard task against 109 minutes for a frontier comparator, across 1,128 reasoning steps. A timeout tuned for a fast model will cut off legitimate long-running reasoning requests. Tune the timeout to the slowest reasonable request in your workload, not the fastest.

Should you integrate today

If you are on the Coding Plan, yes, with a caveat. The integration cost is close to zero because the interface is OpenAI-compatible and your GLM-5.3 code likely works by changing the model string, provided you remember to select glm-5.4 manually. The caveat is the token-hungry behavior: route your hardest reasoning tasks to it, where the deep thinking earns its cost, and keep bulk generation on a cheaper model. Our GLM-5.4 for code review post covers that deployment pattern, and GLM-5.4 context window covers the long-context behavior you will hit on big inputs.

If you are not on the plan, there is no router fallback today, so the decision is whether to subscribe. If you need GLM-5.4 specifically and want first-party access with the quota bump, subscribe to the Lite tier. If you need a model on the pay-as-you-go token API today, GLM-5.4 is not it yet, and GLM-5.3 or an alternative you can buy by the token is the practical choice.

Sign up for a key to call GLM models through hosted access, browse the model catalogue, or run your own volumes through the cost calculator before committing to a plan or an integration.

Future update: API pricing, multipliers, and router access

This section will be updated once Z.ai publishes GLM-5.4’s rate-card entry and credit multiplier table, and once third-party routers add live access. Based on Z.ai’s pricing history, in which GLM-5.1, 5.2 and 5.3 all launched at 1.40 dollars input and 4.40 dollars output per million tokens, a reasonable expectation is that GLM-5.4’s token price lands at or near that anchor when it reaches the pay-as-you-go API, and that its credit multipliers land near GLM-5.3’s 6.9 input and 24 output per 10,000 tokens. That is inference from Z.ai’s own track record, not an announced price or multiplier. On routers, TeamoRouter’s “Coming Soon” page suggests router access is planned rather than abandoned, so a reasonable expectation is that at least one router adds GLM-5.4 in the weeks after launch. That is inference from the placeholder pages, not a confirmed date. Until the rate card and a live router appear, the Coding Plan remains the only working way to call glm-5.4.

More GLM-5.4 coverage

This post is part of a series on the GLM-5.4 launch. The rest of the cluster goes deeper on what the launch only sketched:

More in Blog

Try it

One API key for Claude, GPT, Grok, DeepSeek, Kimi, Qwen, GLM, MiniMax, Step, Crow, Dots, Beam, Nemotron, Jailbreak, MiMo, Gemini, Muse and Mistral.

One AI API Key speaks the OpenAI and Anthropic formats, so you change the base URL and the key, not your code. Credit packs start at $10, and every model has a published per-token rate.