Get Started

Connect your tools to ClaudMax in under a minute.

Claude Code interactive sessions should use apiKeyHelper for gateway auth. Do not set ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN alongside it; those variables take precedence and can send you back to the login selector.

1

Log out of existing session

Clear any existing Anthropic login so it doesn't conflict with the API key:

claude /logout

If Claude Code asks to approve an API key on next launch, select No.

2

Install persistent gateway auth

Run in your terminal:

unset ANTHROPIC_API_KEY
unset ANTHROPIC_AUTH_TOKEN
unset ANTHROPIC_BASE_URL
unset CLAUDE_API_KEY

mkdir -p ~/.claude
cat > ~/.claude/settings.json << 'SETTINGS'
{
  "apiKeyHelper": "printf '%s\n' 'cmx_your_key_here'",
  "env": {
    "ANTHROPIC_BASE_URL": "https://claudmax.pro",
    "CLAUDE_CODE_API_KEY_HELPER_TTL_MS": "3600000",
    "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1"
  }
}
SETTINGS

Replace cmx_your_key_here with your full key.

3

Launch Claude Code

claude

If you still see a login selector, remove the old Claude credentials with claude /logout once, then run claude again.

Claude Code will route all requests through ClaudMax. All 9 models are available.

Available Models

claude-opus-4-7
Opus
claude-opus-4-6
Opus
claude-opus-4-5
Opus
claude-opus-4-1
Opus
claude-opus-4
Opus
claude-sonnet-4-6
Sonnet
claude-sonnet-4-5
Sonnet
claude-sonnet-4
Sonnet
claude-haiku-4-5
Haiku

Troubleshooting

Auth conflict: Both a token (apiKeyHelper) and an API key (ANTHROPIC_API_KEY) are set

Run 'claude /logout' to clear the old Anthropic login, then restart Claude Code. If it asks to approve an API key, select No.

claude /logout
Connection refused / ECONNREFUSED

Check that ANTHROPIC_BASE_URL is set correctly and the server is reachable.

echo $ANTHROPIC_BASE_URL
# Should print: https://claudmax.pro
401 Unauthorized

Your API key may be invalid or expired. Check that ANTHROPIC_API_KEY starts with 'cmx_' and matches a key from your admin panel.

echo $ANTHROPIC_API_KEY
Env vars not picked up by VS Code extension

The extension inherits env vars from the process that launched VS Code. On macOS, use 'launchctl setenv' for system-wide vars, or launch VS Code from terminal with 'code .'

launchctl setenv ANTHROPIC_BASE_URL https://claudmax.pro