APIMODELSAPIMODELS
All
Models/GLM-5.4
Zhipu

GLM-5.4 API

glm-5.4

GLM-5.4 is Zhipu's (Z.ai) November 2026 reasoning model, the newest in the GLM line, for long-horizon agents and complex software engineering: 1M context, tool calling and streaming verified on our endpoint. Here it is priced below GLM-5.3 and takes text only; requests with images are rejected. Call glm-5.4 at $1.26 / $3.96 per 1M tokens.

ReasoningTool Calling1M ContextOpenAI-compatiblePrompt Cache
Input$1.26
Output$3.96
per 1M tokens

API Documentation

View complete API reference with all parameters and examples.

View Docs

Full API Documentation

View complete API reference with streaming, thinking, and more.

View Documentation

Pricing

Input
$1.26
per 1M tokens
Output
$3.96
per 1M tokens

Billing: Cost = (input_tokens * input_price + output_tokens * output_price) / 1,000,000

Long-Horizon Agents

Built for multi-step agent workflows

1M Context

Fits entire codebases in one request

Tool Calling

Reliable function calling for agents

Prompt Cache

Cache hits billed at $0.234 / 1M input

TL;DR GLM-5.4 is a Zhipu large language model, callable via APIMODELS' unified API (model name `glm-5.4`). Pricing: Input: $1.26, Output: $3.96 per 1M tokens. One API key for all image / video / LLM / audio models.

About GLM-5.4

GLM-5.4 is a Large Language Model API provided by Zhipu. Zhipu GLM-5.4 — Z.ai's newest reasoning model (released November 2026), built for long-horizon agent work and complex software engineering, with a 1M-token context window. Priced below GLM-5.3 here. Text input only on this endpoint: requests that contain images are rejected. Served via the OpenAI-compatible chat-completions endpoint. Supports prompt caching, with cache hits billed at $0.234 / 1M input tokens. Through APIMODELS platform, you can access this model via a unified API with transparent pay-as-you-go pricing. Current pricing: Input: $1.26, Output: $3.96 per 1M tokens.

Key Features

  • Long-Horizon Agents -- Built for multi-step agent workflows
  • 1M Context -- Fits entire codebases in one request
  • Tool Calling -- Reliable function calling for agents
  • Prompt Cache -- Cache hits billed at $0.234 / 1M input

Use Cases

Chatbot & Customer Support

Build intelligent conversational systems to automatically answer user queries and improve service efficiency.

Content Generation

Automatically write articles, emails, ad copy, and other text content to boost productivity.

Code Assistant

Assist with code writing, debugging, and code review to accelerate software development.

Data Analysis

Understand and analyze unstructured data, extract key insights, and generate summary reports.

Why APIMODELS

  • Unified API -- One API key to access all models, no need to register on multiple platforms
  • Transparent Pricing -- Pay-as-you-go with per-call pricing published on every model page, ideal for indie developers and startups
  • Instant Access -- Start right after signup; pay by card, PayPal, Alipay or USDT
  • Full Documentation -- Detailed API docs with code examples in cURL, Python, and Node.js

Frequently Asked Questions

What is the difference between APIMODELS and the official Zhipu API?

It is the same GLM-5.4 model, served through the APIMODELS multimodal API gateway. One API key and one balance cover it and every other model, so you do not need a separate account with each provider; failed calls are not charged, and where a model runs on more than one channel, a failed request moves to another one automatically.

What is different about GLM-5.4 versus GLM-5.3, and which should I pick?

GLM-5.4 is Z.ai's November 2026 reasoning model; GLM-5.3 is the August generation. On APIMODELS 5.4 is $1.26 / $3.96 (cached input $0.234), about 5% below 5.3 at $1.33 / $4.18 (cached $0.247). They share one endpoint and both have a 1M-token context. We have not run our own head-to-head between the two, so we make no claim about how much better it is. Our suggestion: start new projects on 5.4; if your prompts are already tuned and regression-tested on 5.3, there is no rush to move. Switching is a one-field change.

How much does the GLM-5.4 API cost, and is it more affordable than Z.ai official?

$1.26 per 1M input tokens and $3.96 per 1M output, with cached input at $0.234. Z.ai official is $1.40 / $4.40 / $0.26 — so all three tiers are 10% below official. Pay-as-you-go, no minimum top-up, no subscription, and failed requests are never billed. The full 1M-token context bills at the same rates with no long-context surcharge.

How do I call it? Show the shortest example.

POST https://api.apimodels.app/v1/chat/completions with Authorization: Bearer YOUR_API_KEY and body {"model":"glm-5.4","messages":[{"role":"user","content":"..."}]}. Plain OpenAI shape, so pointing openai-python or openai-node at base_url=https://api.apimodels.app/v1 works as-is, and so do Cursor, Cline and Codex. Add stream:true for streaming. /v1/responses works too — we bridge it to chat-completions at the gateway.

Does function calling work? What about streaming?

Both, and we measured them on our own channel rather than repeating the upstream spec sheet: a nested schema with an enum and a required field came back as a standard tool_calls structure with clean, parseable argument JSON, and a streaming request delivered 98 SSE frames with normal incremental output. We run these two checks on every channel we add — a channel that fails them does not get listed.

Can I really use the full 1M context, and how do I keep long conversations affordable?

The context window is 1M tokens. The lever on cost is prompt caching: a repeated prefix — system prompt, codebase context, conversation history — bills at $0.234 instead of $1.26 once it hits cache, a 5.4x difference. Agent workloads repeat heavily by nature; on the sibling model we measure an 84% cache-hit rate in production, so real bills land far below a naive full-price estimate.

Do I need a Z.ai account, and does it work from mainland China?

No Z.ai account, no enterprise verification, no VPN — the endpoint is directly reachable from mainland China. One APIMODELS key also reaches Claude, Gemini, GPT, Grok and every other model on the platform, drawing on a single balance. For most teams that is the actual reason to aggregate: not the 10%, but not having to run five vendor accounts and five invoices.

Can GLM-5.4 take images, and can I turn thinking off?

Not images, on this endpoint: a request that contains an image returns 400 and nothing is billed, so send text only. Thinking is always on. The model reasons before it answers, and reasoning tokens bill as output tokens; in our test on December 3, 2026, a request with thinking:{"type":"disabled"} was accepted but the model still reasoned. Count the reasoning part as output when you estimate cost.

What can GLM-5.4 do?

GLM-5.4 supports: Reasoning, Tool Calling, 1M Context, OpenAI-compatible, Prompt Cache. See the APIMODELS docs for full parameters and call examples.

What payment methods are supported? Can I pay with PayPal or crypto?

Yes to both. You can top up with a card (Visa, Mastercard and others, through Stripe), PayPal, Alipay, or USDT on TRON (TRC20) or BNB Smart Chain (BEP20). Card, PayPal and Alipay top-ups are credited immediately; USDT is credited once the transfer confirms on-chain. Auto top-up is optional, and a $50 top-up adds a $1 bonus ($3 on a $100 top-up). The balance is in USD and billed per use, with no subscription.

Related models