Source: https://ailoot.ai/docs/zh-hant-tw/integrations/dify/
Canonical: https://ailoot.ai/docs/zh-hant-tw/integrations/dify/
Language: zh-hant-tw

[自動化](https://ailoot.ai/docs/zh-hant-tw/integrations/#automation) 

# Dify

[Markdown](https://ailoot.ai/docs/zh-hant-tw/integrations/dify/index.md)

LLM 應用程式平台 · OpenAI Chat

| 格式 | 設定位置 |
| --- | --- |
| OpenAI Chat | Integrations → Model Provider → 安裝 OpenAI-API-compatible 外掛 → Add Model (欄位：Model Type、Model Name、API Key、API Base URL、Completion mode、Model context size) |

## [](https://ailoot.ai/docs/zh-hant-tw/integrations/dify/#setup)設定

複製設定，並將`sk-...`替換為您的 Ailoot 控制台金鑰。若應用程式支援，最好將金鑰存放在環境變數`AILOOT_API_KEY`中。

執行前，請使用 Ailoot 金鑰呼叫 GET /v1/models。選擇支援方法包含 POST /v1/chat/completions 的確切模型 ID，並填入設定。使用代理程式時，也請確認工具支援及客戶端版本所需的功能。

```text
Model Type: LLM
Model Name: claude-sonnet-5-5
API Key: sk-...
API Base URL: https://api.ailoot.ai/v1
Completion mode: Chat
Model context size: 依 Ailoot 型錄中的模型卡片設定

用於 Text Embedding：
Model Name: nemotron-3-embed
API Base URL: https://api.ailoot.ai
```

模型範例：`claude-sonnet-5-5, gpt-6.1-sol, qwen3.8-max; nemotron-3-embed (嵌入向量)`。若要使用其他模型，請從此處選取：[目錄](https://ailoot.ai/models/zh-hant-tw/) —請確認模型支援所需格式。

## [](https://ailoot.ai/docs/zh-hant-tw/integrations/dify/#notes)重要須知

只有工作區擁有者與管理員能管理提供者。依外掛 README，LLM 的位址包含 /v1；嵌入向量、rerank、STT與TTS 的 API 版本由外掛自行補上，因此位址不含 /v1，否則會產生 /v1/v1。請將每個 Ailoot 模型分別新增為獨立項目，並在模型設定中啟用影像輸入與串流輸出。

## [](https://ailoot.ai/docs/zh-hant-tw/integrations/dify/#check)驗證

- LLM 和 Text Embedding 請分別使用上述對應範例中的 API Base URL 值。OpenAI 方法的路徑前綴為`https://api.ailoot.ai/v1` (若應用程式要求完整位址，則使用完整路徑)。
- 提出一個簡短問題。若收到錯誤，請查看代碼與Request ID，並對照此頁面：[錯誤與限制](https://ailoot.ai/docs/zh-hant-tw/errors/)。
- 剛完成設定就遇到 404，幾乎總是位址不正確，可能多加或漏加了`/v1`。
- 402 表示餘額不足以涵蓋保留金額。代理需要保留的金額比聊天更多：[原因](https://ailoot.ai/docs/zh-hant-tw/billing/reserve/)。

應用程式說明文件：[https://github.com/langgenius/dify-official-plugins/tree/main/models/openai\_api\_compatible](https://github.com/langgenius/dify-official-plugins/tree/main/models/openai_api_compatible)

還有疑問嗎？請提供 Request ID與問題描述，我們會協助釐清。[聯絡支援](mailto:support@ailoot.ai)

## Ailoot · 公司及其專案組合





Ailoot以累積的營運經驗、廣大的客戶群、穩定的服務及持續的KPI管理為基礎。





公司及其專案組合：數百萬客戶，每月銷售額達數十億。





Ailoot將這些營運經驗用於API存取，讓客戶的產品、代理、應用程式及自動化流程使用AI功能。
