For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

First, complete the Prerequisites: an ACTIVE key, the Base URL for your service type, and the model ENABLED.


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:

Service type
Base URL
Key
Model ID

PAYG

https://maas-llm-aiplatform-hcm.api.vngcloud.vn

API Key from the API Keys page

z-ai/glm-5.2

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)

GLM 5.2 is just an example model. GreenNode offers many models — swap in whichever one you want. On PAYG, find the Model ID on the model detail page; on Token Plan, check your plan's Models tab.


Step 1 — Install Claude Code

npm install -g @anthropic-ai/claude-code

Step 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 ~/.bashrc

Set 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 ~/.bashrc

Set 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")
ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL configured in the shell profile

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.

The --model flag sets the model for the current session. Inside Claude Code you can also switch models with the /model command.


Step 4 — Verify

In Claude Code, type /status and compare:

Check
PAYG
Token Plan

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.

Claude Code responding successfully with the z-ai/glm-5.2 model via GreenNode MaaS

Troubleshooting

Symptom
Cause
Fix

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)


I want to next...
Go to

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:

Thank you for using GreenNode's services.

Last updated