How to Use GLM 5.2 Inside Claude Code in 5 Minutes

How to Use GLM 5.2 Inside Claude Code in 5 Minutes

Installation and Setup of Visual Studio Code for Cloud Code

Installing Visual Studio Code

  • Begin by installing Visual Studio Code, an Integrated Development Environment (IDE) that allows you to use Cloud Code in a unified workspace.
  • The installation is free, making it accessible for all users.

Setting Up Cloud Code Extension

  • After installation, navigate to the extensions section in VS Code to install the Cloud Code extension.
  • Create a new folder named .Claude and add a file called settings.json within this folder.

Configuring settings.json

  • Copy and paste the provided configuration into your settings.json. A link will be available in the video description for easy access.
  • Set the base URL for Anthropic to https://openrouter.ai/api, which is necessary for API key integration.

API Key Generation and Configuration

Creating an OpenRouter Account

  • Sign up for an OpenRouter account. It’s recommended to add at least $5 in credits to utilize various models effectively.

Generating Your API Key

  • In your profile on OpenRouter, navigate to "API keys" and create a new key. Name it appropriately (e.g., "API key for Claude").
  • Leave rate limits and credit limits as default; set expiration date if desired but typically keep it without expiration.

Integrating API Key into Cloud Code

  • Copy your newly created API key back into your settings.json file, replacing any placeholder text.

Using GLM 5.2 Model with Cloud Code

Switching Models

  • After saving changes, open a new instance of Cloud Code to interact with the GLM 5.2 model seamlessly.

Testing Functionality

  • To verify functionality, type "hello" in the interface; you should receive a response confirming that everything is operational.
Video description

Learn how to make money with AI πŸ‘‰ https://skool.com/aiworkshop Video Prompts + Free Resource πŸ‘‰ https://bit.ly/aiw-lite-about Work with us to implement AI into your business πŸ‘‰ https://bit.ly/AIW-Discovery-Call Check out my AI Saas πŸ‘‰ https://citevue.com Settings.json code: { "env": { "ANTHROPIC_BASE_URL": "https://openrouter.ai/api", "ANTHROPIC_AUTH_TOKEN": "YOUR API KEY", "ANTHROPIC_MODEL": "z-ai/glm-5.2", "ANTHROPIC_DEFAULT_OPUS_MODEL": "z-ai/glm-5.2", "ANTHROPIC_DEFAULT_SONNET_MODEL": "z-ai/glm-5.2", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "z-ai/glm-5.2", "ANTHROPIC_SMALL_FAST_MODEL": "z-ai/glm-5.2", "CLAUDE_CODE_SUBAGENT_MODEL": "z-ai/glm-5.2" } In this video, I show you how to use GLM 5.2 inside Claude Code in just a few minutes. GLM 5.2 is getting a lot of attention right now as an open-source AI coding model, and many people are testing it as an alternative to more expensive coding models. In this tutorial, I walk you through the simple setup process so you can connect GLM 5.2 to Claude Code and start using it for your own AI coding workflows. We’ll go through the full setup step by step, including how to configure Claude Code, connect GLM 5.2 through OpenRouter, add your API key, and confirm that everything is working inside VS Code. If you want to use GLM 5.2 for coding, vibe coding, agentic engineering, AI app building, or cheaper Claude Code workflows, this video will show you exactly how to get started. By the end, you’ll know how to: βœ… Set up GLM 5.2 inside Claude Code βœ… Connect Claude Code with OpenRouter βœ… Add your API key correctly βœ… Use GLM 5.2 inside VS Code βœ… Start building with an open-source AI coding model This is a quick setup tutorial for anyone who wants to try GLM 5.2 inside Claude Code without wasting time figuring out the configuration.