> ## 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 OpenClaw with FriendliAI

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

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="OpenClaw" agentMarketingUrl="https://openclaw.ai" />

<AgentSteps agentName="OpenClaw" agentInstallUrl="https://docs.openclaw.ai/install" agentPromptPageName="Getting started" agentPromptUrl="https://docs.openclaw.ai/start/getting-started">
  1. In your terminal, run the following command:

     ```sh theme={null}
     openclaw onboard --install-daemon
     ```

     OpenClaw opens.

  2. Review the security disclaimer. If you understand it, continue.

  3. In **Setup mode**, select **Quickstart**.

  4. In **Model/auth provider**, select **More...**. Then, select **Custom Provider**.

  5. Connect OpenClaw to FriendliAI's API:
     1. In **API Base URL**, paste the following FriendliAI base URL:

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

     2. When asked **How do you want to provide this API Key?**, select **Paste API Key now**. Then, paste your FriendliAI API key.

     3. In **Endpoint compatibility**, select **OpenAI-compatible**.

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

     5. *(Optional)* In **Endpoint ID**, enter "FriendliAI".

     6. In **Model alias**, press <kbd>Enter</kbd>.

     7. When asked **Does this model support image input?**, select **Yes** or **No**.

  6. Follow the onscreen instructions.

  To learn more, see [OpenClaw Docs > Onboarding (CLI)](https://docs.openclaw.ai/start/wizard).
</AgentSteps>
