# Claude Code (https://inference.net/docs/integrations/claude-code)

`fast claude on` points Claude Code at Inference.net's Anthropic-compatible
`/v1/messages` endpoint by editing `~/.claude/settings.json`.

## Connect Claude Code

<ConnectAgent integration="claude-code" />

## Connect with Inference Pass

If you have an Inference Pass subscription, use the `@inference/cli` (`inf`) CLI
for automatic plan detection, live allowance checks, self-healing config repair,
and local loopback proxy support:

```bash
npm install -g @inference/cli
inf auth login
inf pass on claude
inf pass status
```

Run `inf pass doctor` to repair drifted settings or rotated keys, `inf pass off claude`
to restore your previous configuration, or `inf pass proxy` for desktop apps over
`http://127.0.0.1:4141`.

## Choose a model

Claude Code has a model override for each agent type. `main`, `opus`, and
`sonnet` default to `kimi-k3-fast`; `haiku` and `subagents` default to
`deepseek-v4-flash-0731`. Set every override to the same model with `--model`,
or set them individually with the per-role flags. Add `--plan` to connect with
an Inference Pass plan key (the default automatically picks a model included in
your plan). Any [model catalog](/models/) ID works on pay-as-you-go keys; with
`--plan`, explicit IDs must be included in your plan (from `GET /v1/models`
authenticated with your plan key).

```bash
# Set the model for every override
fast claude on --model kimi-k3-fast

# Connect with an Inference Pass plan key
fast claude on --plan

# Set each override individually
fast claude on \
  --main kimi-k3-fast \
  --opus kimi-k3-fast \
  --sonnet kimi-k3-fast \
  --haiku deepseek-v4-flash-0731 \
  --subagents deepseek-v4-flash-0731
```

Run `on` again to change the defaults. Restart Claude Code afterward.

### Switch models in Claude Code

Every available model from the [model catalog](/models/) is in Claude Code's
`/model` picker; the built-in Anthropic entries are hidden because they all
route through the overrides above. Pick one and press Enter to make it the
default for new sessions, or `s` to use it for the current session only.

## Check status

```bash
fast claude status
```

Shows the connection, model, and config paths.

## Disconnect

```bash
fast claude off
```

Restores `settings.json` to the backup taken by `on`, so edits made after
connecting are lost. Restart Claude Code afterward.

## Troubleshooting

- **`fast claude status` says `off`** — run `fast claude on` and restart
  Claude Code.
- **Requests return 401** — run `fast status`, then `fast claude on`.
- **Model rejected** — pick an ID from the [model catalog](/models/).