All models
Z.ai

GLM-5 API: pricing, base URL and quick setup

Use GLM-5 on A2Agent with model ID glm-5. The catalog lists a 200K context window. Check token rates below and verify the features your app needs.

Specifications and pricing

Model IDglm-5
PlatformZ.ai
Context window200K
Tagged forchat, agent
Discount—
Input / 1M tokens$1.00
Output / 1M tokens$3.20

USD per 1M tokens. Final billing depends on your API key group and metered usage.

Cheapest way to use GLM-5

Prices on this page come from the live catalog. Compare the official price with the A2Agent price in the table above, then multiply by your monthly token volume.

Quick setup

curl https://a2agent.me/v1/chat/completions \
  -H "content-type: application/json" \
  -H "authorization: Bearer sk-your-a2agent-key" \
  -d '{
    "model": "glm-5",
    "messages": [{"role": "user", "content": "Reply with OK"}]
  }'

Using it from a coding client

Track prompt size as tool results accumulate. If a session approaches 200K tokens, reduce the context or compare a GLM model with a 1M window.

How it compares within its family

These comparisons use catalog context limits, tags and reference rates, not independent quality benchmarks. Rates can change. Check current pricing above and test your workload; a higher price or a larger context window does not establish better results.

GLM-5 is the agent-tagged member of the Z.ai family and the lowest-priced non-Flash GLM model sold here, at $1.00 per million input tokens and $3.20 output. It is also the shortest: 200K, against 1M on GLM-5.2, GLM-5.3 and GLM-5.3 Flash. GLM-5.1 shares the same 200K window but is tagged for coding and lists a little higher, at $1.15 and $4.00. For these Z.ai models, the main catalog differences are price, context length, and tags. GLM-5 is tagged for agents. GLM-5.1 is tagged for coding at the same window size. The 5.2 and 5.3 releases are what you move to when a prompt outgrows 200K. The larger window comes with a higher price per token.

Other models on this platform

Questions

Which GLM should I use for agent work?

GLM-5 is the one tagged for agents here. GLM-5.1, GLM-5.2 and GLM-5.3 carry the coding tag, and GLM-5.3 Flash carries vision.

What is the context window?

200K tokens, the shortest of the GLM models sold here.

Is it cheaper than GLM-5.1?

Yes, on both sides: $1.00 against $1.15 on input and $3.20 against $4.00 on output, at list.

Can I call it with the Anthropic SDK?

Yes. The gateway exposes /v1/messages next to the OpenAI endpoints, and the same key works on both.

Billed per token. Top up from $1, no top-up fee.