This guide connects Claude Code to the site Messages-compatible gateway. Available models and tools depend on the selected group, upstream and client version. Check the current catalog first.
Prepare a site-issued key
Create a key in your account and confirm its group and balance. A web subscription is not site API credit. Do not use a web login cookie as a key.
Configure your terminal
For Bash or Zsh on macOS and Linux, use the site root URL; the client appends the endpoint. Replace both placeholders.
export ANTHROPIC_BASE_URL='https://ai.wfpromax.xyz'
export ANTHROPIC_AUTH_TOKEN='replace-with-site-api-key'
claude --model 'replace-with-authorized-model-id'For Windows PowerShell:
$env:ANTHROPIC_BASE_URL = "https://ai.wfpromax.xyz"
$env:ANTHROPIC_AUTH_TOKEN = "replace-with-site-api-key"
claude --model "replace-with-authorized-model-id"Verify the effective configuration
Run /status to inspect the endpoint and authentication source. Send a short prompt and check the site usage record. A successful request verifies that request, not every tool workflow or future request.
Terminal works but the editor does not
An editor launched from the desktop may not inherit terminal variables. Inspect the extension configuration and launch environment. For persistent personal configuration, merge these fields into ~/.claude/settings.json without overwriting existing settings:
{
"env": {
"ANTHROPIC_BASE_URL": "https://ai.wfpromax.xyz",
"ANTHROPIC_AUTH_TOKEN": "replace-with-site-api-key"
}
}Keep the real key private. For 401 errors, inspect authentication; for unknown models, check the exact ID and group. See the error guide for rate limits and temporary failures.
Official configuration reference
See Claude Code gateway documentation for environment variables and authentication. Xinghuo is an independent third-party service.