Claude Code Integration
1. Prerequisites
- Registered and obtained a platform API Key.
- Node.js environment installed.
- Claude Code installed:bash
npm install -g @anthropic-ai/claude-code
2. Recommended: One-Command Setup with codesw
codesw is the official CLI for switching model providers. It writes directly to ~/.claude/settings.json — no proxy, no middleman — and lets you swap providers or clients later with a single command.
2.1 Install
npm i -g @bumocc/codesw
# or
yarn global add @bumocc/codesw2.2 Run the interactive mode
Just execute:
codeswFollow the prompts — the whole flow is interactive, no arguments required:
- Select provider: pick
bumo.ai(BUMO API). - Profile name: press Enter to accept the default, or type one, e.g.
bumo. - API Key: paste the key from the API Keys page (shown as
*while typing). - Select model: pick a default from the list, e.g.
claude-sonnet-4-6; or choose<Custom>to type your own. - Small model ID: optional — press Enter to skip.
- Apply to which client: choose
Claude Code.
codesw writes ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_DEFAULT_*_MODEL, etc. into the env block of ~/.claude/settings.json. Once it finishes, just run claude.
To switch models or providers later, run codesw again and pick the existing profile — no need to re-enter the key.
3. Launch Claude Code
claudeEnter your question in the dialog to experience Claude Code's intelligent programming capabilities.
Appendix: Manual Configuration (Alternative)
If you'd rather not use the CLI, edit the settings file by hand.
Open or create settings.json:
- MacOS / Linux:
~/.claude/settings.json - Windows:
User Directory/.claude/settings.json
Merge the following env block:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
"ANTHROPIC_BASE_URL": "https://api.bumo.ai",
"API_TIMEOUT_MS": "3000000",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": 1,
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm/glm-4.5-air",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm/glm-5.1",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm/glm-5.1"
}
}Replace
YOUR_API_KEYwith your platform API Key.
