· 6 min · Models

GLM-5.4 API: Pricing, Code Arena Rank and How It Compares to Claude

GLM-5.4 API: Pricing, Code Arena Rank and How It Compares to Claude

Z.ai’s glm-5.4 API is live at $1.40 per million input tokens and $4.40 per million output tokens, matching GLM-5.3. GLM-5.4 (Max) debuted at No. 15 overall on Code Arena’s WebDev leaderboard, while a reported coding comparison with Claude Sonnet 5.5 produced mixed results across tasks.

Status as of December 3, 2026: Z.ai launched GLM-5.4 for Coding Plan users on November 23 and opened its pay-as-you-go API on December 2. Z.ai planned to release the weights publicly, with the release date and license still unverified.

GLM-5.4 API model ID and context limits

Set the model ID to glm-5.4 when selecting the model on Z.ai’s API. Z.ai documents a 1 million-token context window and a 128,000-token maximum output. The model accepts video, image, text and file inputs and returns text. Z.ai describes it as its first flagship Loop Transformer, which runs 28 layers of the GLM-5 base twice. Z.ai’s GLM-5.4 model guide

Using the 1M context in Claude Code

Z.ai documents glm-5.4[1m] for enabling the 1M context in Claude Code. Use that selector in Claude Code and the plain glm-5.4 ID when selecting the model on Z.ai’s API. The context window and maximum output are separate limits to check when sizing a request. For background on model selection, see the Claude Code model guide.

GLM-5.4 pricing vs. Claude Sonnet 5.5

Z.ai announced pay-as-you-go access on December 2 at 04:09 UTC. The provider charges the same input, cached-input and output rates for GLM-5.4 and GLM-5.3. Z.ai also listed cache storage as free for a limited time, with a separate per-token rate for cached input. Z.ai API pricing

API model Input per 1M tokens Cached input or cache reads per 1M tokens Output per 1M tokens
GLM-5.4 $1.40 $0.26 $4.40
GLM-5.3 $1.40 $0.26 $4.40
Claude Sonnet 5.5 $2.00 $0.10 $10.00

Anthropic launched Claude Sonnet 5.5 on September 28 with the API model ID claude-sonnet-5-5. At equal token counts, GLM-5.4 costs less for uncached input and output, while Sonnet 5.5 has the lower listed cache-read rate. Anthropic’s Claude Sonnet 5.5 page

For a cost-per-completed-task comparison, track regular input, cached input and output separately, and include the token use of any retries. Two models can finish the same task with different token totals, so the lower output rate alone cannot establish the cheaper run. The reported Sonnet comparison below used different access methods, which also matters when comparing completion and cost.

Coding Plan credits and the 1.5× weekly allowance

Z.ai says subscribers with weekly quotas get 1.5× the usable GLM-5.3 allowance when using GLM-5.4 because the newer model draws fewer credits per token. The Coding Plan has separate five-hour and weekly credit allowances. The 1.5× figure describes usable weekly allowance on GLM-5.4, while the table shows the credit budgets for each tier. Z.ai Coding Plan overview

Coding Plan tier Five-hour allowance Weekly allowance
Lite 2,000 credits 10,000 credits
Pro 12,000 credits 60,000 credits
Max 28,000 credits 140,000 credits

A workflow can reach its five-hour limit while it still has weekly credits. Over a week, the weekly budget can also cap usage. The 1.5× allowance compares GLM-5.4 with GLM-5.3 on the plan. It does not specify how many coding tasks any tier can complete, since the credit draw depends on token use. For the distinction between these billing methods, see API access vs. a subscription.

Code Arena rank, hosted providers and planned weights

The WebDev debut

Arena announced on December 2 at 16:38 UTC that GLM-5.4 (Max) debuted at No. 15 overall with 1,692 points on its Code Arena WebDev leaderboard. It gained 69 points and 21 places over GLM-5.3 (Max), which scored 1,623. Both entries showed a median cost of $1.41 per task. The score, rank and median cost apply to the Max entries in that WebDev comparison. Arena’s GLM-5.4 debut announcement

Arena said GLM-5.4 would rank No. 1 among open models if Z.ai released the planned weights. As of December 3, the confirmed result was the No. 15 overall debut. GLM-5.3 already had downloadable weights under its own GLM-5.3 license. The release date and license for GLM-5.4 remained unverified.

