Skip to content
CLAUDE CODE

Use Claude Code with other models.

Run Claude Code on other Outrun models by changing two settings.

Last updated:

Before you start

Have your API key and some Outrun credit ready. Keep your key private.

Copy-paste setup

Replace KEY with your Outrun key and MODEL_ID with a tested ID from the table below, save the file, then open a new terminal.

~/.zshrc or ~/.bashrc
export ANTHROPIC_BASE_URL="https://api.outrun.to"
export ANTHROPIC_AUTH_TOKEN="KEY"
export ANTHROPIC_MODEL="MODEL_ID"
export ANTHROPIC_DEFAULT_OPUS_MODEL="MODEL_ID"
export ANTHROPIC_DEFAULT_SONNET_MODEL="MODEL_ID"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="MODEL_ID"
Connection settingsShow
Connection settings
ANTHROPIC_BASE_URL: https://api.outrun.to
Key variable: ANTHROPIC_AUTH_TOKEN
Model variable: ANTHROPIC_MODEL

Get your key from Outrun → API keys and enter it privately in the app or local settings. Test with “Reply with OK only.” Tests use credit; check Activity before retrying.

Setup Steps

  1. 1
    Connect Claude Code to Outrun

    Follow the Claude Code custom base URL setup first, so ANTHROPIC_BASE_URL is https://api.outrun.to and ANTHROPIC_AUTH_TOKEN holds your Outrun key.

    Claude Code custom base URL setup
  2. 2
    Choose a tested model ID

    Pick a model ID from the tested table below. Only IDs that passed a Claude Code test, including tool calls, are listed.

  3. 3
    Set the model variables

    Set ANTHROPIC_MODEL to that ID. Also set ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL to the same ID so every request Claude Code makes uses it. Use your shell profile, PowerShell or the "env" block of ~/.claude/settings.json.

  4. 4
    Check the connection

    Open a new terminal, run claude, then run /status. It should show https://api.outrun.to as the base URL and your chosen model.

  5. 5
    Test a tool call

    Ask Claude Code to list the files in the current folder. A file list confirms tool calls work. This request uses Outrun credit; check Activity if it is interrupted before trying again.

Tested model IDs

Tested on October 30, 2026 with Claude Code 2.1.284: a plain reply and a tool call (running ls through the Bash tool) both worked. Only IDs that passed are listed; other IDs may not handle Claude Code tool calls. Prices per 1M tokens from the live price list as of October 29, 2026, 4:34 PM ET.

ModelModel IDInput / 1MOutput / 1MExample costTool calls in Claude Code
DeepSeek V4 Prodeepseek-v4-pro$1.35$4.05$3.11Passed (Oct 30, 2026)
DeepSeek V4.1 Flashdeepseek-v4.1-flash$0.30$1.20$0.72Passed (Oct 30, 2026)
GPT-6.1 Solgpt-6.1-sol$0.1176 (up to 272k tokens)$0.588 (up to 272k tokens)$0.30Passed (Oct 30, 2026)

What an hour of work can cost

Example workload: 2,000,000 input tokens and 100,000 output tokens with no prompt-cache discount. Real sessions vary; Activity shows the exact tokens and charge of every request. Prices as of October 29, 2026, 4:34 PM ET; totals are rounded up to the cent.

With that workload the tested models above cost from $0.30 (gpt-6.1-sol) to $3.11 (deepseek-v4-pro). The same workload on claude-opus-5-5 costs $5.60.

settings.json alternative

Instead of shell variables, you can put the same values in the "env" block of ~/.claude/settings.json (Windows: %USERPROFILE%\.claude\settings.json). Merge it with your other settings and remove any ANTHROPIC_API_KEY entry.

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.outrun.to",
    "ANTHROPIC_AUTH_TOKEN": "KEY",
    "ANTHROPIC_MODEL": "MODEL_ID",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "MODEL_ID",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "MODEL_ID",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "MODEL_ID"
  }
}

Switching back

To return to Claude models on Outrun, set ANTHROPIC_MODEL and the three ANTHROPIC_DEFAULT_ variables back to Claude IDs such as claude-opus-5-5, or switch for one session with /model followed by the ID.

To return to your Anthropic account, remove ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN from your shell profile and from ~/.claude/settings.json, then open a new terminal. Claude Code uses your saved login again; if it does not, run /login.

Limits

Anthropic does not support routing Claude Code to non-Claude models, so a Claude Code update can change how a model behaves. Re-test after updating.

Context window, image input and thinking depend on the model. Check the model page before long sessions.

Every request is charged from your prepaid balance at the model’s per-token price. If a paid request is interrupted or its outcome is uncertain, check Activity before trying again.

Claude Code LLM gateway docsModels & PricingWhat to do when Claude Code hits its usage limit

Common errors and fixes

Interrupted request or uncertain charge

Check Activity first. Keep the request ID for support; never include your key in a message or screenshot.

Contact @outrunsupport

Frequently asked questions

Does Claude Code work with models other than Claude?

It can, when ANTHROPIC_BASE_URL points at an API that speaks the Anthropic Messages format, as Outrun does. Anthropic does not support this setup, so this page lists only model IDs that passed a Claude Code test, including tool calls.

Which variable picks the model?

ANTHROPIC_MODEL sets the main model. ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL decide what Claude Code uses when it asks for those tiers; set them to the same ID to keep every request on one model. /model switches inside a session.

How much does an hour of Claude Code cost on another model?

With the example workload of 2,000,000 input and 100,000 output tokens, the tested models cost from $0.30 to $3.11 at prices as of October 29, 2026, 4:34 PM ET. Your real usage is shown in Activity.

How do I switch back to my Anthropic account?

Remove ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN from your shell profile and settings.json, then open a new terminal. Claude Code uses your saved login again; if it does not, run /login.