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

# Claude Code

> Connect OverControl to Claude Code using a Messages settings file, API key, and Lume model.

Connect OverControl to **Claude Code** and use Lume models directly inside your coding workflow.

Claude Code speaks Messages, so you connect it with a base URL, your API key, and a Lume model for each alias it already uses.

<Note>
  This guide covers Claude Code in the terminal, using a settings file.
</Note>

***

## Before you start

You need:

* an [OverControl account](https://app.overcontrolgroup.com/register);
* an OverControl API key;
* Claude Code installed;
* a Lume model ID.

<Card title="Open the API dashboard" icon="key" href="https://app.overcontrolgroup.com/dashboard" cta="Open dashboard">
  Create and manage the API key you will use with Claude Code.
</Card>

***

## 1. Install Claude Code

Install **Claude Code** from npm. You need Node.js 18 or newer.

```bash theme={null}
npm install -g @anthropic-ai/claude-code
```

***

## 2. Open the settings file

Claude Code reads the connection from:

```text theme={null}
~/.claude/settings.json
```

On Windows that file is:

```text theme={null}
%USERPROFILE%\.claude\settings.json
```

Create the file if it is not there. It applies to every project. Keep the key out of a settings file you commit.

***

## 3. Configure OverControl

Copy this into the settings file. Replace `your OverControl API key` with your key. The key needs the scope `messages:create`, and it starts with `oc_sk_`.

```json theme={null}
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "your OverControl API key",
    "ANTHROPIC_BASE_URL": "https://api.overcontrolgroup.com",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "lume-omni",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "lume-3.5",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "lume-3.5-max",
    "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "350000",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
    "CLAUDE_CODE_MAX_OUTPUT_TOKENS": "16000",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
  }
}
```

<Warning>
  Keep your API key private. Never expose it in screenshots, logs, public configuration files, or source-control repositories.
</Warning>

***

## 4. Verify the connection

Open a project and start Claude Code. Close an existing session first if the settings file was already open.

```bash theme={null}
cd your-project
claude
```

If Claude Code asks whether to use this API key, confirm it. Then send a simple task:

```text theme={null}
Explain the structure of this project and identify the main files I should understand first.
```

If Claude Code returns a response using the selected Lume model, the integration is ready.

***

## Working with Claude Code

Once connected, Claude Code can use OverControl while helping you:

* understand unfamiliar code;
* explain files and functions;
* plan implementations;
* debug issues;
* review or refactor code;
* write tests;
* draft technical documentation;
* reason about architecture.

Claude Code can also inspect files, propose edits, and run commands as part of a task.

A `thinking` block can stay on the request. The reply that comes back is the text. [Migrate from Anthropic](/migrate/anthropic) is the same Messages client.

<Warning>
  Review file changes and terminal commands before approving them, especially when working with sensitive projects or production systems.
</Warning>

***

## Choose a model

Claude Code picks a model through the alias on the session.

| Alias | Model | Where it is used |
| - | - | - |
| Haiku | `lume-omni` | Background tasks. This is also the model that can read an image or a PDF. |
| Sonnet | `lume-3.5` | The usual session. |
| Opus | `lume-3.5-max` | The stronger model, including Plan mode. |

Use **Lume 3.5 Max** when the task needs more reasoning, for debugging, architecture, or a longer chain of steps. The Opus alias is already that ID. To use it for the usual session, set `ANTHROPIC_DEFAULT_SONNET_MODEL` to `lume-3.5-max`.

A session on Sonnet or Opus takes text. An image or a PDF in that session needs `lume-omni`.

You only need to change the model ID. The Base URL and API key remain the same.

[Compare Lume models](/models)

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Claude Code says the API key is invalid">
    Check that your OverControl API key was copied correctly and has not been revoked.

    You can create or manage keys from the [API dashboard](https://app.overcontrolgroup.com/dashboard).
  </Accordion>

  <Accordion title="Claude Code cannot connect">
    Confirm that the Base URL is:

    ```text theme={null}
    https://api.overcontrolgroup.com
    ```

    Leave `/v1` off the end. Also check your network connection and API key.
  </Accordion>

  <Accordion title="The model is not found">
    Make sure the model ID is entered exactly as documented.

    ```text theme={null}
    lume-3.5
    ```

    [View available models](/models)
  </Accordion>

  <Accordion title="The settings file did not take effect">
    Close every Claude Code window, open a new terminal, and run `claude` again. Confirm the JSON has no missing or extra commas.
  </Accordion>

  <Accordion title="Requests fail after working previously">
    Check your selected model, API key, available quota or balance, and API usage in the OverControl dashboard.
  </Accordion>
</AccordionGroup>

***

## Next steps

<CardGroup cols={3}>
  <Card title="AI coding tools" icon="code" href="/integrations/ai-coding-tools">
    Return to the AI coding tools overview.
  </Card>

  <Card title="Models" icon="brain" href="/models">
    Choose the Lume model for your coding workflow.
  </Card>

  <Card title="Integrations" icon="plug" href="/integrations">
    Explore all supported integrations.
  </Card>
</CardGroup>


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