Where GLM-5.4 is hosted

Vercel AI Gateway announced GLM-5.4 availability on December 1. Mistral Cloud and OpenRouter listed December 2 availability, and LLM Gateway listed a Baidu-backed route as baidu/glm-5.4. The baidu/ prefix is part of that gateway’s route ID. Z.ai uses glm-5.4 for its own API.

Reported Claude Sonnet 5.5 results and other unverified claims

GLM-5.4 vs. Claude Sonnet 5.5 in one coding test

In Jessica Wachtel’s November 30 test for The New Stack, Sonnet 5.5 scored higher on screenshot reconstruction, while GLM-5.4 scored higher on pipeline optimization. Sonnet finished both tasks faster. The original article was inaccessible during verification, so the figures were checked against coverage by NeoTeo and DevOpsChat. NeoTeo’s task-by-task account

Task GLM-5.4 Claude Sonnet 5.5
Screenshot reconstruction 147/153 153/153
Pipeline optimization 483.0 457.3
SQLGlot bug fixing 16/132 when the plan allowance ran out 83/132 over two sessions

The test used a Z.ai subscription connection for GLM-5.4 and Anthropic’s API for Sonnet. On SQLGlot, the GLM score records progress when its plan allowance ran out. Sonnet’s score reflects work across two sessions. That difference limits what the bug-fixing scores can tell developers about model quality under equal conditions. The screenshot and pipeline results give a task-by-task view of quality and speed from a single run.

Baidu marketplace and subscriber reports

AI圈报 reported that GLM-5.4 was listed on Baidu AI Cloud’s 词元所 marketplace on December 2, attributing the news to Baidu’s official WeChat account. The original WeChat post was inaccessible, so the marketplace date remains a reported claim. The Baidu-backed route on LLM Gateway is a separate listing.

Some r/ZaiGLM Max subscribers reported hitting limits quickly. One said the weekly allowance lasted about a day even at low effort, while others reported slower quota consumption than with GLM-5.3. These are unverified accounts of individual workloads. Z.ai’s documented 1.5× figure applies to usable weekly allowance across the two models.

Key takeaways

  • Z.ai opened the pay-as-you-go glm-5.4 API on December 2 at the same rates as GLM-5.3.
  • GLM-5.4 has a 1M-token context and a 128K maximum output. Z.ai documents glm-5.4[1m] for Claude Code.
  • GLM-5.4 (Max) debuted at No. 15 overall in Code Arena WebDev. Arena’s projected No. 1 open-model rank depended on a weight release.
  • Coding Plan subscribers with weekly quotas get 1.5× the usable GLM-5.3 allowance on GLM-5.4, with a separate five-hour credit limit.
  • In the reported Claude comparison, Sonnet was faster on the screenshot and pipeline tasks, while GLM scored higher on pipeline optimization.

FAQ

How much does the GLM-5.4 API cost?

Z.ai charges $1.40 for input, $0.26 for cached input and $4.40 for output, each per million tokens. The rates match GLM-5.3, and Z.ai listed cache storage as free for a limited time.

How do I select GLM-5.4 in the API or Claude Code?

Use glm-5.4 as the model ID on Z.ai’s API. In Claude Code, Z.ai documents glm-5.4[1m] for enabling the 1M-token context window.

Can I self-host GLM-5.4?

As of December 3, 2026, Z.ai planned a public weight release, with the release date and license still unverified. GLM-5.3 already had downloadable weights under its own license.

Is GLM-5.4 cheaper than Claude Sonnet 5.5?

GLM-5.4 has lower list prices for uncached input and output, while Claude Sonnet 5.5 has the lower listed cache-read rate. Cost per completed task depends on how many tokens each model uses at each rate.

A

AI Prime Tech publishes this blog. Articles are drafted with AI assistance; check version-specific details such as model IDs, prices and limits against the official documentation before relying on them.

Get cheaper Claude API access

One API key for Claude (Fable, Opus, Sonnet, Haiku) and GPT-6 models. Pay as you go, or pick a plan.

Get Your API Key →
AI Prime Tech is an independent third-party API gateway. Claude™ and Anthropic® are trademarks of Anthropic, PBC. No affiliation or endorsement is implied.