Claude Code: Manual Configuration
Claude Code can connect to HCAI through a settings file or system environment variables.
Access Information
| Item | Value |
|---|---|
| Endpoint | https://ai.hctopup.com |
| Key variable | ANTHROPIC_AUTH_TOKEN |
| Base URL variable | ANTHROPIC_BASE_URL |
Settings File Method
Claude Code supports environment variables through the env field in settings.json. The configuration file path is:
| Platform | Configuration 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
claudeWindows 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
claudemacOS / 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 ~/.bashrcZsh:
sh
echo 'export ANTHROPIC_AUTH_TOKEN="Replace with your HCAI Key"' >> ~/.zshrc
echo 'export ANTHROPIC_BASE_URL="https://ai.hctopup.com"' >> ~/.zshrc
source ~/.zshrcStart Claude Code:
sh
claude