Run GLM-5.2 in Claude Code with NVIDIA API Key Rotation
This guide documents a local setup that connects Claude Code to NVIDIA's OpenAI-compatible API through Claude Code Router (CCR). A small local Node.js proxy rotates NVIDIA API keys, applies a per-key request limit, handles proxy internet access, retries selected failures, and falls back to other NVIDIA-hosted models when GLM-5.2 is temporarily unavailable
0 of 13 steps complete
Runs z-ai/glm-5.2 inside the Claude Code CLI. Keeps NVIDIA keys outside the CCR configuration. Rotates requests across multiple keys in round-robin order. Limits each key to 38 requests per rolling 60-second window, leaving a small margin below a nominal 40 RPM provider limit. Waits for the next available key slot when every key reaches its local limit. Retries other keys for selected HTTP failures. Places a model in a 10-minute cooldown after an NVIDIA 429 response. Tries meta/llama-3.1-8b-instruct and openai/gpt-oss-20b as fallback models. Uses non-streaming requests between the local proxy and NVIDIA to reduce ECONNRESET and fetch failed errors. Honors HTTP_PROXY , HTTPS_PROXY , and ALL_PROXY through Node's NODE_USE_ENV_PROXY=1 support. Exposes local /health and /rate monitoring endpoints.
if you find it difficult contact us on whatsapp the link is available
or install this CLI :https://github.com/STEVOHCODER/claude-glm-router
Architecture
claude-glm | v Claude Code Router (CCR) http://127.0.0.1:3456 | v NVIDIA key rotator http://127.0.0.1:3466 | +--> Key 1 (up to 38 RPM locally) +--> Key 2 (up to 38 RPM locally) +--> Key N (up to 38 RPM locally) | v System HTTP/HTTPS proxy, when configured | v https://integrate.api.nvidia.com/v1/chat/completions | +--> z-ai/glm-5.2 +--> meta/llama-3.1-8b-instruct (fallback) +--> openai/gpt-oss-20b (fallback)

Install the two CLI packages from PowerShell
Create the router directory:
If you already use CCR, back up its configuration before replacing it:
Files created
CCR configuration
NVIDIA key rotator if you have more than 1 key
Start script
Stop script
Safe key-adder script
Claude launcher
Start and use GLM-5.2
INSTALL GLM 5.2 CLI FROM GITHUB DIRECTLY
Related AI setup guides
Install Claude Code Using OpenRouter (Free)
Get Claude Code running for free in minutes using OpenRouter's generous free-tier models. No Anthropic account needed.
AI Coding AssistantsInstalling claude code for free
This methods is not very much legal
AI Coding AssistantsInstall OpenAI Codex CLI
Run OpenAI's Codex CLI from your terminal to automate coding tasks, write scripts, and modify files with AI.
AI Coding AssistantsHow to Use Codex For Free using Freemodel
If you want to use the official Codex Desktop app but bypass the standard OpenAI API costs, you can route your requests through FreeModel. This is perfect for testing out complex Python workflows, running intensive data science scripts, or generating code without worrying about burning through paid credits. Here is the step-by-step guide to configuring your system.