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

# Integrate Dify

<img src="https://mintlify.s3.us-west-1.amazonaws.com/liaobots/images/dify/dify-icon.jpg" alt="Dify" />

Open [Dify](https://dify.ai)

## Preparation

> `Model Name`：Find the model name you need to call in [Models & Pricing](/Aggregation/Model-Price.mdx) and copy it
>
> `API Key`：Your Login Code
>
> `API endpoint URL`：[https://ai.liaobots.work/v1](https://ai.liaobots.work/v1)

## Process

<Steps>
  <Step title="Step 1">
    <Card title="Click Settings" img="https://mintcdn.com/liaobots/pAzQwH2vlz1d7UuQ/images/API/dify/step-1.jpg?fit=max&auto=format&n=pAzQwH2vlz1d7UuQ&q=85&s=c667f718532f9f7dfacb2d2a8de4b71e" width="3020" height="1458" data-path="images/API/dify/step-1.jpg" />
  </Step>

  <Step title="Step 2">
    <Card title="Change Custom Model Provider to OpenAI Compatible" img="https://mintcdn.com/liaobots/pAzQwH2vlz1d7UuQ/images/API/dify/step-2.jpg?fit=max&auto=format&n=pAzQwH2vlz1d7UuQ&q=85&s=b8580af3fafa4600bd08c9074017c4d4" width="3020" height="1458" data-path="images/API/dify/step-2.jpg">
      Click `Model Provider` and select `OpenAl-API-compatible`, then click `Add Model`
    </Card>
  </Step>

  <Step title="Step 3">
    <Card title="Change Key Settings" img="https://mintcdn.com/liaobots/pAzQwH2vlz1d7UuQ/images/API/dify/step-3.jpg?fit=max&auto=format&n=pAzQwH2vlz1d7UuQ&q=85&s=cb6655fab3b853c88097ceee17545d00" width="1282" height="1232" data-path="images/API/dify/step-3.jpg">
      Fill in `Model Name`, `API Key`, `API endpoint URL`, then click `Save`
    </Card>
  </Step>

  <Step title="Step 4">
    <Card title="Create Chat Assistant" img="https://mintcdn.com/liaobots/pAzQwH2vlz1d7UuQ/images/API/dify/step-4.jpg?fit=max&auto=format&n=pAzQwH2vlz1d7UuQ&q=85&s=9109be738f2fe7cf4e46d2b6c3640c72" width="3020" height="1460" data-path="images/API/dify/step-4.jpg">
      Create any chat assistant, and you can see the newly added model in the top right corner
    </Card>
  </Step>

  <Step title="Step 5">
    <Card title="Test Connection" img="https://mintcdn.com/liaobots/pAzQwH2vlz1d7UuQ/images/API/dify/step-5.jpg?fit=max&auto=format&n=pAzQwH2vlz1d7UuQ&q=85&s=1d59923485b39d63ed785be04a872028" width="3020" height="1456" data-path="images/API/dify/step-5.jpg">
      Send a test message and successfully see the reply
    </Card>
  </Step>
</Steps>
