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

# Use Cline with FriendliAI

> Configure Cline to use FriendliAI for fast, cost-efficient, and reliable open-source model inference.

export const AgentAlternativeTip = ({agentName, agentAlternativeType, agentAlternativeUrl, agentAlternativeInstallPageName, agentAlternativeInstallUrl}) => <Tip>The following steps are specific to the {agentName} Visual Studio Code extension. If you're using another {agentName} product (such as <a href={agentAlternativeUrl}>{agentName} {agentAlternativeType}</a>), see <a href={agentAlternativeInstallUrl}>{agentName} Docs {">"} {agentAlternativeInstallPageName}</a> instead.</Tip>;

export const AgentSteps = ({agentName, agentInstallUrl, agentPromptPageName, agentPromptUrl, children}) => <Steps>
    <Step title={`Install ${agentName}`}>
      <p>If you haven't already, <a href={agentInstallUrl}>install {agentName}</a>.</p>
    </Step>

    <Step title="Get a FriendliAI API Key">
      <p>If you need a new API key, <a href="/integrate/overview#create-an-api-key">create one.</a></p>
    </Step>

    <Step title={`Set Up ${agentName}`}>
      {children}
    </Step>

    <Step title={`Send a Prompt to ${agentName}`}>
      <p>Open your agent and send a prompt. For example, use the following prompt:</p>

      <Prompt description="Use a FriendliAI model to explore your codebase." icon="robot">
        What can you tell me about this codebase?
      </Prompt>

      <p>To learn more, see <a href={agentPromptUrl}>{agentName} Docs {">"} {agentPromptPageName}</a>.</p>
    </Step>

  </Steps>;

export const AgentIntro = ({agentName, agentMarketingUrl}) => <>
    <p>Set up <a href={agentMarketingUrl}>{agentName}</a> to connect to FriendliAI. Once you complete these steps, your agent will send requests to FriendliAI.</p>

    <p>To get started, complete the following steps:</p>

  </>;

<AgentIntro agentName="Cline" agentMarketingUrl="https://cline.bot" />

<AgentSteps agentName="Cline" agentInstallUrl="https://docs.cline.bot/getting-started/installing-cline" agentPromptPageName="IDE" agentPromptUrl="https://docs.cline.bot/usage/ide">
  <AgentAlternativeTip agentName="Cline" agentAlternativeType="CLI" agentAlternativeUrl="https://docs.cline.bot/usage/cli-overview" agentAlternativeInstallPageName="Authorize" agentAlternativeInstallUrl="https://docs.cline.bot/getting-started/authorizing-with-cline" />

  1. Open Visual Studio Code. Then, open the Cline panel.

  2. In the panel's upper-right corner, click **Settings**.

  3. Connect Cline to FriendliAI's API:
     1. In **API Provider**, select **OpenAI Compatible**.

     2. In **Base URL**, paste the following FriendliAI base URL:

        ```text theme={null}
        https://api.friendli.ai/serverless/v1
        ```

     3. In **OpenAI Compatible API Key**, paste your FriendliAI API key.

     4. In **Model ID**, enter the FriendliAI model ID. For example, enter `zai-org/GLM-5.2`.

     5. Click **Done**.

  To learn more, see [Cline Docs > OpenAI Compatible](https://docs.cline.bot/provider-config/openai-compatible).
</AgentSteps>
