How do I use GLM 5.3 in Claude Code?
Point Claude Code at https://api.stdcmpt.com with a Standard Compute key and set ANTHROPIC_MODEL to z-ai/glm-5.3, with z-ai/glm-5.3-flash in the haiku and subagent slots: GLM 5.3 then runs Claude Code with no Z.ai account, on a plan from $19 a month that returns HTTP 402 to new requests once its compute budget is used.
# GLM 5.3 for the session, GLM 5.3 Flash for subagents and background calls
# No /v1 here: Claude Code adds /v1/messages itself.
export ANTHROPIC_BASE_URL=https://api.stdcmpt.com
export ANTHROPIC_AUTH_TOKEN=YOUR_API_KEY
export ANTHROPIC_MODEL=z-ai/glm-5.3
export ANTHROPIC_DEFAULT_OPUS_MODEL=z-ai/glm-5.3
export ANTHROPIC_DEFAULT_SONNET_MODEL=z-ai/glm-5.3
export ANTHROPIC_DEFAULT_HAIKU_MODEL=z-ai/glm-5.3-flash
export CLAUDE_CODE_SUBAGENT_MODEL=z-ai/glm-5.3-flash
claude
Replace YOUR_API_KEY with a key from the dashboard. The Z.ai tab is Z.ai's own Claude Code setup.
Screenshots are the one thing that breaks
GLM 5.3 is text-only. A pinned text-only model answers an image with HTTP 400 ("does not support image input"), so a pasted screenshot fails that turn. Switch with /model z-ai/glm-5.3-flash, which reads images, for the turn that needs one.
Everything else, feature by feature
| Claude Code feature | GLM 5.3 | GLM 5.3 Flash |
|---|---|---|
| Tools and MCP servers | Work | Work |
| Images | HTTP 400 | Work |
| Reasoning | Level set on the Models page | Level set on the Models page |
| Thinking toggle | No effect | No effect |
| WebSearch tool | Not available | Not available |
Gateway catalog and Messages translation, October 14, 2026. Claude Code assumes a 200K window for both IDs; set CLAUDE_CODE_MAX_CONTEXT_TOKENS for more.
What a day of GLM costs
GLM 5.3's cached input lists at $0.26 per million, against $0.10 for Claude Sonnet 5.5. Since most of an agent's input is cache hits, a typical GLM 5.3 day ($3.65) costs slightly more than the same day on Sonnet 5.5 ($3.36), despite GLM's lower input price.
| Per day | GLM 5.3 | GLM 5.3 Flash |
|---|---|---|
| Typical day | $3.65 | $0.41 |
| Busy day | $37 | $4.14 |
| Typical days in the $20 Starter budget | 5 | 49 |
Z.ai list prices per million tokens: GLM 5.3 $1.40 input, $0.26 cached, $4.40 output; GLM 5.3 Flash $0.15, $0.03, $0.50. Source. A typical day is 8.5M tokens and a busy one 86.7M, 87.2% of input as cache reads: the median and 90th-percentile coding-agent day in our Agent Burn Index, measured on OpenCode, Cline, Kilo and similar agents, September 13 to October 12, 2026. Priced at the list rates above; your own days will differ.
The catch
If GLM is all you run, look at Z.ai first. Its endpoint, https://api.z.ai/api/anthropic, works with Claude Code per token, and its GLM Coding Plan starts at $18 a month by Z.ai's own pricing. Out of the box Z.ai maps all three Claude names to GLM-5.3-Flash, so set the opus and sonnet slots if you want GLM 5.3 itself.
Where Standard Compute fits
No Z.ai sign-up or top-up: pay by card in US dollars, and switch from GLM to Claude, GPT or Gemini with /model on the same key.
FAQ
Should I use GLM 5.3 or GLM 5.2 in Claude Code?
GLM 5.3. Z.ai lists both at the same price, and GLM 5.3 takes reasoning levels where 5.2 only switches reasoning on or off.
Why does Claude Code compact early on GLM?
Claude Code assumes 200K tokens for model IDs it does not recognize. Set CLAUDE_CODE_MAX_CONTEXT_TOKENS to the window you want; on this endpoint keep it under about 850K, where requests stop. A larger window also makes each turn cost more.
Is there a US-served GLM 5.3?
Yes: z-ai/glm-5.3:us, text-only like the base model.