One command →
curl -fsSL https://get.aireserve.com/install.sh | sh installs the aireserve CLI and configures Claude Code with
the full gateway model catalog in its native /model picker — plus a session-cost status line and a one-command undo.Or connect in one click →
The guided connect page creates a managed key for your account and writes the
env block of ~/.claude/settings.json
for you — no terminal work./v1), pass your AI Reserve key
as the auth token, and make sure ANTHROPIC_API_KEY is empty so the CLI
doesn’t prefer it:
env block of
~/.claude/settings.json) to make the routing permanent. Requests hit
/v1/messages — including count_tokens — so the full agent
loop, tool use, and prompt caching work unchanged.
The one-click flow and
aireserve configure claude-code set CLAUDE_CODE_MCP_ALLOWLIST_ENV=1 without changing
.mcp.json or ~/.claude.json. Stdio MCP servers no longer inherit the session’s ANTHROPIC_AUTH_TOKEN; variables
listed in each server’s own env remain available, matching Anthropic’s environment-variable
reference. That reference does not list a separate minimum version for this
setting; AI Reserve keeps its stricter Claude Code ≥ 2.1.118 requirement. We evaluated Claude Code’s apiKeyHelper,
but it changes credential refresh and helper-process behavior without creating this MCP boundary, so AI Reserve
continues to use the existing receipt-owned auth token.Why the [1m] suffix?
When Claude Code talks to a gateway
it can’t verify 1M support, so it budgets a 200K window by default — the context meter
fills five times faster than first-party even though the gateway serves the full
window. The [1m] id form tells Claude Code to budget the same 1M-token
context it has first-party. It works on every extended-context model
(claude-sonnet-4-6, claude-sonnet-5, claude-opus-5, fable-5, opus-4-8):
anthropic-beta: context-1m-2025-08-07 opt-in, which the gateway relays to
Anthropic — and the gateway also accepts the [1m] id form directly, so
either convention works. Selecting a 1M variant from the /model picker is
known not to stick behind a custom base URL; pin it through the environment variable
instead. Tokens are billed at the model’s normal rates.
Full model catalog in the /model picker
Claude Code (≥ 2.1.118) can populate its native /model picker straight from
the gateway:
/v1/models and lists every model your key can
serve, with real display names. Models outside the Claude family appear under
self-naming ids like claude-air-gpt-5.6-sol[1m] (Claude Code only lists
claude/anthropic-prefixed ids) — the id always names the model that serves
the request, and the response’s x-aireserve-served-model header records it.
Add X-Gateway-Model-View: all on a second line of ANTHROPIC_CUSTOM_HEADERS
to list the full catalog instead of the recommended compact set. The
aireserve CLI sets all of this up (and undoes it) for you.
Limitations
Most Connectors have a native MCP server you can add directly — same tools,
one-time OAuth in your browser, and it keeps working whether the gateway is
configured or not:
Claude Agent SDK
The embeddable agent runtime takes the same three variables viaoptions.env: