Claude Code · Facts verified 2026-10-13

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.

terminalone command
# 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

IssueWhat happensWhat to do
The launch commandSets the variables for that session onlyUse the manual exports or ~/.claude/settings.json to keep them
Model namesClaude Code asks for its own Opus, Sonnet and Haiku namesMap them with the ANTHROPIC_DEFAULT_*_MODEL aliases, as in the Aliases tab
Other modelsAny Opper model can stand in, for example Gemini for the Haiku slotTest tool use on a real task first
Model pickerShows only Claude's names by defaultSet CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1
Budget reachedThe call that crosses it completes; the next gets HTTP 402Adding credit doesn't clear it; raise the budget
Fallback chainsDocumented as a Control Plane featureGateway users get provider ordering only

From docs.opper.ai (Claude Code, Claude Code router guide, spend rules), October 13, 2026.

Every way to run other models in Claude Code

What a request costs through Opper

Cost per 100 requests, US dollars
Claude
Claude Opus 5.5$10.98
Claude Sonnet 5.5$5.49
Efficient model, for comparison
GPT-6 Luna$0.43
Coding-agent requests on our gateway, September 13 to October 12, 2026, averaging 133K input and 698 output tokens, 87% of input from cache, at list price plus 3%. Claude Code was not in the sample; its requests follow the same pattern of large cached context, so read these as relative costs.

Opper pricing in full

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.

Related guides