Zhipu AI: GLM-5
glm-5- Input / Output
- $1.00 / $3.20
- Context
- 200K
- Max output
- 128K
- Modalities
- Chat
- Capabilities
- Tool usePrompt Cache
About GLM-5
GLM-5 is Z.ai's foundation model for agentic engineering and complex system tasks, with 744B total parameters and 40B active, trained on 28.5T tokens. It is a text-only model. Within the GLM line it is the base generation that GLM-5-Turbo and GLM-5.1 build on, and Z.ai reports software-engineering results aligned with Claude Opus 4.5.
Where it works well
- Z.ai reports 77.8 on SWE-bench Verified and 56.2 on Terminal Bench 2.0, which it describes as aligned with Claude Opus 4.5 in software engineering.
- Z.ai ranks it first among open-weight models on BrowseComp, MCP-Atlas, and tau2-Bench agent evaluations.
- Function calling, context caching, streaming, and a thinking mode are all supported.
- The parameter count grew from 355B in GLM-4.5 to 744B, with active parameters rising from 32B to 40B.
When to choose another model
- It is a text-only model with text input and output.
- GLM-5.1 and later GLM releases report higher coding results, so GLM-5 suits stable existing integrations more than new builds.
Getting started
Create API key
Create a key in Console, then use it with every model on the platform.
Send your first request
Copy the example for your language and run it against the endpoint.
Text to textMessages APIPOST/v1/messagesAPI format:curl https://api.tokenlab.sh/v1/messages \ -H "Content-Type: application/json" \ -H "x-api-key: sk-xxx" \ -H "anthropic-version: 2023-06-01" \ -d '{ "model": "glm-5", "max_tokens": 1024, "messages": [ {"role": "user", "content": "Hello!"} ] }'
Pricing
The Verified price applies to Verified, which costs less on most models. The Official price is the model maker's published price and applies to the more reliable Official route. Auto bills the route that completes the request.
Default
per 1M tokens- Official price
- Input $1.00 / Output $3.20 / Cache read $0.20 / Cache write $1.00 / Text Input $1.00 / Text Output $3.20
- Verified price
- —
- Discount
- —
Cache read
- Official price
- $0.20
- Verified price
- —
- Discount
- —
Cache write
- Official price
- $1.00
- Verified price
- —
- Discount
- —
| Official priceper 1M tokens | Verified priceper 1M tokens | Discount | |
|---|---|---|---|
| Default | Input $1.00 / Output $3.20 / Cache read $0.20 / Cache write $1.00 / Text Input $1.00 / Text Output $3.20 | — | — |
| Prompt cache pricing | |||
| Cache read | $0.20 | — | — |
| Cache write | $1.00 | — | — |
Usage & activity
Success rate is the share of requests that completed. Latency is how long a full response takes; P95 means 95% of requests finished within that time.
Usage & availability
Last 24 hours- Requests
- Success rate
- P95 latency
- Total tokens
Data is based on aggregate user requests, excluding status checks.
Open in Console
Open GLM-5 in Console with a prompt ready to edit or send.
Help me try glm-5 with a short message at /v1/messages. Show the reply, latency, and cost.
Use cases
Backend code generation
Generate and review services, migrations, and tests where the surrounding architecture is described in text.
Tool-using agents
Run agents that call search, database, and ticketing tools through function calling and return results in a fixed format.
Technical analysis
Read logs, specs, and design documents and produce findings in a consistent list format for downstream systems.
Prompt examples
Review this pull request diff for race conditions and list each finding with file, line, and a suggested fix.
Use the query_db tool to find users with duplicate emails, then draft a safe merge plan as numbered steps.
Write a Python script that watches a directory, uploads new CSVs, and retries failed uploads with backoff.
This model has conditional pricing. Monthly token totals alone cannot produce a reliable estimate; use the detailed pricing for the request specification, cache, and applicable time window.
FAQ
What exactly is GLM-5?
GLM-5 is Z.ai's fifth-generation GLM foundation model, aimed at agentic engineering. It has 744B total parameters with 40B active, is a text-only model, and supports thinking mode and function calling.
How does GLM-5 differ from GLM-5-Turbo?
GLM-5-Turbo is tuned from training time for OpenClaw-style agent workflows, with more reliable tool calls and faster long chains. GLM-5 is the general base model for coding, analysis, and engineering tasks.
What input does GLM-5 take?
Text only. GLM-5 reads prompts, code, logs, and documents as plain text and replies with text, so the whole task needs to be expressible in text.
Should I move from GLM-5 to GLM-5.1?
GLM-5.1 is aimed at long-horizon autonomous work and reports 58.4 on SWE-Bench Pro. Move if you run long agent sessions; keep GLM-5 where a tested prompt set already works.
How much does GLM-5 cost?
On TokenLab, GLM-5 costs Input $1.00 / Output $3.20 per 1M tokens. The pricing table above shows the full breakdown. Rates depend on the billing unit, specification, and usage. Compare matching conditions in the model's detailed pricing; a single rate does not determine the total cost.
What are the context window and output limit of GLM-5?
GLM-5 accepts up to 200,000 tokens of context and returns up to 128,000 tokens in one response.
Which endpoint should GLM-5 use?
Use https://api.tokenlab.sh/v1/messages for GLM-5. The request example below shows the matching code shape.
Which operations does GLM-5 support?
GLM-5 supports Text to text. Select an operation above to see its endpoint and request example.
Compare GLM-5
Sources
Reviewed Oct 2, 2026