Claude Code
For terminal users (macOS / Linux / WSL / Windows). The Claude Code CLI will use GreenNode's GLM 5.2 model via MaaS instead of calling Anthropic directly.
Pick your configuration by service type
Claude Code uses the Anthropic standard → the Base URL has no /v1 on either service type. Only the host and the key type differ:
Token Plan
https://tokenplan.api.greennode.ai
subscription-key from Plan Detail → Subscription keys tab
Model code on the Models tab (e.g. glm-5.2)
Your key and Base URL must belong to the same service type. A PAYG API Key sent to the tokenplan… host (or the reverse) returns 401 Unauthorized even while the key is still valid. You can't tell the key types apart by looking at them — go by where you got the key. See section 2 of the Prerequisites page.
Step 1 — Install Claude Code
npm install -g @anthropic-ai/claude-codeStep 2 — Declare the Base URL & API key
Pick the tab matching your service type and OS, then copy it as-is — only replace the key value.
Set them temporarily for the current session:
export ANTHROPIC_BASE_URL="https://maas-llm-aiplatform-hcm.api.vngcloud.vn"
export ANTHROPIC_AUTH_TOKEN="<your-PAYG-API-key>"To have this happen automatically every time you open a terminal, add the two lines above to the end of ~/.zshrc (macOS) or ~/.bashrc (Linux/WSL), then reload:
source ~/.zshrc # or: source ~/.bashrcSet them temporarily for the current PowerShell window:
$env:ANTHROPIC_BASE_URL = "https://maas-llm-aiplatform-hcm.api.vngcloud.vn"
$env:ANTHROPIC_AUTH_TOKEN = "<your-PAYG-API-key>"To persist them for your account (run once, then reopen PowerShell):
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://maas-llm-aiplatform-hcm.api.vngcloud.vn", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "<your-PAYG-API-key>", "User")Set them temporarily for the current session:
export ANTHROPIC_BASE_URL="https://tokenplan.api.greennode.ai"
export ANTHROPIC_AUTH_TOKEN="<your-subscription-key>"To have this happen automatically every time you open a terminal, add the two lines above to the end of ~/.zshrc (macOS) or ~/.bashrc (Linux/WSL), then reload:
source ~/.zshrc # or: source ~/.bashrcSet them temporarily for the current PowerShell window:
$env:ANTHROPIC_BASE_URL = "https://tokenplan.api.greennode.ai"
$env:ANTHROPIC_AUTH_TOKEN = "<your-subscription-key>"To persist them for your account (run once, then reopen PowerShell):
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://tokenplan.api.greennode.ai", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "<your-subscription-key>", "User")
Step 3 — Run Claude Code
In your project directory, run the command for your service type:
Replace glm-5.2 with the exact Model code shown on your plan's Models tab.
Step 4 — Verify
In Claude Code, type /status and compare:
Base URL points to
maas-llm-aiplatform-hcm.api.vngcloud.vn
tokenplan.api.greennode.ai
Model
z-ai/glm-5.2
Your plan's Model code (e.g. glm-5.2)
Then check the AI Platform Console to see the call logged.

Troubleshooting
401 / "Unauthorized"
Wrong or not-yet-ACTIVE key
Check ANTHROPIC_AUTH_TOKEN; wait for the key to become ACTIVE
401 while the key is still valid
Key and Base URL belong to different service types — e.g. a PAYG API Key sent to the tokenplan… host
Re-check the table at the top of this page: a key from the API Keys page → the maas-llm-… host; a key from the Subscription keys tab → the tokenplan… host
403 Forbidden (Token Plan)
Model isn't included in the plan
Only call models listed on the plan's Models tab
402 Payment Required (Token Plan)
Plan has expired or was deleted
Buy the plan again or enable Auto-renew
404 / "Not Found"
Wrong Base URL (extra /v1 or trailing /)
Claude Code is Anthropic-standard — the Base URL has no /v1
Requests go straight to Anthropic
Old ANTHROPIC_API_KEY variable still set
Run unset ANTHROPIC_API_KEY (macOS/Linux) or remove that variable on Windows
Wrong model is used
Missing --model flag, or a Model ID from the other service type
Run claude --model <model-id-for-your-service-type> or use /model to switch
AI doesn't respond
PAYG out of credit, or Token Plan out of token quota
PAYG: top up credit. Token Plan: wait for the next cycle, buy another plan, or temporarily switch to a PAYG API Key
Connection timeout
Can't reach the endpoint over the network
Check VPN / network access to *.api.vngcloud.vn (PAYG) or tokenplan.api.greennode.ai (Token Plan)
Use OpenCode
See the prerequisites
Learn about Token Plan packages
Need help?
If you've followed the steps and it's still not working, feel free to contact GreenNode Customer Support:
Email: support@greennode.ai
Hotline: 19001549
Help center: helpdesk.greennode.ai
Thank you for using GreenNode's services.
Last updated

