model comparison

vs

GLM-5.4 vs Grok 4.7

Zhipu AI against xAI, compared on listed price, real workload cost, context and capabilities.

our take

Z.ai's GLM-5.4 adds video to text and image input; xAI's Grok 4.7 documents low, medium, high and xhigh reasoning effort. Z.ai limits API access to GLM Coding Plan users; xAI rejects presencePenalty, frequencyPenalty and stop.

pick GLM-5.4 if

  • need video input

pick Grok 4.7 if

  • want xhigh reasoning-effort control

checked 2026-11-30. sources: Z.ai docs: GLM-5.4,xAI Grok 4.7 announcement,xAI docs: reasoning guide

the short answer

  • GLM-5.4 lists lower input and output prices.
  • GLM-5.4 offers the larger context window.
  • GLM-5.4 reads cached input for less ($0.26/M against Grok 4.7's $0.5/M), which decides the bill for agents that resend long context.

side-by-side specs

specGLM-5.4Grok 4.7
providerZhipu AIxAI
input price$1.4/M$2/M
output price$4.4/M$6/M
cached input$0.26/M$0.5/M
blended price (3:1)$2.15/M$3/M
context window1M tokens500k tokens
max output128k tokens—
inputtext, images, videotext, images
structured outputyesyes
weightsclosedclosed
releasedNovember 23, 2026September 21, 2026

same work, both models

workloadGLM-5.4Grok 4.7
one chat reply3,000 tokens in, 500 outGrok 4.7 costs 1.4× as much as GLM-5.4$0.0064$0.009
summarise a 100-page report50,000 tokens in, 1,500 out, one request$0.08$0.11
1,000 classification calls500 tokens in, 20 out, per call$0.79$1.12
coding-agent session2M tokens in across ~60 turns, 60,000 out, no cache$3.06$4.36
same session, cached85% of input read from the prompt cache, the rest written to itGrok 4.7 costs 1.6× as much as GLM-5.4$1.13$1.81

at listed rates. token counts are typical sizes, not measurements.

GLM-5.4 pricing notes

  • Z.ai has published no per-token price; the rate shown is a placeholder at GLM-5.3's rates (cache hits $0.26 per 1M) until it does.

Grok 4.7 pricing notes

  • once a prompt reaches 200K tokens, every rate doubles for the whole request ($4 input, $12 output, $1 cached); the listed price is the sub-200K rate.

when to pick which

GLM-5.4

GLM-5.4 is Z.ai's flagship and its first model built on a Loop Transformer, which runs 28 layers of the GLM-5 base twice. it reads video, images, text and files across a 1M-token context.

pick it if

  • you want Z.ai's newest flagship with image and video input on a 1M window
  • you already use GLM-5.3 and want its successor at the same listed rate
  • you need JSON structured output from a reasoning model

skip it if

  • you need open weights; GLM-5.3 publishes them, GLM-5.4 has none yet
  • you need short, predictable latency; Z.ai says it can get caught in long thinking loops

Grok 4.7

xAI's model for coding and knowledge work, launched September 2026 as the successor to Grok 4.6 at the same price and speed. it takes text and images, and reasoning is always on.

pick it if

  • you want xAI's top model for coding and multi-hour terminal tasks
  • your prompts repeat: cached input bills at a quarter of the input rate
  • you need text and image input in one 500K window

skip it if

  • Grok Build 0.1 fits your work: half the input, a third the output price
  • you need a non-reasoning mode: reasoning on Grok 4.7 cannot be disabled

faq

which is cheaper, GLM-5.4 or Grok 4.7?

GLM-5.4 lists lower input and output prices. on a coding-agent session (2M tokens in, 60,000 out) GLM-5.4 costs $3.06 and Grok 4.7 $4.36.

which has the larger context window?

GLM-5.4 offers the larger context window. GLM-5.4: 1M tokens; Grok 4.7: 500k tokens.

can i switch between GLM-5.4 and Grok 4.7 mid-task?

yes. in an octomind session, /model octohub:glm-5.4 and /model octohub:grok-4.7 switch models without losing the conversation, so you can draft on one and review on the other.

try either model

switch between models inside the same octomind session.

prices from the catalog of 2026-12-01