OpenAdapterOpenAdapter
Integrations

Claude Code

Use OpenAdapter as the Anthropic endpoint inside Claude Code, Anthropic's official coding CLI.

Claude Code talks the native Anthropic Messages API. OpenAdapter exposes /v1/messages as a translating proxy — your Claude Code installation talks Anthropic format, the gateway routes the request to whatever upstream model you've mapped to the sonnet/haiku/opus roles.

The installer writes ~/.claude/settings.json with your API key and the role → model mapping.

curl -sL "https://api.openadapter.in/api/setup/claude-code?key=YOUR_API_KEY" | bash
irm "https://api.openadapter.in/api/setup/claude-code-ps?key=YOUR_API_KEY" | iex

You can override the defaults by appending &sonnet=<alias>&haiku=<alias>&opus=<alias> to the URL.

Manual setup

If you'd rather wire it by hand, set two env vars:

export ANTHROPIC_BASE_URL=https://api.openadapter.in
export ANTHROPIC_AUTH_TOKEN=sk-cv-...

Then run claude.

Role → model mapping

Claude Code asks for three Anthropic models (sonnet / haiku / opus). The gateway maps those role names to whatever real upstream models you choose. The dashboard's default picks are:

Claude Code roleGateway alias
sonnetKimi-K2.5
haikuMiniMax-M2.7
opusGLM-5

You can change any of these in ~/.claude/settings.json or pick different aliases when running the installer URL.

List every alias your account can use: GET /v1/models or the Dashboard → Models page.

Notes

  • The translating proxy preserves Anthropic-specific features (tool use, vision) when the upstream model supports them.
  • Quota is enforced by request count, not tokens.
  • If you previously used Anthropic directly, just swap the two env vars — no code changes.

On this page