Client setup
Claude Code Setup Guide
Install Claude Code and configure the ZhenAPI endpoint and API key on Windows, macOS and Linux.
Install and connect to ZhenAPI with the setup script. It detects Node.js and Claude Code, helps install missing prerequisites, and writes the configuration. The copied command does not contain your API key.
Choose the setup script for your operating system
Copy the command for your operating system, run it, and enter your API key when prompted.
1irm https://zhenapi.ai/install/claude-code.ps1 | iex1curl -fsSL https://zhenapi.ai/install/claude-code.sh | bash⚠️ Note:Before installing manually, complete the Node.js installation guide.
Step 1: Install Claude Code
1npm install -g @anthropic-ai/claude-codeVerify installation:
1claude --version1sudo npm install -g @anthropic-ai/claude-codeVerify installation:
1claude --version1npm install -g @anthropic-ai/claude-codeVerify installation:
1claude --versionmacOS / Linux / WSL:
1curl -fsSL https://claude.ai/install.sh | bashWindows PowerShell:
1irm https://claude.ai/install.ps1 | iexVerify installation:
1claude --versionStep 2: Configure environment variables
Set the following values in your current terminal or in your system environment.
| ANTHROPIC_BASE_URL | https://api.zhenapi.ai |
| ANTHROPIC_AUTH_TOKEN | Get this from your dashboard |
| CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC | 1 |
Temporary settings (current session)
1set ANTHROPIC_BASE_URL=https://api.zhenapi.ai2set ANTHROPIC_AUTH_TOKEN=your-key3set ANTHROPIC_MODEL=claude-opus-5-54set CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=15cd your-project6claude1$env:ANTHROPIC_BASE_URL="https://api.zhenapi.ai"2$env:ANTHROPIC_AUTH_TOKEN="your-key"3$env:ANTHROPIC_MODEL="claude-opus-5-5"4$env:CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1"5cd your-project6claude1export ANTHROPIC_BASE_URL="https://api.zhenapi.ai"2export ANTHROPIC_AUTH_TOKEN="your-key"3export ANTHROPIC_MODEL="claude-opus-5-5"4export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=15cd your-project6claudePersistent settings
1[System.Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://api.zhenapi.ai", [System.EnvironmentVariableTarget]::User)2[System.Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "your-key", [System.EnvironmentVariableTarget]::User)3[System.Environment]::SetEnvironmentVariable("ANTHROPIC_MODEL", "claude-opus-5-5", [System.EnvironmentVariableTarget]::User)4[System.Environment]::SetEnvironmentVariable("CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC", "1", [System.EnvironmentVariableTarget]::User)1echo 'export ANTHROPIC_BASE_URL="https://api.zhenapi.ai"' >> ~/.bashrc2echo 'export ANTHROPIC_AUTH_TOKEN="your-key"' >> ~/.bashrc3echo 'export ANTHROPIC_MODEL="claude-opus-5-5"' >> ~/.bashrc4echo 'export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1' >> ~/.bashrc5 6source ~/.bashrc1echo 'export ANTHROPIC_BASE_URL="https://api.zhenapi.ai"' >> ~/.zshrc2echo 'export ANTHROPIC_AUTH_TOKEN="your-key"' >> ~/.zshrc3echo 'export ANTHROPIC_MODEL="claude-opus-5-5"' >> ~/.zshrc4echo 'export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1' >> ~/.zshrc5 6source ~/.zshrcyour-key with an API key copied from the Dashboard page. Step 3: Start using the client
Run the following from your project directory:
1claudeClaude Code analyzes the current project and helps you work with its code.
For more information, see the Anthropic documentation .