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

# Authorizing with Cline

> Connect Cline to an AI model. Sign in with a Cline account for instant access, or bring your own API key from Anthropic, OpenRouter, OpenAI, Google Gemini, or AWS Bedrock.

Cline needs a connection to an AI model before it can do any work. You have two paths:

<CardGroup cols={2}>
  <Card title="Cline account" icon="bolt">
    Sign in with Google, GitHub, or email. No API keys to manage. Access models from Anthropic, OpenAI, Google, and more through a single account with built-in billing.

    **Best for:** Most users, fastest setup.
  </Card>

  <Card title="Bring your own key (BYOK)" icon="key">
    Paste an API key from any supported provider: Anthropic, OpenRouter, OpenAI, Google Gemini, AWS Bedrock, and more. Run models locally with Ollama or LM Studio for full privacy.

    **Best for:** Enterprise, custom billing, local models.
  </Card>
</CardGroup>

## Sign in with a Cline account

The Cline account gives you access to multiple AI models through a single login — no separate API keys required.

<Steps>
  <Step title="Open the Cline panel">
    Click the Cline icon in the Activity Bar (VS Code/Cursor) or go to **View → Tool Windows → Cline** (JetBrains).
  </Step>

  <Step title="Click Sign Up">
    In the Cline panel, click **Sign Up**. Your browser opens to [app.cline.bot](https://app.cline.bot).
  </Step>

  <Step title="Authenticate">
    Choose Google, GitHub, or email to complete authentication.
  </Step>

  <Step title="Return to your editor">
    After authentication, you are redirected back to your editor. Cline stores your session token in your IDE's native secret storage (VS Code Secrets or JetBrains Credential Store). Your credentials are never sent to Cline's servers.
  </Step>

  <Step title="Select a model">
    Open Cline settings (gear icon in the Cline panel). Under **API Provider**, make sure **Cline** is selected. Then choose a model from the **Model** dropdown.

    To find no-cost options, search for **free** in the model selector — free models are labeled **FREE**.
  </Step>

  <Step title="Verify">
    Send any message in the Cline chat. If Cline responds, you are ready to go.
  </Step>
</Steps>

<Note>
  **Adding credits:** Click **Add Credits** in Cline settings or visit your [account dashboard](https://app.cline.bot/dashboard). Credits work across all available models.
</Note>

## Bring your own API key (BYOK)

If you prefer to use your own API keys — for specific billing arrangements, higher rate limits, or access to beta models — select your provider in Cline settings and paste your key.

<Steps>
  <Step title="Open Cline settings">
    Click the gear icon in the top-right of the Cline panel.
  </Step>

  <Step title="Choose a provider">
    Select a provider from the **API Provider** dropdown.
  </Step>

  <Step title="Paste your API key">
    Enter your API key in the field provided. Keys are stored in your system's credential manager and sent only to your selected provider — never to Cline's servers.
  </Step>

  <Step title="Select a model and verify">
    Choose a model from the **Model** dropdown, then send a message to confirm the connection works.
  </Step>
</Steps>

### Provider setup

<Tabs>
  <Tab title="Anthropic">
    Anthropic provides direct access to Claude models including Claude Sonnet and Claude Opus.

    **Get an API key:**

    1. Go to [console.anthropic.com](https://console.anthropic.com).
    2. Sign in or create an account.
    3. Navigate to **API Keys** and click **Create Key**.
    4. Copy the key — it starts with `sk-ant-`.

    **Configure in Cline:**

    * **API Provider:** Anthropic
    * **API Key:** Paste your key
    * **Model:** Choose from available Claude models (Claude Sonnet 4 is recommended for reliability)

    <Tip>
      Claude Sonnet 4 offers the best balance of capability and speed for most coding tasks. Use Claude Opus for complex multi-step reasoning tasks.
    </Tip>
  </Tab>

  <Tab title="OpenRouter">
    OpenRouter is a unified API gateway that provides access to dozens of models — Claude, GPT-4, Gemini, Llama, and more — through a single API key with competitive pricing.

    **Get an API key:**

    1. Go to [openrouter.ai](https://openrouter.ai) and sign in.
    2. Navigate to **Keys** and click **Create Key**.
    3. Copy the key — it starts with `sk-or-`.

    **Configure in Cline:**

    * **API Provider:** OpenRouter
    * **API Key:** Paste your key
    * **Model:** Cline fetches the latest model list from OpenRouter automatically, so new models appear as soon as they launch

    <Tip>
      OpenRouter is a good starting point if you want to experiment with different models without setting up multiple provider accounts.
    </Tip>
  </Tab>

  <Tab title="OpenAI">
    OpenAI provides GPT-4o and other GPT models.

    **Get an API key:**

    1. Go to [platform.openai.com](https://platform.openai.com) and sign in.
    2. Navigate to **API Keys** and click **Create new secret key**.
    3. Copy the key — it starts with `sk-`.

    **Configure in Cline:**

    * **API Provider:** OpenAI
    * **API Key:** Paste your key
    * **Model:** Select from available GPT models

    <Note>
      Cline also supports any OpenAI-compatible API endpoint. Select **OpenAI Compatible** as the provider, then enter a custom base URL to point to your endpoint.
    </Note>
  </Tab>

  <Tab title="Google Gemini">
    Google Gemini models offer very large context windows, useful for tasks involving large codebases or long documents.

    **Get an API key:**

    1. Go to [aistudio.google.com](https://aistudio.google.com) and sign in with a Google account.
    2. Click **Get API key** and create a key in a new or existing Google Cloud project.
    3. Copy the key.

    **Configure in Cline:**

    * **API Provider:** Google Gemini
    * **API Key:** Paste your key
    * **Model:** Select from available Gemini models (Gemini 2.5 Pro has a very large context window)

    <Tip>
      Use Gemini models when you need to pass large amounts of code or documentation into the context window at once.
    </Tip>
  </Tab>

  <Tab title="AWS Bedrock">
    AWS Bedrock provides managed access to Claude and other models within your AWS account. It is commonly used in enterprise environments with existing AWS infrastructure.

    **Prerequisites:**

    * An AWS account with Bedrock enabled in your region
    * IAM credentials with `bedrock:InvokeModel` permissions
    * Model access granted in the [Bedrock console](https://console.aws.amazon.com/bedrock)

    **Configure in Cline:**

    * **API Provider:** AWS Bedrock
    * **AWS Access Key ID:** Your IAM access key
    * **AWS Secret Access Key:** Your IAM secret key
    * **AWS Region:** The region where Bedrock is enabled (e.g., `us-east-1`)
    * **Model:** Select an available Bedrock model

    <Note>
      You can also use IAM role-based authentication if you are running Cline in an environment that already has AWS credentials configured (for example, an EC2 instance with an attached role).
    </Note>
  </Tab>
</Tabs>

## Local models

Run models on your own hardware for complete privacy and zero per-request cost.

<CardGroup cols={2}>
  <Card title="Ollama" icon="server" href="/models/running-locally">
    Easy setup with a wide model selection. Supports Llama, Qwen, Mistral, and many others. Run `ollama serve` and select **Ollama** in Cline settings.
  </Card>

  <Card title="LM Studio" icon="display" href="/models/running-locally">
    GUI-based model management and download. Start the local server in LM Studio and select **LM Studio** as your provider in Cline settings.
  </Card>
</CardGroup>

<Note>
  Local models require sufficient hardware, particularly GPU memory. Smaller models (7B–14B parameters) work on consumer hardware; larger models need more RAM or a GPU. See the [running models locally](/models/running-locally) guide for requirements.
</Note>

## Choosing a model

| Priority                     | Recommended model             |
| ---------------------------- | ----------------------------- |
| Best overall reliability     | Claude Sonnet 4               |
| Best value                   | Qwen3 Coder                   |
| Fastest responses            | Cerebras GLM 4.6              |
| Full privacy                 | Any Ollama or LM Studio model |
| Existing Claude subscription | Claude Code (Max/Pro plan)    |

## CLI authentication

If you use the Cline CLI, authenticate from your terminal:

```bash theme={null}
cline auth
```

This opens a browser for OAuth authentication, the same flow as the IDE extension. Your session persists until you sign out.

## Troubleshooting

| Issue                          | Fix                                                                                                                           |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| "Unauthorized: Please sign in" | Session expired. Click **Sign In** in Cline settings to re-authenticate.                                                      |
| Browser doesn't open for OAuth | Check your default browser settings. Copy the URL from the Cline output panel and open it manually.                           |
| Frequent re-authentication     | Ensure you are not clearing IDE secrets. Try a full sign-out and sign-in.                                                     |
| API key not accepted           | Verify the key is active and has not expired. Confirm you selected the matching provider in Cline settings.                   |
| Can't access organization      | Verify membership at [app.cline.bot](https://app.cline.bot) and ask your admin about permissions. Sign out and sign in again. |

## Next steps

<CardGroup cols={2}>
  <Card title="Your first project" icon="rocket" href="/getting-started/your-first-project">
    Build a working todo app with Cline to practice the core workflow.
  </Card>

  <Card title="Model selection guide" icon="sliders" href="/models/model-selection-guide">
    Compare models across speed, cost, and context window size to find the best fit for your tasks.
  </Card>
</CardGroup>
