> ## Documentation Index
> Fetch the complete documentation index at: https://docs.murmur.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# murmur setup inference

> Configure Claude, Codex, and OpenCode credentials interactively or from explicit inputs.

Run `murmur setup inference` to choose **Claude**, **Codex**, or **OpenCode**.
Claude and Codex show the selected profile’s subscription labels and API-key status,
then offer **Add a subscription**, **Add an API key** (or **Replace the API key**),
**Manage subscriptions**, and **Back**. The summary refreshes after each operation.
Manage subscriptions lets you select a label to update through browser login or
remove after confirmation; it does not display secret paths.

OpenCode shows the selected profile’s connections with their IDs, names, and
endpoints, then offers **Add a connection**, **View connection details**,
**Remove a connection**, and **Back**. Details show the provider, protocol,
endpoint, additional models, and API-key status. Removal asks for confirmation
and deletes the connection and its API key. The summary refreshes after each action.
Adding asks for a provider preset or custom connection ID, any required protocol
and endpoint, and an API key. Explicit connection flags or
`setup inference connection add` go directly to adding a connection.
Choose **Done** to finish without changing additional backends.

Every choice saves immediately to your developer profile. Cancelling a later choice does not undo saved inference credentials. A replaced backend's old local API-key override is removed.

Subscription login opens a browser and prints the login URL. OAuth login requires
user interaction. Interactive API-key setup prompts for the key, unless you pass
`--api-key-stdin`. Non-interactive setup reads `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`,
or uses `--api-key-stdin`. Existing subscription rotations are
preserved when you save an API key; subscriptions retain their existing priority,
with the API key available as a fallback.

## Examples

```bash theme={null}
murmur setup inference
murmur setup inference --backend codex --method subscription
murmur setup inference --backend claude --method api-key --non-interactive
murmur setup inference --backend opencode --provider openrouter \
  --non-interactive --api-key-stdin < key.txt
```

## Flags

| Flag | Purpose |
| - | - |
| `--backend claude\|codex\|opencode` | Select one backend; Back exits its menu. An explicit method or connection options save once and exit. Omit to choose backends interactively. |
| `--method subscription\|api-key` | Claude or Codex authentication method. Omit to show the summary and action menu. OpenCode uses API keys. |
| `--non-interactive` | Never prompt or start browser login. Requires an explicit backend, method for Claude/Codex, credentials, and existing Murmur authentication and tenant configuration. |
| `--api-key-stdin` | Read the key from standard input. Supply `--backend`, `--method api-key` for Claude/Codex, and any required connection options for OpenCode; selection prompts are disabled. Required for non-interactive OpenCode setup. |
| `--label NAME` | Add a subscription with this label. Interactive setup without a label allocates `default`, then `user2`, `user3`, etc. Non-interactive import without a label replaces the default subscription, creating it if absent. |
| `--service-profile NAME` | Save to this service profile instead of your developer profile. |
| `--provider`, `--id`, `--protocol`, `--base-url`, `--name`, `--model` | OpenCode [connection options](https://docs.murmur.dev/cli/setup-connection.md). `--model` is repeatable. |

For non-interactive Claude subscription import, set `CLAUDE_CODE_OAUTH_TOKEN` and,
if available, `CLAUDE_CODE_OAUTH_REFRESH_TOKEN`. Without `--label`, repeated imports
replace the default subscription and preserve other labeled subscriptions. An explicit
label adds a new subscription and must not already exist. This also applies to the
`setup inference subscription add --non-interactive` command.
Codex subscription login requires a browser; omit `--non-interactive`.

## Manage existing credentials

* [`murmur setup inference subscription`](https://docs.murmur.dev/cli/setup-subscription): list, update, or remove subscription credentials.
* [`murmur setup inference connection`](https://docs.murmur.dev/cli/setup-connection): list or remove OpenCode connections, or list provider presets.

The former `murmur setup subscription` and `murmur setup connection` commands have
been replaced by these commands under `murmur setup inference`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.