> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# Using BeatAPI in Cline

> Configure the Cline extension for VS Code to run on BeatAPI through its OpenAI Compatible provider.

# Using BeatAPI in Cline

Cline is a VS Code extension that writes code, runs commands, and edits files across a project from inside the editor. It reaches BeatAPI through its **OpenAI Compatible** provider — three fields and no plugin.

## Prerequisites

1. **Visual Studio Code installed.**
2. **The Cline extension installed** — search for "Cline" in the Extensions marketplace (`Ctrl+Shift+X` / `Cmd+Shift+X`).
3. **A BeatAPI API key** — create one in [Dashboard → API Keys](https://beatapi.io/dashboard/apikeys).

## Step 1: Open the API configuration

On a fresh install, Cline shows a welcome panel. Click **Use your own API key**.

If you have configured it before, click the gear icon at the top of the Cline sidebar.

## Step 2: Configure BeatAPI

Expand **API Configuration** and fill in:

| Setting      | Value                                      |
| ------------ | ------------------------------------------ |
| API Provider | `OpenAI Compatible`                        |
| Base URL     | `https://api.beatapi.io/v1`                |
| API Key      | Your BeatAPI API key                       |
| Model ID     | A model ID, for example `claude-fable-5-1` |

Click **Done**. The configuration saves automatically and takes effect immediately — no reload.

> **Note**
>
> Choose **OpenAI Compatible**, not **OpenAI**. Some Cline builds hide the Base URL field on the plain OpenAI provider, which makes a custom base URL impossible to enter. The OpenAI Compatible provider always exposes it.

> **Note**
>
> The Model ID is typed by hand, so a typo surfaces as `not_found` rather than as a validation error. Copy it from the [pricing page](https://beatapi.io/pricing) or from `GET /v1/models`. IDs are case-sensitive and carry no vendor prefix — `claude-fable-5-1`, not `anthropic/claude-fable-5-1`.

Cline has a **Verify** button; use it before starting a task.

## Step 3: Work

Type the task in the input box at the bottom of the Cline panel:

```
Create a JavaScript function that validates an email address, with unit tests
```

Cline plans the work, writes the files, and asks before running any terminal command. Selecting code in the editor and right-clicking exposes **Explain with Cline** and **Improve with Cline**.

Switch models from the button below the input box, or by changing Model ID in settings. Changes apply immediately.

## Models

| Model ID                    | Choose it for                                          |
| --------------------------- | ------------------------------------------------------ |
| `claude-fable-5-1`          | The newest generation — the default for agentic coding |
| `claude-opus-5`             | Complex architecture and hard debugging                |
| `claude-sonnet-5`           | Day-to-day development at lower cost                   |
| `gpt-5.6-sol`               | The strongest OpenAI-family coding tier                |
| `claude-haiku-4-5-20251001` | Fast, cheap steps and quick edits                      |

Every text model on the account is reachable — see the [Text API](/text-api) for the full catalogue.

## FAQ

### The API key is reported invalid

1. Confirm the key was copied in full, with no extra whitespace.
2. Confirm Base URL is exactly `https://api.beatapi.io/v1`, including the `/v1` and with no trailing slash.
3. Confirm the key is active in [Dashboard → API Keys](https://beatapi.io/dashboard/apikeys).

### "Model Not Found"

The Model ID is not valid for this account. Check spelling and case against the [pricing page](https://beatapi.io/pricing).

### Responses are slow

Switch to a faster tier — `claude-haiku-4-5-20251001` or `claude-sonnet-5` — and keep the task narrow. Cline sends the open file and the selection as context, so a smaller selection is both faster and cheaper.

### 402 insufficient_credits

Insufficient balance: the balance is zero or below the price of the request. Top up from the dashboard.

### 429 rate_limit_exceeded

The key exceeded its request rate. Cline retries; if it keeps failing, slow down or raise the allowance. The per-minute rate rises with lifetime top-ups and is shown on the dashboard.

### Controlling spend

* Select only the code that needs work instead of sending a whole file.
* Use a cheaper model for routine edits and switch up for hard problems.
* Watch the per-key breakdown under `by_api_key` in [`GET /v1/usage`](/quick-guide), or on the dashboard.

## Support

Open a support ticket from the [dashboard](https://beatapi.io/dashboard) and include the `request_id` from the failing response.