Skip to content
Checking statusStatus

Claude Code

Use every Claude model in the Claude Code CLI.

Claude Code talks to the Anthropic Messages API, which evolved.to serves natively. Two environment variables are all it takes.

Configure

  1. Install Claude Code

    npm install -g @anthropic-ai/claude-code
  2. Point it at evolved.to

    Set the base URL and pass your key as the auth token. ANTHROPIC_MODEL is optional and sets the default model.

    terminal
    export ANTHROPIC_BASE_URL="https://api.evolved.to"
    export ANTHROPIC_AUTH_TOKEN="$EVOLVED_API_KEY"
    export ANTHROPIC_MODEL="claude-opus-5"
    
    claude
  3. Check the connection

    Inside Claude Code, run /status. It should show https://api.evolved.to as the API base URL.

Choose a model

Switch models at any time. Every Claude model on your key is available:

# inside a running session
/model claude-fable-5-2

# default model for every new session
export ANTHROPIC_MODEL="claude-sonnet-5"

# model used for quick background tasks
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-4.5"

See every ID on the Claude models page.

Make it permanent

Rather than exporting variables in every shell, add them to Claude Code's user settings file. They apply to every project and to the IDE extensions.

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.evolved.to",
    "ANTHROPIC_AUTH_TOKEN": "your_key_here",
    "ANTHROPIC_MODEL": "claude-opus-5"
  }
}

See your credit in Claude Code

/cost shows what the current session used. To keep your credit left in view, add a status line: it asks evolved.to at most once a minute and shows a line such as Evolved · $187.60 left of $200.00 under the prompt.

~/.claude/settings.json
{
  "statusLine": {
    "type": "command",
    "command": "f=\"$HOME/.claude/evolved-usage.txt\"; [ -n \"$(find \"$f\" -mmin -1 2>/dev/null)\" ] || curl -s -m 3 https://api.evolved.to/v1/usage/line -H \"x-api-key: $ANTHROPIC_AUTH_TOKEN\" > \"$f\"; cat \"$f\""
  }
}

On Windows, Claude Code runs the command in Git Bash. If your key lives in EVOLVED_API_KEY rather than in settings.json, use that variable instead of $ANTHROPIC_AUTH_TOKEN.

Make your credit last

The same work for a fraction of the credit:

  1. Pick the model for the job

    Sonnet for everyday coding, Opus or Fable for the hard problems, Haiku for quick edits. Switch with /model whenever the task changes.
  2. Let the lightest model do the background work

    Claude Code writes titles and summaries on the side. Set ANTHROPIC_DEFAULT_HAIKU_MODEL to claude-haiku-4.5, and DISABLE_NON_ESSENTIAL_MODEL_CALLS to 1 to skip the extras.
  3. Keep sessions short

    Every message sends the conversation so far. Run /compact when a session gets long, and /clear before a new task.
  4. Keep CLAUDE.md lean

    It is read with every request: a short file of what matters costs less than a long one.
  5. Point at the files

    Name the files to change instead of asking Claude to search the whole project.
~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.evolved.to",
    "ANTHROPIC_AUTH_TOKEN": "your_key_here",
    "ANTHROPIC_MODEL": "claude-sonnet-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4.5",
    "DISABLE_NON_ESSENTIAL_MODEL_CALLS": "1"
  }
}

Common problems

  1. “claude is not recognized” or “command not found”

    Claude Code isn't installed yet, or the window was opened before it was. Install Node.js (the LTS version) from nodejs.org, run the install command, then close PowerShell or Terminal and open it again. Both checks should answer with a version number:

    terminal
    npm install -g @anthropic-ai/claude-code
    node -v
    claude --version

    If npm or node isn't recognized either, Node.js isn't installed. In the new window, set the two variables again and run claude.

  2. “running scripts is disabled on this system” (Windows)

    PowerShell blocks scripts by default, and npm and claude start as scripts. Allow them for your user once (type Y if asked), then run the install again:

    PowerShell
    Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

    Rather not change it? Use npm.cmd and claude.cmd instead of npm and claude.

  3. settings.json still says your_key_here

    your_key_here is only a placeholder: put your own whole key between the quotes, with no spaces.

  4. settings.json seems to be ignored

    It must be at C:\Users\<you>\.claude\settings.json on Windows (open it with notepad $HOME\.claude\settings.json) or ~/.claude/settings.json on macOS and Linux. If the file already has settings, add the env block inside the same { } instead of pasting a second one, and leave no comma after the last line. Then close Claude Code completely and run claude again.

  5. It asks you to log in

    Claude Code isn't reading our settings. Run /logout inside Claude Code, set the variables in the same window (or in settings.json) and start it again. An old ANTHROPIC_API_KEY on your computer can take over too: remove it, or set it to your Evolved key as well.

  6. 401 or “invalid API key”

    The key was copied with a part missing or a space, or the base URL isn't exactly https://api.evolved.to (no /v1). If /status shows another URL, the variables weren't picked up. Your key is shown once in Orders.