Use Claude Code with your platform’s Anthropic-compatible proxy.
Install Claude Code
- Native Install (Recommended)
- Homebrew
- WinGet
macOS, Linux, WSL:Windows PowerShell:Windows CMD:
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_URLANTHROPIC_AUTH_TOKEN
Manual configuration
Edit or create Claude Code’s configuration file:- macOS & Linux:
~/.claude/settings.json - Windows:
%USERPROFILE%\.claude\settings.json
YOUR_PLATFORM_BASE_URL: the Anthropic-compatible base URL provided by your platformYOUR_PLATFORM_API_KEY: your platform API key
~/.claude.json:
Note: Environment variablesANTHROPIC_AUTH_TOKENandANTHROPIC_BASE_URLtake precedence over the configuration file.
Launch Claude Code
After configuration, navigate to your project directory and run theclaude 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 theclaudeCode.environmentVariables variable to the following settings:
