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

# Use Cline with CometAPI

> Use this guide to configure Cline with CometAPI by setting the base URL, API key, and model or provider options.

[Cline](https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev) is a VS Code extension that brings AI coding assistance directly into your editor. Configure it to use CometAPI as a custom OpenAI-compatible provider.

## Prerequisites

* [Cline](https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev) installed in VS Code
* A [CometAPI](https://www.cometapi.com) account with an active API key

## Setup

<Steps>
  <Step title="Install Cline in VS Code">
    Search for **Cline** in the VS Code Extensions panel and install it.

    <Frame>
      <img src="https://mintcdn.com/cometapi/mA1ovj6s0e3RM42l/images/integrations/810968_351589.png?fit=max&auto=format&n=mA1ovj6s0e3RM42l&q=85&s=e7a42db3ea9dfa41a89ff14f23b75dc4" alt="VS Code Extensions panel showing the Cline extension" width="1500" height="1000" data-path="images/integrations/810968_351589.png" />
    </Frame>
  </Step>

  <Step title="Get your CometAPI API key">
    Log in to the [CometAPI dashboard](https://www.cometapi.com/console). Click **Add API Key** and copy your key and base URL (`https://api.cometapi.com`).

    <Frame>
      <img src="https://mintcdn.com/cometapi/SZhlxZhCnMLn__BW/images/overview/810968_364191.png?fit=max&auto=format&n=SZhlxZhCnMLn__BW&q=85&s=aef81a83f29f8eb16655ed4060425f50" alt="CometAPI dashboard — Add API Key" width="3824" height="1892" data-path="images/overview/810968_364191.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cometapi/HhtmQffktazbxUvS/images/overview/810968_364193.png?fit=max&auto=format&n=HhtmQffktazbxUvS&q=85&s=d893f659267150d0faf45f99eb5dffc1" alt="CometAPI API key and base URL" width="2434" height="1232" data-path="images/overview/810968_364193.png" />
    </Frame>
  </Step>

  <Step title="Configure the API provider">
    Open Cline settings and select **OpenAI Compatible** as the provider. Enter `https://api.cometapi.com/v1` in the **Base URL** field, paste your key into **API Key**, and enter the model ID you want to use.

    <Frame>
      <img src="https://mintcdn.com/cometapi/mA1ovj6s0e3RM42l/images/integrations/810968_351590.png?fit=max&auto=format&n=mA1ovj6s0e3RM42l&q=85&s=37db10e7d84ac7c4eac050d7021adae4" alt="Cline settings with OpenAI Compatible selected and CometAPI base URL entered" width="1500" height="1000" data-path="images/integrations/810968_351590.png" />
    </Frame>
  </Step>

  <Step title="Test the connection">
    Send a test prompt in Cline (e.g., ask it to generate a hello world function). A successful response confirms the integration is working.
  </Step>
</Steps>
