Quickstart
This walkthrough takes you from an installed shunt binary to a Claude Code session where a gpt-* model runs inside Claude Code’s own harness. Install shunt first — see Installation.
1. Configure
Section titled “1. Configure”shunt ships with all providers preconfigured, so a minimal config only declares routing. Create shunt.toml (in the working directory, or ~/.config/shunt/shunt.toml):
# Exact model id -> provider[[routes]]model = "gpt-5.6-sol"provider = "codex" # reuses your ChatGPT login via `codex login`
# Or send every gpt-* id to the OpenAI API[[route_prefixes]]prefix = "gpt-"provider = "openai" # uses OPENAI_API_KEYValidate it:
shunt check# -> config ok2. Provide the provider credential
Section titled “2. Provide the provider credential”Pick the provider you routed to:
codex login # codex provider: ChatGPT subscription login# orexport OPENAI_API_KEY=sk-... # openai provider: API key3. Run the gateway
Section titled “3. Run the gateway”shunt run# -> shunt listening on 127.0.0.1:30014. Point Claude Code at it
Section titled “4. Point Claude Code at it”export ANTHROPIC_BASE_URL=http://127.0.0.1:3001export ANTHROPIC_CUSTOM_MODEL_OPTION="gpt-5.6-sol"export CLAUDE_CODE_ALWAYS_ENABLE_EFFORT=1 # so /effort maps to reasoning.effortclaudeInside Claude Code, run /model and pick gpt-5.6-sol. Unmapped models (all your claude-* ids) keep working exactly as before — shunt forwards them to Anthropic with your own credential.
5. Verify
Section titled “5. Verify”Test the gateway directly before (or instead of) opening Claude Code:
# Mapped model -> diverted to the provider (uses shunt's provider credential)curl -s -X POST "$ANTHROPIC_BASE_URL/v1/messages" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ -d '{"model":"gpt-5.6-sol","max_tokens":16,"messages":[{"role":"user","content":"hi"}]}'A JSON response starting with {"id":"msg_ means it worked. Inside Claude Code, /status should show the Anthropic base URL as http://127.0.0.1:3001.
Where to next
Section titled “Where to next”- Configuration — config files, env overrides, routing precedence.
- Providers — add Kimi, DeepSeek, GLM, OpenRouter, and other backends.
- Connect Claude Code — credentials in depth, per-agent routing.
- Troubleshooting — common errors and fixes.