GLM API: a Z.ai key, GLM-5.3 and Flash, and a route without a foreign card
The GLM API from Z.ai (Zhipu) is OpenAI-compatible: a key, a base_url and a model name, and GLM-5.3 works in any OpenAI SDK code, Cline, Kilo Code or OpenCode. Below: the official route, models and prices, the free models, an OpenAI-compatible route through Twelver and a cost calculator.
Short answer
Officially: an account on z.ai, a top-up on the Billing page, then API Keys → create a key. Base URL https://api.z.ai/api/paas/v4/, models glm-5.3 and glm-5.3-flash. Through Twelver: the zai (GLM-5.3) and zai-flash (GLM-5.3-Flash) series, with a key issued on this page with no signup and no card.
Models and official prices
| Model | Input | Cached input | Output |
|---|---|---|---|
| glm-5.3 | $1.40 | $0.26 | $4.40 |
| glm-5.2 | $1.40 | $0.26 | $4.40 |
| glm-5.3-flashx | $0.37 | $0.075 | $1.25 |
| glm-5.3-flash | $0.15 | $0.03 | $0.50 |
| glm-4.7-flash, glm-4.5-flash | free | free | free |
GLM-5.3 is text-only, with a 1M-token context and up to 128K output tokens. Reasoning is always on; reasoning_effort picks low, high or max (default), and "thinking": {"type": "disabled"} now fails. GLM-5.3-Flash is multimodal and about nine times cheaper on input.
GLM through Twelver
| Series | Model | $ per 1M |
|---|---|---|
| zai-flash | GLM-5.3-Flash | 0.244 / 0.813 |
| zai | GLM-5.3 | 2.28 / 7.15 |
Right here
Base URL and key for GLM
Your own values appear in the block and drop straight into the code below.
Press it and get your base_url and API key.
No sign-up, no card.
Free. Your key appears right here.
glm.pyThe highlighted parts are stand-ins. The button above issues them in seconds, no sign-up.from openai import OpenAI
client = OpenAI(base_url="https://twelver.ru/api/ai/<your-config-id>/v1", api_key="sk-<your-key>")
reply = client.chat.completions.create(
model="zai", # GLM-5.3; "zai-flash" for cheap bulk requests
messages=[{"role": "user", "content": "Write tests for this function: ..."}],
)
print(reply.choices[0].message.content)Work out what the requests cost
Pick a workload or type your own numbers — the calculator multiplies them by each series’ rates. A token is roughly 4 characters of English text or code.
zaiGLM-5.3$231 per monthzai-flashGLM-5.3-Flash$24.89 per monthautoQwen3.7-Plus$67.86 per monthgrokGrok 4.7$328 per monthTwelver rates as of 4 November 2026; tokens are billed as actually used, caching and discounts not included. The arithmetic runs in your browser.
Agent setup: Cline, Kilo Code, OpenCode. The model itself: GLM 5.3 in Twelver. Other models: Grok API, Qwen API. The whole book: API for AI agents.
Frequently asked questions
How do I get a GLM API key?
Is there a free GLM API?
Why does GLM-5.3 return an error about thinking?
Can I use GLM without a Z.ai top-up?
Try it yourself
Everything in this guide runs inside Twelver
One chat for text, images, video, music and voice — no separate services or subscriptions.
Open Twelver chat