How do I use Opper with Claude Code?
Run npx @opperai/cli launch claude, which sets ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN for the session, or set ANTHROPIC_BASE_URL to https://api.opper.ai/v3/compat with your Opper key yourself; requests cost provider rates plus Opper's 3% credit fee on the Gateway plan.
# Sets ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN for this session
npx @opperai/cli launch claude
Shell exports last for one terminal; put the same values in the env block of ~/.claude/settings.json to keep them. Run /status in Claude Code to check the base URL.
Gotchas in Opper's own docs
| Issue | What happens | What to do |
|---|---|---|
| The launch command | Sets the variables for that session only | Use the manual exports or ~/.claude/settings.json to keep them |
| Model names | Claude Code asks for its own Opus, Sonnet and Haiku names | Map them with the ANTHROPIC_DEFAULT_*_MODEL aliases, as in the Aliases tab |
| Other models | Any Opper model can stand in, for example Gemini for the Haiku slot | Test tool use on a real task first |
| Model picker | Shows only Claude's names by default | Set CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1 |
| Budget reached | The call that crosses it completes; the next gets HTTP 402 | Adding credit doesn't clear it; raise the budget |
| Fallback chains | Documented as a Control Plane feature | Gateway users get provider ordering only |
From docs.opper.ai (Claude Code, Claude Code router guide, spend rules), October 13, 2026.
What a request costs through Opper
The catch
Opper's own example aliases name Claude Opus 5 and Sonnet 5, a generation behind its catalog. Check which IDs you map before a long session, because Claude Code's slot names won't tell you.
Where Standard Compute fits
Standard Compute needs no aliases: keep Claude Code's own model names and the router decides per request whether a step needs Claude, inside a plan from $19 that stops at its budget. If you need the gateway in Stockholm with ISO 27001, Opper is the better fit.
FAQ
What is the Opper base URL for Claude Code?
https://api.opper.ai/v3/compat, with your Opper key in ANTHROPIC_AUTH_TOKEN. Codex uses the same base URL with wire_api = "responses".
Does Opper have a one-command Claude Code setup?
Yes. npx @opperai/cli launch claude starts Claude Code with Opper's variables set for that session; the CLI also launches Codex, OpenCode, OpenClaw, Hermes and Pi.
Can I run GPT or Gemini in Claude Code through Opper?
Yes. Map Claude Code's model slots to any Opper model with the ANTHROPIC_DEFAULT_OPUS_MODEL, _SONNET_ and _HAIKU_ variables; Opper's guide puts Gemini in the Haiku slot.
Is there an OpenRouter migration guide for Opper?
Yes. Opper's Claude Code router guide has a section for users coming from OpenRouter.