pick GLM-5.4 if
- need video input
model comparison
Zhipu AI against xAI, compared on listed price, real workload cost, context and capabilities.
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.
checked 2026-11-30. sources: Z.ai docs: GLM-5.4,xAI Grok 4.7 announcement,xAI docs: reasoning guide
| spec | GLM-5.4 | Grok 4.7 |
|---|---|---|
| provider | Zhipu AI | xAI |
| 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 window | 1M tokens | 500k tokens |
| max output | 128k tokens | — |
| input | text, images, video | text, images |
| structured output | yes | yes |
| weights | closed | closed |
| released | November 23, 2026 | September 21, 2026 |
| workload | GLM-5.4 | Grok 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 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.
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.
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.
GLM-5.4 offers the larger context window. GLM-5.4: 1M tokens; Grok 4.7: 500k tokens.
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.
switch between models inside the same octomind session.
prices from the catalog of 2026-12-01