Claude Code

Set up Claude Code to use Modelway. You don’t need a Claude subscription.

Step 01

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.

Step 02

Install Claude Code

Open PowerShell and run Anthropic’s installer. You don’t need to run it as Administrator.

powershell
irm https://claude.ai/install.ps1 | iex

With WinGet:

powershell
winget install Anthropic.ClaudeCode

Open a new terminal and check that it worked with claude --version, which prints a version number.

Optional. Install Git for Windows so Claude Code can run commands in Git Bash. Without it, it uses PowerShell.

Step 03

Point it at Modelway

Claude Code reads %USERPROFILE%\.claude\settings.json. Create the folder if it doesn’t exist yet, then open the file in an editor:

powershell
1New-Item -ItemType Directory -Force "$env:USERPROFILE\.claude"
2notepad "$env:USERPROFILE\.claude\settings.json"

Paste this in, with your key in place of the placeholder:

%USERPROFILE%\.claude\settings.jsonjson
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.

Step 04

Start Claude Code

Open a new terminal in a project folder and run:

powershell
claude

It opens without asking you to log in. Switch models with /model.

Step 05

Use the VS Code extension (optional)

Run Preferences: Open User Settings (JSON) in VS Code and add:

settings.jsonjson
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 %USERPROFILE%\.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 winget upgrade Anthropic.ClaudeCode if you installed with WinGet.

How do I go back to my own Claude account?

Remove the Modelway entries from %USERPROFILE%\.claude\settings.json and run claude again to log in.

How do I uninstall?

For the native install:

powershell
1Remove-Item "$env:USERPROFILE\.local\bin\claude.exe" -Force
2Remove-Item "$env:USERPROFILE\.local\share\claude" -Recurse -Force

Delete %USERPROFILE%\.claude as well to remove your settings and history.