Claude Code
Set up Claude Code to use Modelway. You don’t need a Claude subscription.
Get your Modelway key
Sign in, open API keys and click Create key. Copy it right away: it’s shown once. New to Modelway? Start with getting access.
Install Claude Code
Open a terminal and run Anthropic’s installer:
curl -fsSL https://claude.ai/install.sh | bash
With Homebrew:
brew install --cask claude-code
Open a new terminal and check that it worked with claude --version, which prints a version number.
Point it at Modelway
Claude Code reads ~/.claude/settings.json. Create the folder if it doesn’t exist yet, then open the file in an editor:
1mkdir -p ~/.claude2nano ~/.claude/settings.json
Paste this in, with your key in place of the placeholder:
1{2 "env": {3 "ANTHROPIC_BASE_URL": "https://modelway.vip",4 "ANTHROPIC_AUTH_TOKEN": "<your Modelway API key>",5 "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1",6 "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",7 "CLAUDE_CODE_AUTO_MODE_SERVER": "0"8 }9}
If the file already has settings, add these entries to its env block instead.
Start Claude Code
Open a new terminal in a project folder and run:
claude
It opens without asking you to log in. Switch models with /model.
Use the VS Code extension (optional)
Run Preferences: Open User Settings (JSON) in VS Code and add:
1{2 "claudeCode.environmentVariables": [3 {4 "name": "ANTHROPIC_BASE_URL",5 "value": "https://modelway.vip"6 },7 {8 "name": "ANTHROPIC_AUTH_TOKEN",9 "value": "<your Modelway API key>"10 }11 ]12}
FAQ
Claude Code still asks me to log in.
Your key isn’t reaching it. Check that the file is at ~/.claude/settings.json, that it’s valid JSON and that ANTHROPIC_AUTH_TOKEN holds your key. If you were logged in to a Claude account before, run /logout so only the Modelway key is left.
How do I update?
The Modelway settings turn off Claude Code’s background traffic, and with it the automatic updates. Update by hand now and then with claude update, or brew upgrade claude-code if you installed with Homebrew.
How do I go back to my own Claude account?
Remove the Modelway entries from ~/.claude/settings.json and run claude again to log in.
How do I uninstall?
For the native install:
1rm -f ~/.local/bin/claude2rm -rf ~/.local/share/claude
Delete ~/.claude as well to remove your settings and history.