---
title: "Use Autohand models in Cline"
description: "Point the Cline OpenAI Compatible provider at Autohand, then use Moa to plan and Fantail to act."
sidebar:
  label: "Cline"
seo:
  description: "Configure Cline to use Autohand Fantail and Moa through the OpenAI Compatible provider, and assign separate models to Plan and Act modes."
---

## How do I use Autohand models in Cline? [#quick-answer]

In the Cline settings, select the **OpenAI Compatible** API provider, set the base URL to `https://api.autohand.ai/v1`, paste your Autohand API key, and enter `fantail` or `moa` as the model ID. Enable separate models for Plan and Act to plan with Moa and implement with Fantail.

|  |  |
| --- | --- |
| Status | Available through the OpenAI Compatible provider |
| Requires | An Autohand account, an Autohand API key, and the Cline extension. |
| Configure with | **API Provider**: OpenAI Compatible, with the Autohand base URL, API key, and model ID. |
| Best for | Planning with Moa and implementing with Fantail in the same task. |

:::warning
**Know before you start:** Cline has no separate model setting for its subagents. Subagents are read-only research agents that run within the current task.
:::

## Prerequisites

- An Autohand account. [Sign up or sign in to Console](https://console.autohand.ai/). The Free plan includes Fantail. Moa requires the Pro plan or above.
- An Autohand API key. The first step shows how to create one.
- The Cline extension for VS Code or JetBrains.

## Step 1: Create an Autohand API key [#create-key]

1. Sign in to [Autohand Console](https://console.autohand.ai/).
2. Open [API Keys](https://console.autohand.ai/api-keys) and select **Create API Key**.
3. Enter a name that identifies the agent and machine, for example `cline-laptop`.
4. Select **Create Key** and copy the value. Console shows the key only once.

## Step 2: Keep the key available [#set-key]

Cline stores the key you paste in its settings. Keep a copy in an environment variable so you can test the key from a terminal.

Store the key in an environment variable so it stays out of configuration files and source control.

```bash
# macOS and Linux (add the line to ~/.zshrc or ~/.bashrc to keep it)
export AUTOHAND_API_KEY="your-api-key"
```

```powershell
# Windows PowerShell (current session)
$env:AUTOHAND_API_KEY = "your-api-key"

# Windows (persist for new sessions)
setx AUTOHAND_API_KEY "your-api-key"
```

Confirm that the key works and that your plan can see the models:

```bash
curl https://api.autohand.ai/v1/models \
  -H "Authorization: Bearer $AUTOHAND_API_KEY"
```

The response lists `fantail`, and `moa` when your plan includes it. A `401` response means the key is missing or not recognised.

## Step 3: Configure the OpenAI Compatible provider [#configure]

1. Open Cline and select the settings icon.
2. In **API Provider**, select **OpenAI Compatible**.
3. In **Base URL**, enter `https://api.autohand.ai/v1`.
4. In **API Key**, paste your Autohand API key.
5. In **Model**, enter `fantail`.
6. Expand **Model Configuration** and set the limits for the model:
    - **Max Output Tokens**: `16000` for Fantail, or `262144` for Moa.
    - **Context Window**: `262144` for Fantail, or `1048576` for Moa.
7. Leave **Use Azure Identity Authentication** cleared.

## Step 4: Choose Fantail or Moa [#choose-model]

| Model ID | Use it for | Context | Max output | Plans |
| --- | --- | --- | --- | --- |
| `fantail` | Main coding loops, quick fixes, reviews, and sub-agents | 262,144 tokens | 16,000 tokens | Free and above |
| `moa` | Planning, large refactors, and multi-file reasoning | 1,048,576 tokens | 262,144 tokens | Pro and above |

### Use Moa to plan and Fantail to act

1. Open Cline settings.
2. Enable **Use different models for Plan and Act**.
3. For Plan mode, select **OpenAI Compatible** and enter `moa` with the Moa limits.
4. For Act mode, select **OpenAI Compatible** and enter `fantail` with the Fantail limits.

Cline switches to the configured model when you switch between Plan and Act.

## Step 5: Run a test prompt [#test]

Start a new task and send:

```text
Summarize what this repository does in three sentences. Do not edit files.
```

A text answer confirms that Cline reaches Autohand. If Cline shows an authentication or connection error, see [Troubleshooting](#troubleshooting).

## Subagents and Fantail [#subagents]

Cline subagents are read-only research agents that run in parallel through the `use_subagents` tool. They can read and search files and run read-only commands, and they cannot edit files. Cline does not provide a separate model setting for subagents.

To keep research inexpensive, do subagent-heavy exploration in a mode that uses Fantail, for example Act mode with Fantail selected. To turn subagents off, disable the `use_subagents` tool in **Settings** \> **Features** \> **Agent**.

## Troubleshooting

| Symptom | Cause | Resolution |
| --- | --- | --- |
| `401` with `Credential not recognised.` or `Missing Autohand credential.` | The agent sent no key, a mistyped key, or a revoked key. | Confirm that `AUTOHAND_API_KEY` is set in the environment that starts the agent. Create a new key in Console if needed. |
| `404` or `Not found` | The base URL or the API format is wrong. | Use `https://api.autohand.ai/v1` with the OpenAI Chat Completions format. Autohand does not serve `/v1/responses` or `/v1/messages`. |
| Model not found or not available | The model ID is misspelled, or your plan does not include it. | Use the exact IDs `fantail` or `moa`. Moa requires the Pro plan or above. |
| Context length or output errors | The agent uses default limits for an unknown model. | Set the limits for Fantail (262,144 context, 16,000 output) or Moa (1,048,576 context, 262,144 output). |
| `Invalid API Key` in Cline | The key in the Cline settings differs from the key in Console. | Paste the key again, then test it with the `curl` command in Step 2. |

## Next steps

- [Use Autohand models in other coding agents](/integrations/coding-agents)
- [Compare Autohand models](/models)
- [Fantail model reference](/models/fantail)
- [Moa model reference](/models/moa)
- [Create and protect an API key](/agent-sdk/api-key-setup)

**Which API provider do I select in Cline for Autohand?**

Select **OpenAI Compatible** and set the base URL to `https://api.autohand.ai/v1`.

**Can Cline plan with Moa and act with Fantail?**

Yes. Enable **Use different models for Plan and Act**, then enter `moa` for Plan mode and `fantail` for Act mode.

**Can I choose a model for Cline subagents?**

No. Cline does not provide a separate model setting for subagents.
