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

# Dify 配置指南

> 在 Dify 中配置 OpenAI 兼容模型供应商，接入 YeLin AI。

<Info>
  Dify 支持 OpenAI 兼容供应商。
  你把 base URL 指向 `https://api.yelinai.com/v1` 即可。
</Info>

## 你先准备什么

1. 你在 **Console** 创建 **API key**。
2. 你有一个可用的 Dify 实例。

## 配置步骤

1. 打开 Dify 的 **Settings**。
2. 进入 **Model provider**（或 **LLM**）配置。
3. 选择 **OpenAI-compatible**。
4. 填入以下参数。

| 字段       | 你要填什么                        |
| -------- | ---------------------------- |
| Base URL | `https://api.yelinai.com/v1` |
| API key  | 你在 **Console** 复制的 key       |
| Model    | 例如 `gpt-4o-mini`             |

## 验证

你创建一个最小应用。
你发一条消息能收到回复就说明成功。

<CardGroup cols={2}>
  <Card title="为什么还有余额却调用失败？" icon="wallet" href="/faq/balance-insufficient">
    了解预扣费与输入过长。
  </Card>

  <Card title="调用记录" icon="history" href="/faq/call-logs">
    用日志定位失败请求。
  </Card>
</CardGroup>
