100% free AI setup guides — no credit card needed
AI Coding AssistantsBeginner

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

20 min13 steps10 viewsUpdated Jul 20, 2026
Your Progress0%

0 of 13 steps complete

GLM 5.2HOW TO USE GLM 5.2 FOR FREEGLM 5.2 CLIZ AIGLM 5.2 IN CLAUDE CODEcontinue devz aiglm

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

1 screenshot

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)

Screenshots
ARCHITECTURE.png

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

1 screenshot

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

1 screenshot

INSTALL GLM 5.2 CLI FROM GITHUB DIRECTLY

Related AI setup guides

Community Feedback

Did this guide work for you?

0/1000
Be the first to leave feedback!