Setup guide - From GLM and Zed docs
Use GLM in Zed
Zed documents custom OpenAI-compatible providers under language_models.openai_compatible (with a key read from <PROVIDER_ID>_API_KEY); combined with Z.ai's documented standard endpoint https://api.z.ai/api/paas/v4 and GLM-5.3 (1M context, 128K max output).
Last verified 3 steps4 official sources
Steps
- Step 1.
Create a Standard API Key on Z.ai's API Keys page.
- Step 2.
In Zed, run agent: open settings, find Add Provider in the LLM Providers section, and fill in provider name, API URL, model ID and context window. Or add it to settings.json (Zed's documented shape, with Z.ai's URL and model).
JSON{ "language_models": { "openai_compatible": { "zai": { "api_url": "https://api.z.ai/api/paas/v4", "available_models": [ { "name": "glm-5.3", "display_name": "GLM-5.3", "max_tokens": 1000000 } ] } } } } - Step 3.
Enter the API key in the provider settings UI, or set the generated env var (provider ID in upper snake case plus _API_KEY). Do not put API keys in settings.json.
Terminalexport ZAI_API_KEY=<your Z.ai Standard API key>
Caveats
- Combined setup: Zed documents the openai_compatible mechanism and env var naming rule; Z.ai documents the endpoint and model. The provider ID zai and env var ZAI_API_KEY follow Zed's naming rule and are not printed on either page.
- max_tokens 1000000 reflects Z.ai's stated 1M-token context for GLM-5.3. Optional reasoning settings (reasoning_effort, capabilities.interleaved_reasoning) are documented by Zed but not verified against Z.ai.
- Zed is not on Z.ai's supported Coding Plan tools list, so use a Standard API key on the general endpoint (pay-as-you-go).
- This config applies to Zed Agent and other Zed-owned AI features, not external agents.
More setup guides
Same tool, other providers
Related reading
- Anthropic's GLM-5.3 Cyber Report: The Numbers, the Backlash, and What Developers Should Take From ItAnthropic's GLM-5.3 cyber report: exploit numbers against Claude Mythos Preview, how its safeguards were stripped, the backlash, and the read for developers.
- GLM-5.3 Free and Cheap: Every Route and Price (October 2026)GLM-5.3 has no free hosted tier. Cheapest on October 9: Wafer via OpenRouter at $0.049/$3.39, Flash from $0.075/$0.25. Z.ai's promos ended October 7.
- Prime Agent: A Self-Improving Coding Harness Where Everything Is PythonPrime Agent is Prime Intellect's open-source coding harness with one tool, a persistent IPython kernel. How it works, its benchmarks, and Claude Code compared.
- Cloudflare Runs Kimi and GLM at Scale: FP8 KV Caches, INT4 Weights, and a Cache Safety NetCloudflare runs Kimi K2.6 and GLM 5.2 on Workers AI with FP8 KV caches, INT4 weights and a KV cache integrity check. What each technique buys on GPU fleets.
- Colibri: Run GLM 5.2 on a 32GB Laptop With Disk StreamingA solo developer built a 1,300-line C inference engine that runs the 744B GLM 5.2 model on consumer hardware by streaming routed experts from disk.
- GLM 5.2 Matches Human Bookkeeper Accuracy on UK VAT Returns - With Some CaveatsGLM 5.2 UK VAT return benchmark: how the model handled 59 transactions with near-human bookkeeper accuracy, where it erred, and why HN focused on liability.
FAQ
How do I use GLM in Zed?
Zed documents custom OpenAI-compatible providers under language_models.openai_compatible (with a key read from <PROVIDER_ID>_API_KEY); combined with Z.ai's documented standard endpoint https://api.z.ai/api/paas/v4 and GLM-5.3 (1M context, 128K max output).
Which GLM model ids work in Zed?
The official docs read for this guide list glm-5.3 and glm-5.3-flash. Requests go to https://api.z.ai/api/paas/v4.
Is this an official GLM and Zed setup?
The steps draw on both GLM's and Zed's docs. It was last checked against 4 official pages on October 17, 2026.
Sources
Last verified against 4 official pages.
Newsletter
New models, set up the day they ship
One email per week. New model releases, the coding tools that support them and how to wire them up.