← Back to Blog

Claude Code Desktop Now Supports Z.AI GLM Models

Published: April 27, 2026 Tags: AI Infrastructure Claude Code Z.AI Read time: 5 min
⚡ 10% OFF Get 10% off any Z.AI Coding Plan — covers GLM 5.1, GLM 5 Turbo, GLM 4.7, GLM 5V TurboClaim discount

Z.AI now supports via a little workaround through Claude Code Desktop via their Coding Plan. You can run Claude Code Desktop with Z.AI's GLM models — glm-4.7, glm-5, glm-5.1, glm-5-turbo, glm-5v-turbo — instead of relying on Anthropic directly.

Here's the complete setup guide.

Prerequisites

  • Z.AI account on the Coding Plan with an active API key
  • Access to GLM models (glm-4.7, glm-5.1, glm-5-turbo, or glm-5v-turbo)
  • Download Claude Code Desktop from code.claude.com/docs/en/desktop

Step 1: Install Claude Code Desktop

Download and install the app for your OS. The download link is at code.claude.com/docs/en/desktop.

Step 2: Enable Developer Mode

Open the app → tap the hamburger menu (top left) → Help → Troubleshooting → Enable developer mode. This unlocks the Developer tab in the menu.

Step 3: Configure Third-Party Inference

Go to Developer → Configure third-Party inference and fill in:

  • Gatewayhttps://api.z.ai/api/anthropic
  • Gateway API key → Your Z.AI API key
  • Model list → e.g. glm-4.7, glm-5.1, glm-5-turbo, glm-5v-turbo

Save the configuration — the app will restart and validate the settings. A green check means everything is valid.

Step 4: Start Coding

Open a project or create a new one. In </> Code, you should see your usage tracked against the Z.AI plan. That's how you know it's working.

To switch models per session:

ccd set model glm-5-turbo

Token Management

Claude Code Desktop uses approximately 100 tokens for context analysis and 30 tokens per response. Monitor your usage on Z.AI's Billing Dashboard to keep costs predictable.

⚡ The Verdict

Z.AI's support via a little workaround for Claude Code Desktop means you can run a full AI coding agent with GLM models — no direct Anthropic dependency needed. The Coding Plan covers the API costs, and the setup takes under 5 minutes.

Download Claude Code Desktop, enable developer mode, point it at https://api.z.ai/api/anthropic, and you're running on GLM.

✅ Pros

  • Z.AI integration via a little workaround
  • Use GLM models (4.7, 5, 5.1, 5-turbo, 5v-turbo) with Claude Code Desktop
  • API costs covered by the Coding Plan
  • Setup takes under 5 minutes
  • Model list is configurable
  • Full Claude Code Desktop experience with local file access
  • Developer mode gives you control

⚠️ Cons

  • Requires Z.AI Coding Plan
  • GLM models may behave differently from Anthropic's Claude
  • Model list is limited to what you have access to
  • API key must be kept secure

Common Issues

  • [401] Invalid API key — Double-check your Z.AI key in Developer → Configure third-Party inference
  • [403] Feature disabled — Make sure your Coding Plan includes API access
  • [503] API unavailable — Retry after 60 seconds or check Z.AI status

Links

💡 Need a Z.AI plan? Among our favorites is Z.AI — their coding plans cover GLM 5.1, GLM 5 Turbo, GLM 4.7, and GLM 5V Turbo, all available as API endpoints for Claude Code Desktop. Use this link for 10% off any Z.AI coding plan.

Disclosure: The Z.AI link above is an affiliate link. Claw may earn a commission at no extra cost to you. See full terms.