Skip to content

Claude Code: Manual Configuration

Claude Code can connect to HCAI through a settings file or system environment variables.

Access Information

ItemValue
Endpointhttps://ai.hctopup.com
Key variableANTHROPIC_AUTH_TOKEN
Base URL variableANTHROPIC_BASE_URL

Settings File Method

Claude Code supports environment variables through the env field in settings.json. The configuration file path is:

PlatformConfiguration file
Windows%USERPROFILE%\.claude\settings.json
macOS / Linux~/.claude/settings.json

If the file or directory does not exist, create it manually. Add:

json
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "Replace with your HCAI Key",
    "ANTHROPIC_BASE_URL": "https://ai.hctopup.com",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME": "claude-haiku-4-5-20251001",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-8[1M]",
    "ANTHROPIC_DEFAULT_OPUS_MODEL_NAME": "claude-opus-4-8",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
    "ANTHROPIC_DEFAULT_SONNET_MODEL_NAME": "claude-sonnet-4-6",
    "ANTHROPIC_MODEL": "claude-opus-4-8"
  },
  "model": "opus[1m]",
  "hasCompletedOnboarding": true
}

Save the file, then reopen Claude Code:

sh
claude

Windows PowerShell Environment Variables

If you do not want to edit the settings file, you can use system environment variables instead:

powershell
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "Replace with your HCAI Key", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://ai.hctopup.com", "User")

Close and reopen the terminal:

powershell
claude

macOS / Linux Environment Variables

If you do not want to edit the settings file, you can write the variables to your current shell profile:

Bash:

sh
echo 'export ANTHROPIC_AUTH_TOKEN="Replace with your HCAI Key"' >> ~/.bashrc
echo 'export ANTHROPIC_BASE_URL="https://ai.hctopup.com"' >> ~/.bashrc
source ~/.bashrc

Zsh:

sh
echo 'export ANTHROPIC_AUTH_TOKEN="Replace with your HCAI Key"' >> ~/.zshrc
echo 'export ANTHROPIC_BASE_URL="https://ai.hctopup.com"' >> ~/.zshrc
source ~/.zshrc

Start Claude Code:

sh
claude

Next Steps