Skip to main content
Claude Code uses the Anthropic Messages protocol. To use it with the powertokens platform, point Claude Code at https://api.powertokens.ai and choose a text model available through the Anthropic Messages path. The recommended platform default is glm-5.2; the recommended MiniMax coding-agent path is MiniMax-M3. If you need to choose the endpoint first, see Text model protocols and endpoints.

Available models

Use the following model IDs with Claude Code. For coding-agent workflows, prefer glm-5.2 or MiniMax-M3.
Upstream providerModel IDRecommended use
Zhipuglm-4.5-airLightweight coding help
Zhipuglm-4.7General development tasks
Zhipuglm-4.7-flashFast lightweight coding tasks
Zhipuglm-5Deeper reasoning and edits
Zhipuglm-5-turboFaster coding tasks
Zhipuglm-5.2Heavier reasoning; configure manually if it is not shown in model discovery
MiniMaxMiniMax-M2.5General agentic coding
MiniMaxMiniMax-M2.5-highspeedLatency-sensitive tasks
MiniMaxMiniMax-M2.7General development and longer tasks
MiniMaxMiniMax-M2.7-highspeedFaster long tasks
MiniMaxMiniMax-M3Complex coding-agent work
Alibaba Qwenqwen3-coder-plusOptional coding model
Alibaba Qwenqwen3-maxOptional general reasoning model
Alibaba Qwenqwen3.5-flashOptional lightweight model
Alibaba Qwenqwen3.6-plusOptional balanced model
BytePlus DeepSeekdeepseek-v3-2-251201Optional text model; passed opencode Anthropic-provider tool validation
BytePlus Seedseed-1-6-250915Optional text model
BytePlus Seedseed-1-8-251228Optional text model
BytePlus Seedseed-2-0-lite-260228Optional lightweight model
BytePlus Seedseed-2-0-mini-260215Optional lightweight model
BytePlus Seedseed-2-0-pro-260328Optional heavier text model

Prepare your environment

Install or update Claude Code:
npm install -g @anthropic-ai/claude-code
claude --version
Clear old Anthropic environment variables before switching providers:
unset ANTHROPIC_BASE_URL
unset ANTHROPIC_API_KEY
unset ANTHROPIC_AUTH_TOKEN
unset ANTHROPIC_MODEL

Configure Claude Code

Add this to user-level ~/.claude/settings.json or project-level .claude/settings.json:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.powertokens.ai",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_POWERTOKENS_API_KEY",
    "ANTHROPIC_MODEL": "glm-5.2",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-5-turbo",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5.2",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "MiniMax-M3",
    "CLAUDE_CODE_SUBAGENT_MODEL": "glm-5.2",
    "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1"
  }
}
Claude Code should use ANTHROPIC_AUTH_TOKEN so the client sends a bearer token. Do not set both ANTHROPIC_AUTH_TOKEN and ANTHROPIC_API_KEY; Claude Code gives ANTHROPIC_AUTH_TOKEN precedence. If your runtime explicitly requires x-api-key auth, replace ANTHROPIC_AUTH_TOKEN with ANTHROPIC_API_KEY.

Start and verify

Run Claude Code from your project:
claude
Inside the session, check:
/status
/model
If the model picker does not show platform models, set ANTHROPIC_MODEL manually to one of the IDs above. Some discovery flows only show model IDs that begin with claude or anthropic; manual model IDs still work when the gateway accepts them. Verify that Claude Code reads the configuration in non-interactive mode:
claude -p --model glm-5.2 "Reply exactly: ok"
Then verify tool use with a local file:
printf "powertokens-compat-ok\n" > compat.txt
claude -p --model glm-5.2 --tools=Read --allowedTools=Read \
  "Use the Read tool to read compat.txt. Reply exactly with the file contents."
rm compat.txt
You can also verify the same model directly through the platform API.
curl -X POST "https://api.powertokens.ai/v1/messages" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_POWERTOKENS_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  --data '{
    "model": "glm-5.2",
    "max_tokens": 64,
    "messages": [
      {"role": "user", "content": "Reply with ok."}
    ],
    "stream": false
  }'

Model choice

ScenarioSuggested model
Default coding agentglm-5.2
Small editsglm-5-turbo
Complex code reviewglm-5.2 or MiniMax-M3
Parallel subagentsglm-5.2 as main model and glm-5-turbo as the lightweight model
MiniMax coding-agent pathMiniMax-M3

Not default recommendations

The following models may declare anthropic in model discovery, but current ecosystem-tool validation does not recommend them as Claude Code defaults:
ModelReason
seed-1-6-flash-250715The upstream provider does not support /v1/messages; use an OpenAI-compatible provider