Skip to main content
Use Claude Code with your platform’s Anthropic-compatible proxy.

Install Claude Code

For more installation options and version notes, refer to the official Claude Code setup guide.

Configure your platform API

Important: Before configuring, clear the following Anthropic-related environment variables so old values do not override your platform settings:
  • ANTHROPIC_BASE_URL
  • ANTHROPIC_AUTH_TOKEN

Manual configuration

Edit or create Claude Code’s configuration file:
  • macOS & Linux: ~/.claude/settings.json
  • Windows: %USERPROFILE%\.claude\settings.json
Replace the placeholders below with your platform values:
  • YOUR_PLATFORM_BASE_URL: the Anthropic-compatible base URL provided by your platform
  • YOUR_PLATFORM_API_KEY: your platform API key
{
  "env": {
    "ANTHROPIC_BASE_URL": "YOUR_PLATFORM_BASE_URL",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_PLATFORM_API_KEY"
  }
}
With those two variables set, Claude Code will send Claude requests through your platform. No extra model-related fields are required. Then edit or create ~/.claude.json:
{
  "hasCompletedOnboarding": true
}
Note: Environment variables ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL take precedence over the configuration file.

Launch Claude Code

After configuration, navigate to your project directory and run the claude command in the terminal to launch Claude Code.

Trust folder

After launching, select Trust This Folder to allow Claude Code to access files in that folder, then start using Claude through your platform proxy.

Using in Claude Code for VS Code extension

Install extension

Install the Claude Code for VS Code extension.

Configure environment variables

Change the claudeCode.environmentVariables variable to the following settings:
"claudeCode.environmentVariables": [
  {
    "name": "ANTHROPIC_BASE_URL",
    "value": "YOUR_PLATFORM_BASE_URL"
  },
  {
    "name": "ANTHROPIC_AUTH_TOKEN",
    "value": "YOUR_PLATFORM_API_KEY"
  }
]
No extra model selection is required in the VS Code extension.