# Cline: CLI and VS Code configuration

> Use Cline with one raw ScaleMax credential and the base URL that matches the key's billing mode.

## Automatic configuration

**macOS / Linux**

```bash
scalemax update
```

**Windows PowerShell**

```powershell
scalemax.cmd update
```

Select **Cline**. ScaleMax configures the supported Cline surface only after Cline and VS Code are fully closed, preserves unrelated settings, writes private atomic files, and verifies that no custom authentication header was stored. Restart Cline or reload VS Code after setup.

> **Use Act mode to let Cline make changes.** Cline edits files and carries out the task only in **Act** mode. Plan mode is read-only: Cline can look through the project and propose a plan, but it will not change anything until you switch to Act. If Cline only plans, or says it cannot make changes, switch it to Act mode — nothing is wrong with your key.

## Choose the matching base URL

**Start with the key you bought.** Choose its billing path, then the row that matches your client's protocol.

| Key type | Protocol | Use with | Base URL |
| --- | --- | --- | --- |
| API Credit | OpenAI-compatible Chat Completions or Responses | Codex, OpenCode, Cursor, Roo Code, SDKs, and direct HTTP | `https://api.scalemax.pro/v1` |
| API Credit | Native Anthropic Messages | Claude Code, Claude Desktop, and native Messages clients | `https://api.scalemax.pro` |
| Token Budget | OpenAI, Gemini, Grok, Qwen, DeepSeek, or Local Models token pack · OpenAI-compatible API | Codex, OpenCode, Cursor, Roo Code, SDKs, and direct HTTP | `https://api.scalemax.pro/token/v1` |
| Token Budget | Claude token pack · Native Anthropic Messages | Claude Code, Claude Desktop, and native Messages clients | `https://api.scalemax.pro/token` |
| Token Budget | Claude token pack · OpenAI-compatible adapter | OpenCode, Cursor, Roo Code, compatible SDKs, and direct HTTP | `https://api.scalemax.pro/token/v1` |

**The protocol decides whether the client field ends in `/v1`.** OpenAI-compatible clients use a base URL ending in `/v1`. Native Anthropic clients use the origin only, without `/v1`, because they append `/v1/messages` themselves. A Claude token key therefore reaches `/token/v1/messages` when the native client builds its request.

Use the key's matching billing surface and only models returned by its authenticated catalog. A Claude token key and an OpenAI token key are provider-scoped; neither can be swapped onto the other's models.

## Manual Cline for VS Code setup

1. Open Cline settings and select its OpenAI-compatible provider.
2. Paste the matching base URL from the table above.
3. Paste only the raw `sm_live_…` API key.
4. Choose an exact model ID returned by `scalemax models`.
5. Leave custom request headers empty, save, and reload VS Code.

## Important authentication rule

Do not paste `Bearer ` before the key and do not add a custom `Authorization` or`x-api-key` header. Cline generates the Bearer header from its API Key field. A second stored header can override it, causing model discovery to work while inference reports authentication or load failures.

## Verify

**macOS / Linux**

```bash
scalemax doctor
scalemax models
```

**Windows PowerShell**

```powershell
scalemax.cmd doctor
scalemax.cmd models
```

If a task still fails, copy the request ID and status code—not the API key—and follow the [troubleshooting guide](https://docs.scalemax.pro/docs/troubleshooting).
