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
.Claudeand add a file calledsettings.jsonwithin 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.jsonfile, 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.