Developer guides · API access # Claude Code gateway setup: base URL, authentication and model Configure Claude Code for Xinghuo AI Gateway on macOS, Linux or PowerShell. Check authentication, editor environment and actual model permissions. Xinghuo AI Gateway · Updated 2026-10-09 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](https://ai.wfpromax.xyz/available-channels) 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](https://ai.wfpromax.xyz/guides/en/api-errors.html) for rate limits and temporary failures. ## Official configuration reference See [Claude Code gateway documentation](https://code.claude.com/docs/en/llm-gateway-connect) for environment variables and authentication. Xinghuo is an independent third-party service. ## Choose a model. Connect your application. Check current model access and account pricing, then register and buy the credits you need. [View models & pricing](https://ai.wfpromax.xyz/available-channels?entry=guide_en_claude-code) [Buy credits](https://ai.wfpromax.xyz/purchase?entry=guide_en_claude-code) [Create an account →](https://ai.wfpromax.xyz/register?entry=guide_en_claude-code) ## Related guides [What is Xinghuo AI Gateway? API access, models and service scope](https://ai.wfpromax.xyz/guides/en/service.html)[OpenAI-compatible API quickstart: base URL, key and model](https://ai.wfpromax.xyz/guides/en/openai-compatible-api.html)[AI API token billing explained: input, output and cache](https://ai.wfpromax.xyz/guides/en/token-billing.html)[AI API error guide: 401, 403, 404, 429 and 503](https://ai.wfpromax.xyz/guides/en/api-errors.html)[AI API buying guide: models, pricing, credits and redemption](https://ai.wfpromax.xyz/guides/en/buying-guide.html)[How to choose GPT, Claude, Gemini or Kimi API models](https://ai.wfpromax.xyz/guides/en/model-selection.html)[ChatGPT and Claude subscriptions vs API credits: what is different?](https://ai.wfpromax.xyz/guides/en/api-vs-subscription.html)