← Setup guides

Use Kimi K3.1 Pro and GLM-5.3 in Claude Code

Point Claude Code at ParamHub with a few environment variables. You pay per token from prepaid credits; there is no subscription.

What you need

  • Claude Code installed:npm install -g @anthropic-ai/claude-code
  • A ParamHub API key with credits on the account.Create a key →

Set it up

Replace YOUR_API_KEY with your key, then start Claude Code. Use the shell tabs for one session, or settings.json to keep the setup.

export ANTHROPIC_BASE_URL="https://api.paramhub.com"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
export ANTHROPIC_MODEL="kimi-k3.1-pro"
export ANTHROPIC_DEFAULT_OPUS_MODEL="kimi-k3.1-pro"
export ANTHROPIC_DEFAULT_SONNET_MODEL="kimi-k3.1-pro"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="kimi-k3.1-pro"
claude

Why four model variables

Claude Code asks for different models by alias: opus, sonnet, and haiku for background work. Setting all four sends every request to a model ParamHub serves. This is the setup we tested.

Check that it works

  1. 1Run /status inside Claude Code. It shows the base URL and model in use.
  2. 2Send any prompt. The request appears under Usage in your ParamHub console with its token counts and cost.

Which model to pick

We ran Claude Code 2.1.328 through ParamHub on one task: fix 4 planted bugs and add a feature in a 6-file Python library, graded by 11 hidden tests.

ModelPassedTimeInputCachedOutputCost
kimi-k3.1-pro4/42.9 min174,00088%4,500$0.10
GLM-5.34/44.1 min265,00095%13,200$0.09
GLM-5.23/31.8 min306,00095%6,000$0.08
kimi-k3.1-pro
Fewest requests and tokens per task. Times were steady, 2.0 to 3.3 minutes.
GLM-5.3
Thinks the longest. Task time ranged from 2.8 to 8.4 minutes.
GLM-5.2
Fastest on this task. No single request took longer than 26 seconds.

Passed is how many runs of the task passed every hidden test, out of how many we made: 4/5 means 5 runs, 4 passed. Time, input and output are medians per task; output includes thinking. Tested on November 19, 2026 on a small task with few runs, so read the numbers as rough. Cost is per task, calculated from those medians at the current prices. Pricing →

Good to know

  • Prompt caching is automatic. The cache-hit counts Claude Code reported matched the usage log.
  • Thinking is on by default and is billed as output tokens.
  • Model names are case-sensitive. Use them exactly as listed on the pricing page.
  • Requests are processed by model providers located in China. Read the Privacy Policy before sending confidential code. Privacy Policy →

If something goes wrong

Authentication error (401)

The key is wrong or disabled. Copy it again from API Keys.

Balance error (403)

The account has no credits. Add credits on the Billing page.

Model not available (503, model_not_found)

Check the spelling and case of the model name.

Model errors after setup

Make sure all four model variables are set, not only ANTHROPIC_MODEL.

Long waits on GLM-5.3

The model is thinking. Switch to kimi-k3.1-pro or GLM-5.2 for faster turns.

Switch back

Unset the variables, or remove the env block from settings.json, and Claude Code returns to your previous setup.

Try it on your own repo

Create an account, add credits from $5, and paste your key into the setup above.

Get started

Other tools

Claude Code belongs to its respective owner. ParamHub is an independent service and is not affiliated with or endorsed by it.