Infer × Claude Code · setup guide for 2.1.310
Run Claude Code on Infer.
Claude Code speaks Anthropic Messages to Infer. Point ANTHROPIC_BASE_URL at https://infer.flow7.org and every model alias at one Infer Claude selector.
Infer Setup 0.2.0
One command.
Pick a Claude model from the live list and enter your Infer API key when asked; Claude Code starts on Infer for that session. Your own settings files stay as they are.
npx --yes https://infer.flow7.org/downloads/infer-setup-0.2.0.tgz run claudeNeeds Node.js 20 or newer. Other clients and options.
Configuration
Choose the Claude model and route.
Only Claude models with at least 125,000 tokens of context are listed: Claude Code routes only Claude models through a gateway and compacts at 100,000 tokens at the earliest.
Waiting for the live Infer catalog…
The helper reads your key from INFER_API_KEY, so it never sits in the file. On Windows, use echo %INFER_API_KEY% as the helper. For the VS Code extension, set the same variables in claudeCode.environmentVariables.
Good to know
What changes behind a gateway.
- 01
The base URL has no /v1.
Claude Code appends
/v1/messagesitself. A base ending in/v1requests/v1/v1/messages. - 02
The route's window sets compaction.
Claude Code recognizes the Claude model in an
infer/claude-…selector and assumes its native window, soCLAUDE_CODE_AUTO_COMPACT_WINDOWcarries the route's limit. It accepts values from 100,000 to 1,000,000. - 03
Subagents stay on your selector.
An agent file that names its own model outranks
CLAUDE_CODE_SUBAGENT_MODEL;CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1keeps every subagent on Infer. - 04
/model lists Infer's Claude routes.
With gateway model discovery on, Claude Code reads Infer's model list and offers its Claude selectors in
/model. - 05
Prompt caching carries through.
Infer turns Claude Code's
cache_controlmarkers into prompt caching on routes that support it. Receipts show cache reads and writes separately. - 06
Some features stay with Anthropic.
Remote Control and voice dictation do not work through a gateway, and the desktop app uses its own third-party inference settings instead of
settings.json.
Start with a capped key.
Create an account, add credit, and give the API key a spend limit before the first session.