Skip to Content
Simpang Router

Claude Code

Run Claude Code on your Simpang key and switch models from inside it.

Claude Code talks to Simpang directly. You only set the base URL and your key, nothing else changes.

The quickest way is Connect in the app. It fills in your key and your models, and gives you a prompt to paste into Claude Code so it sets itself up.

Set it up

Merge this into ~/.claude/settings.json, then restart Claude Code:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://simpang.zakiego.com/api",
    "ANTHROPIC_API_KEY": "sk-sp-..."
  }
}

If it asks whether to use the detected custom API key, pick Yes.

To try it once without touching any file:

export ANTHROPIC_BASE_URL=https://simpang.zakiego.com/api
export ANTHROPIC_API_KEY=sk-sp-...
claude

The base URL stops at /api. Claude Code adds /v1/messages itself, so /api/v1 ends up as /api/v1/v1/messages and fails.

Values in settings.json win over shell variables. If Claude Code ignores your export, look for an ANTHROPIC_BASE_URL there. An ANTHROPIC_AUTH_TOKEN left over from another setup also overrides your key, so remove it.

Switch models

No config edit needed. Use any model id listed under Models in the app, or an alias like simpang/fast.

WhereHowApplies to
Inside a session/model claude-opus-4-5-20251101from the next message on
When you start itclaude --model claude-opus-4-5-20251101that run

Make the Opus, Sonnet and Haiku picks work

The /model menu and the opus, sonnet and haiku shortcuts point at Claude Code's built-in model ids, which may not match what your account has. Map each one to a Simpang model:

{
  "env": {
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-5-20251101",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-5-20250929",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001"
  }
}

Claude Code also uses the Haiku model for small background jobs like naming a session. If that id isn't on your account, those calls fail with 403 model_not_allowed. Connect adds this mapping for you, using the newest model of each family you have. Claude Code starts on the Sonnet one.

In Activity

Requests show up in Activity as Claude Code, with prompt caching counted as cache read and cache write.

On this page