Setup guide - From GLM and Aider docs
Use GLM in Aider
Aider documents connecting to any OpenAI-compatible endpoint via OPENAI_API_BASE and OPENAI_API_KEY with an openai/ model prefix; combined with Z.ai's documented standard API endpoint https://api.z.ai/api/paas/v4 and model id glm-5.3.
Last verified 4 steps5 official sources
Steps
- Step 1.
Install aider.
Terminalpython -m pip install aider-install aider-install - Step 2.
Create a Standard API Key on Z.ai's API Keys page (https://z.ai/manage-apikey/apikey-list).
- Step 3.
Set the endpoint and key (Aider's documented variables, Z.ai's documented general endpoint).
Terminal# Mac/Linux: export OPENAI_API_BASE=https://api.z.ai/api/paas/v4 export OPENAI_API_KEY=<key> # Windows: setx OPENAI_API_BASE https://api.z.ai/api/paas/v4 setx OPENAI_API_KEY <key> # ... restart shell after setx commands - Step 4.
Run aider in your codebase with the model name prefixed by openai/.
Terminalcd /to/your/project aider --model openai/glm-5.3
Caveats
- Combined setup: Aider documents the OpenAI-compatible mechanism; Z.ai documents the endpoint https://api.z.ai/api/paas/v4/ and model id glm-5.3. Neither page names the other.
- Aider is not on Z.ai's list of supported GLM Coding Plan tools, so use a Standard API key on the general endpoint (pay-as-you-go), not the Coding Plan endpoint.
- Aider warns about models it does not know (see its model warnings page); context window and pricing metadata will not be populated for openai/glm-5.3.
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 Aider?
Aider documents connecting to any OpenAI-compatible endpoint via OPENAI_API_BASE and OPENAI_API_KEY with an openai/ model prefix; combined with Z.ai's documented standard API endpoint https://api.z.ai/api/paas/v4 and model id glm-5.3.
Which GLM model ids work in Aider?
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 Aider setup?
The steps draw on both GLM's and Aider's docs. It was last checked against 5 official pages on October 17, 2026.
Sources
Last verified against 5 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.