z-ai
Z.ai: GLM 5
z-ai/glm-5
GLM-5 is Z.ai’s flagship open-source foundation model engineered for complex systems design and long-horizon agent workflows. Built for expert developers, it delivers production-grade performance on large-scale programming tasks, rivaling leading...
- Type
- text
- Provider
- z-ai
- Model ID
- z-ai/glm-5
- Capabilities
- tools, reasoning
- Context window
- 205K tokens
- Self-hostable
- Yes — runs on your own GPU
- Input price
- $0.66 / 1M tokens
- Output price
- $2.11 / 1M tokens
Cloud price is billed from prepaid credits when a request fails over to the cloud. Open-weight models run free on GPUs you own — the gateway routes to your nodes first.
What it costs to run
cloud · 1M in + 1M out
$2.77
$0.66 for a million input tokens plus $2.11 for a million output tokens, billed from credits only when a request fails over to the cloud.
your hardware
$0 / token
Served from a workstation or on-prem server you own, there is no per-token fee — the marginal cost is power.
Run it on your own hardware
Estimated GPU memory for Z.ai: GLM 5 (754B parameters), including the KV cache for a 8,192-token context.
- Q4_K_M
- ~429.7 GBmulti-GPU or large unified memory
- Q8_0
- ~745.7 GBmulti-GPU or large unified memory
- FP16 / BF16
- ~1405.7 GBmulti-GPU or large unified memory
Install the agent on the machine and it dials out to the gateway over a single WebSocket — no port forwarding or inbound firewall rules. Requests for this model go to your node first and fail over to the cloud only when it can't serve.
/// initialize
Call Z.ai: GLM 5 through one OpenAI-compatible endpoint.
Serve it from hardware you own, with cloud failover when your nodes are busy or offline.
no credit card · 2 nodes free · openai-compatible
Frequently asked questions
- What is the context window of Z.ai: GLM 5?
- Z.ai: GLM 5 accepts up to 204,800 tokens (205K) of context per request.
- How much does Z.ai: GLM 5 cost per million tokens?
- Through Wide Area Intelligence, Z.ai: GLM 5 costs $0.66 per 1M input tokens and $2.11 per 1M output tokens when served from the cloud, billed from prepaid credits. A workload of 1M input plus 1M output tokens costs $2.77.
- Can I run Z.ai: GLM 5 on my own hardware?
- Yes — Z.ai: GLM 5 is an open-weight model you can run on a workstation or on-prem server you own. At Q4_K_M it needs roughly 429.7 GB of GPU memory with an 8,192-token context — more than a single 80 GB card, so plan for multiple GPUs or a large unified-memory machine. Wide Area Intelligence routes requests to your own nodes first and fails over to the cloud only when they can't serve.