Z.ai
Operational· checked every few minutes

GLM-5.4 API

The GLM-5.4 API, Z.ai's newest GLM model for coding, agents and long documents, 73% below the reference price

Price per 1M tokens73%off
Input
$0.30$1.19
Output
$1.15$4.29
Cached input
$0.05$0.28
Model IDglm-5.4Updated
chat.py
from openai import OpenAI
client = OpenAI(
base_url="https://api.zurelay.com/v1",
api_key="YOUR_ZURELAY_KEY",
)
stream = client.chat.completions.create(
model="glm-5.4",
messages=[
{"role": "user", "content": "Explain quicksort briefly."},
],
stream=True,
)
for chunk in stream:
if chunk.choices:
print(chunk.choices[0].delta.content or "", end="")

Base URL https://api.zurelay.com/v1. Works with any OpenAI SDK. Chat API docs

Context window
1M tokens
Max output
128K tokens
Reasoning
low · high · max
Input
Text, Image
Released
Nov 23, 2026
Status
Operational

Capabilities

Output
  • Text
  • Image gen (not supported)
  • Video gen (not supported)
  • Speech (not supported)
  • Music (not supported)
  • Embeddings (not supported)
  • Decisions (not supported)
Input
  • Image input
  • PDF input (not supported)
  • Audio input (not supported)
  • Video input (not supported)
Features
  • Reasoning
  • Tool use
  • Structured output
  • Automatic caching
  • Explicit caching (not supported)

Pricing

GLM-5.4 API pricing. A fraction of the list price.

Pay as you go from prepaid credit, with no subscription. Top up from $10. Requests that fail are never billed.

RateZurelayZ.ai list
Input
per 1M tokens
$0.30$1.19
Output
per 1M tokens
$1.15$4.29
Cached input
per 1M tokens
$0.05$0.28

One rate at every prompt length, up to the full 1M context window. Streaming, tool calls and structured outputs cost nothing extra.

Every GLM model and price
Savings calculator

Move the sliders to your monthly usage.

Input tokens per month50M
Output tokens per month10M
Zurelay
$26.50
Z.ai list price
$102.40
You save every month$75.90

$910.80 a year

Cost

GLM-5.4 API cost, worked out.

Typical workloads at Zurelay's live prices, next to the list price.

  • Chatbot

    50,000 requests a month, 1,500 tokens in and 300 out, 30% of the input cached. $0.000682 a request.

    $34.13a month$133.13 at list
  • Documents

    20,000 requests a month, 8,000 tokens in and 500 out, 20% of the input cached. $0.00258 a request.

    $51.50a month$204.18 at list
  • Coding agent

    5,000 requests a month, 40,000 tokens in and 1,500 out, 85% of the input cached. $0.00522 a request.

    $26.12a month$115.48 at list
  • Classification

    1,000,000 requests a month, 400 tokens in and 5 out. $0.000126 a request.

    $125.75a month$497.45 at list

Overview

What is GLM-5.4?

GLM-5.4 is Z.ai's newest GLM model, released on November 23, 2026, for coding, agent work and long documents. The Zurelay GLM-5.4 API serves it through one OpenAI-compatible endpoint with a 1M-token context window, at $0.30 input and $1.15 output per 1M tokens.

Z.ai (Zhipu AI) released GLM-5.4 on November 23, 2026, as the successor to GLM-5.3. On Zurelay the model ID is glm-5.4, and it costs $0.30 per 1M input tokens and $1.15 per 1M output tokens. Cached input bills at $0.05 per 1M tokens.

The context window is 1,000,000 tokens. On Zurelay the model reads text and images and writes text, calls tools (functions), and follows a JSON schema in response_format. In our tests it named itself correctly, kept a customer's persona, answered recent dated questions right, read a number in an image and filled a tool call from the question.

GLM-5.4 always thinks before it answers. Set reasoning_effort to low for the least thinking, or high (the default) or max for the most; thinking tokens bill as output. In our tests a short question came back in 3 to 7 seconds, and long answers streamed at 55 to 80 tokens a second.

Z.ai hasn't published its own pay-as-you-go price for GLM-5.4 yet. Against the $1.19 / $4.29 per 1M tokens other providers quote, Zurelay is 73% lower. GLM-5.3 stays available beside it.

Strengths

Where GLM-5.4 shines. And what teams build with it.

01

Far below the reference price

$0.30 input and $1.15 output per 1M tokens, 73% below the $1.19 / $4.29 other providers quote.

02

Long context

1,000,000 tokens: whole codebases, long contracts and research files in one request.

03

Made for agents

Tool calls and JSON schema outputs work through the same OpenAI-compatible API your code already uses.

04

Reads images

Send screenshots, charts and photos beside the text as image_url parts.

Use cases

  • Coding agents

    Plan, write and fix code across a large repository with tool calls.

  • Long-document work

    Summarize, compare and extract from contracts, reports and transcripts that run to hundreds of pages.

  • Structured extraction

    Turn documents and screenshots into JSON that follows your schema.

  • A lower-cost default

    A capable everyday model at a fraction of the price of the largest frontier models.

Get started

Call GLM-5.4 in three steps.

No waitlist and no new SDK. If your code already talks to OpenAI, it already talks to Zurelay.

  1. 1

    Create a key

    Sign up, add credit and create an API key. Set a monthly budget or a rate limit per key if you like.

  2. 2

    Point your SDK at Zurelay

    Change the base URL. Everything else in your code stays the same.

    https://api.zurelay.com/v1
  3. 3

    Use glm-5.4

    Send chat completions as usual. Streaming, tool calls and usage reporting work as you expect.

    glm-5.4

FAQ

GLM-5.4 API questions.

Anything else? Ask our team and we’ll answer by email.

How much does the GLM-5.4 API cost?

Zurelay charges $0.30 per 1M input tokens and $1.15 per 1M output tokens, with cached input at $0.05 per 1M. That's 73% below the $1.19 / $4.29 other providers quote; Z.ai hasn't published its own pay-as-you-go price yet. Thinking tokens bill as output.

How do I call GLM-5.4 with the OpenAI SDK?

Create a Zurelay API key, set the base URL to https://api.zurelay.com/v1 and use the model ID glm-5.4 in chat.completions. Your existing OpenAI code works unchanged, streaming, tools and response_format included.

Can I turn GLM-5.4's thinking off?

No. GLM-5.4 always thinks a little before it answers. Set reasoning_effort to low for the least thinking and the fastest answers, or to high (the default) or max for harder problems.

What's the context window of GLM-5.4?

1,000,000 tokens of context. Long prompts are billed per token like short ones, and repeated prompt prefixes bill as cached input at $0.05 per 1M.

Does GLM-5.4 read images?

Yes. Send images as image_url parts in a user message, as https links or base64 data URLs. Video and audio aren't supported on Zurelay.

How is GLM-5.4 different from GLM-5.3?

GLM-5.4 is Z.ai's newer model and reads images as well as text, where GLM-5.3 on Zurelay is text only. GLM-5.3 stays available at a lower input price; if GLM-5.4 is down and smart routing is on, GLM-5.3 answers instead.

More models on Zurelay

All models

Stop paying list price.
Start saving today.

Create a key in seconds, point the SDK you already use at Zurelay, and every request costs up to 90% less from the first token.

  • No subscription
  • Start with $10
  • Failed requests aren’t billed