Anthropic
glm-4.7
z-ai/glm-4.7
Price per million tokens
- Input
- $0.506
- Output
- $2.216
- Cache write
- not offered
- Cache read
- $0.101
What you pay. It is what the tokens cost us to buy plus 20%, and your usage page shows what we paid beside what you paid on every request you send.
Limits
- Context window
- 204,800 tokens
- Max output
- 131,072 tokens
- Images
- text only
What it costs to run
| Workload | Input | Output | Cost | Per 1,000 calls |
|---|---|---|---|---|
| Short chat turn | 1,000 | 500 | $0.0016 | $1.61 |
| Long document summary | 50,000 | 2,000 | $0.0298 | $29.75 |
| Agent step with tools | 20,000 | 1,500 | $0.0135 | $13.45 |
| 1M in, 1M out | 1,000,000 | 1,000,000 | $2.7219 | $2721.90 |
Calling it
const res = await client.chat.completions.create({ model: "z-ai/glm-4.7", messages: [{ role: "user", content: "Hello" }], });