Use the Right Z.ai Endpoint for the GLM 5.2 Coding Plan
Melvin Vivas · X post · 2026-06-21 · Open on X
Topics: LLM Fundamentals, AI Dev Tools & Productivity, LLMOps, Deployment & Monitoring · Level: intermediate
Summary
This post shares a tip from Ivan Fioravanti: GLM coding plan users should call the coding-optimized endpoint (api.z.ai/api/coding/paas/v4), not the general one (api.z.ai/api/paas/v4/). Where a tool supports it, use the Anthropic-compatible endpoint (api.z.ai/api/anthropic); Claude Code and OpenCode both do.
Key points
- Coding plan endpoint: https://api.z.ai/api/coding/paas/v4 (optimized for coding).
- Do not use the general endpoint https://api.z.ai/api/paas/v4/ with the coding plan.
- Anthropic-compatible endpoint: https://api.z.ai/api/anthropic. Use it where supported.
- Claude Code and OpenCode use the Anthropic-compatible endpoint.
- The caption link to the coding endpoint is cut off; the full path ends in /paas/v4.
Resources mentioned
- Z.ai coding plan API endpoint · docs · api.z.ai · paid
Coding-optimized OpenAI-compatible endpoint for the GLM coding plan; the full path is https://api.z.ai/api/coding/paas/v4. - Z.ai general API endpoint (paas/v4) · docs · api.z.ai · paid · open in a browser to verify
General-purpose Z.ai API endpoint, which should not be used with the coding plan. - Z.ai Anthropic-compatible endpoint · docs · api.z.ai · paid
Anthropic-API-compatible endpoint for using GLM models in tools like Claude Code and OpenCode. - Ivan Fioravanti (@ivanfioravanti) on X · person · x.com · free
AI practitioner who shares tips on local and open models and coding setups. - OpenCode · tool · x.com · free
Open-source terminal coding agent that can be configured with different model providers, including open models.
Also in: T3Code: a better interface for terminal coding agents (Melvin Vivas on X · notes), OpenCode Go: Open Coding Models (DeepSeek, Qwen, Kimi, GLM) for $10/mo (Melvin Vivas on X · notes), Trying OpenCode Go After Upgrading OpenCode (Melvin Vivas on X · notes), Orchestrator + Subagents in opencode with Open Models (Melvin Vivas on X · notes) and 10 more - Claude Code · tool · code.claude.com · paid · recommended by both Bashiri Smith & Melvin Vivas
Build agents and pipelines from the terminal; the guide's main agentic coding tool.
Also in: Create Claude Code Plugins with /plugin-authoring (Melvin Vivas on X · notes), Claude Code mods: customize behavior and UI with plugins (Melvin Vivas on X · notes), AI Engineer Roadmap Overview: From ML Foundations to RAG, Agents & Ops (Bashiri Smith on Facebook · notes), SkillsBento: Free Plugin Marketplace for Codex and Claude Code (Melvin Vivas on X · notes) and 101 more
Try this
- Check that your GLM coding plan setup uses https://api.z.ai/api/coding/paas/v4 (OpenAI-style) or https://api.z.ai/api/anthropic (Anthropic-style).
- Switch away from https://api.z.ai/api/paas/v4/ if you are on the coding plan.
More in LLM Fundamentals
- Google Interactions API is GA: recommended for Gemini
- GLM 5.2 open model now deployable on Google Cloud
- GLM 5.2 as a Default Open Model for Claude Code
- GLM 5.2 Leads Open-Source Models on Datacurve's Deep SWE Leaderboard
- GLM 5.2 vs Opus 4.8 for Landing Page Design: 6x Cheaper
- Free GLM-5.2 via Hugging Face Inference Providers in coding agents