Claude Code Guide
This page explains how to install Claude Code and configure settings.json for gateway URL, auth token, and compatibility flags.
1. Important Note
If Claude Code reports invalid beta flag, make sure CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 is set.
2. Install
npm install -g @anthropic-ai/claude-code
If claude is not found, verify your npm global bin path is in PATH.
3. Configure
Open the config file:
vim ~/.claude/settings.json
Paste:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.letai.run",
"ANTHROPIC_AUTH_TOKEN": "sk-xxxx",
"CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1",
"CLAUDE_CODE_ATTRIBUTION_HEADER": "0"
}
}
Replace sk-xxxx with your real token.
4. Usage
Interactive:
claude
One-shot prompt:
claude "What is the capital of France?"
5. Troubleshooting
invalid beta flag: setCLAUDE_CODE_DISABLE_EXPERIMENTAL_BETASto"1".claude: command not found: reinstall package and check npm global bin path.401or auth errors: verifyANTHROPIC_AUTH_TOKENandANTHROPIC_BASE_URL.