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.

clientClaude Code 2.1.310
protocolAnthropic Messages
base URLhttps://infer.flow7.org
keyapiKeyHelper or ANTHROPIC_AUTH_TOKEN
selectorloading catalog…

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 claude

Needs 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.

Reading Infer’s public catalog…
Merge into~/.claude/settings.json
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.

  1. 01

    The base URL has no /v1.

    Claude Code appends /v1/messages itself. A base ending in /v1 requests /v1/v1/messages.

  2. 02

    The route's window sets compaction.

    Claude Code recognizes the Claude model in an infer/claude-… selector and assumes its native window, so CLAUDE_CODE_AUTO_COMPACT_WINDOW carries the route's limit. It accepts values from 100,000 to 1,000,000.

  3. 03

    Subagents stay on your selector.

    An agent file that names its own model outranks CLAUDE_CODE_SUBAGENT_MODEL; CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1 keeps every subagent on Infer.

  4. 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.

  5. 05

    Prompt caching carries through.

    Infer turns Claude Code's cache_control markers into prompt caching on routes that support it. Receipts show cache reads and writes separately.

  6. 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.

SourcesChecked against Claude Code’s documentation and source on October 26, 2026. Infer has not recorded a live check with Claude Code yet.
LLM gateway ↗Environment variables ↗Model configuration ↗Settings ↗

Start with a capped key.

Create an account, add credit, and give the API key a spend limit before the first session.