xAI vs Z.ai
xAI sells closed Grok models with native X data. Z.ai sells MIT-licensed GLM models, a free Flash tier and an $18 coding plan that drops into Claude Code.
By The Subconscious Team · Updated
xAI vs Z.ai: key differences
Z.ai competes on price and openness. GLM-5.3 costs $1.40 in and $4.40 out per million, GLM-5.3-Flash $0.075 in and $0.25 out, and several older Flash models are free. Its GLM Coding Plan runs $18 a month on the Lite tier, and an Anthropic-compatible endpoint lets Claude Code run on GLM with a few environment variables. xAI competes on data and output price: Grok 4.6 at $2 in and $6 out, Grok 4.20 at $1.25 in and $2.50 out with 1M context, and Web Search and X Search tools that no other lab offers natively.
Geography matters for both, in different ways. Z.ai's servers sit mostly in China, adding 100 to 200ms from the US or Europe and raising data concerns. xAI's limit is a smaller enterprise footprint and fewer cloud-marketplace options than the biggest labs. For budget coding inside Claude Code, Z.ai's flat plan is hard to match, though its quota burns 2 to 3x faster on premium models during Beijing peak hours. For social-sentiment, news and market agents, Grok's X access decides it. Teams that want to self-host get that only from GLM.
What xAI and Z.ai do
xAI
xAI sells the Grok models through its own API. Grok 4.6 is the current flagship and xAI tells developers to use it for everything outside audio, image and video, code included. It has a 500K context window and costs $2 in and $6 out per million tokens under 200K prompt tokens. Older Grok 4.20 and 4.3 models keep a 1M window at $1.25 in and $2.50 out, which is aggressive for that capability class.
Example models: Grok 4.6, Grok 4.20
Full xAI profileZ.ai
Z.AI is the international brand of Chinese lab Zhipu AI, maker of the GLM models. Its current flagship, GLM-5.3, shipped August 17, 2026 at $1.40 in and $4.40 out per million tokens, with cached input at $0.26. GLM-5.3-Flash costs $0.075 in and $0.25 out, and several older Flash models are priced at zero, a real free tier instead of trial credits. GLM-5, released in February 2026, is a 744B mixture-of-experts model under an MIT license, and at launch it ranked first among open-weight models on the Artificial Analysis index with a record-low hallucination score.
Example models: GLM-5.3, GLM-5.3-Flash
Full Z.ai profileShould you choose xAI or Z.ai?
xAI vs Z.ai at a glance
| Attribute | ||
|---|---|---|
| Model access | Closed | Open weights (MIT) |
| Flagship models | Grok 4.6, Grok 4.20, grok-build | GLM-5.3, GLM-5.3-Flash |
| Speed | ~54 tok/s on Grok 4.6 | ~80 tok/s on GLM-5.3 |
| Price | $2 in, $6 out (Grok 4.6); 2x past 200K | $1.40 in, $4.40 out (GLM-5.3); free Flash tier |
| Customization | Unknown | Open weights, no license limits |
| Deployment | First-party API | API, GLM Coding Plan |
| Long context | 500K (4.6), 1M (4.20, 4.3) | 1M (GLM-5.3) |
Frequently asked questions
What is the difference between xAI and Z.ai?
xAI sells closed Grok models with native X data. Z.ai sells MIT-licensed GLM models, a free Flash tier and an $18 coding plan that drops into Claude Code.
When should I choose xAI over Z.ai?
News, market and social-sentiment agents; Low-latency access from the US or Europe; Closed models with separate media APIs.
When should I choose Z.ai over xAI?
Budget agentic coding inside Claude Code; Free Flash models for prototyping; Self-hosting MIT-licensed weights with no license limits.
Is xAI or Z.ai cheaper?
xAI: $2 in, $6 out (Grok 4.6); 2x past 200K. Z.ai: $1.40 in, $4.40 out (GLM-5.3); free Flash tier. The cheaper choice depends on the model and workload.
Which has more context, xAI or Z.ai?
xAI: 500K (4.6), 1M (4.20, 4.3). Z.ai: 1M (GLM-5.3).
Related comparisons
Running long-horizon agents?
If your agents run past 200K tokens, compare both against Subconscious. Our inference stack treats a long-horizon trace as the primary workload, so speed, cost, and accuracy hold up deep into the trace.