基于 Dify v1.14.2,集成多种 AI 模型能力,提供可视化工作流编排、RAG 知识库、Agent 智能体、语音交互等强大功能。
通过 DMXAPI (OpenAI 兼容接口) 统一代理,免去多平台密钥管理的烦恼。
Dify 提供完整的 RESTful API,以下是一些常用场景示例:
curl -X POST 'https://foxin.cc/dify/api/chat-messages' \
-H 'Authorization: Bearer {app_api_key}' \
-H 'Content-Type: application/json' \
-d '{
"inputs": {},
"query": "你好,介绍一下你自己",
"response_mode": "streaming",
"user": "user-123"
}'
curl -X POST 'https://foxin.cc/dify/api/tts' \
-H 'Authorization: Bearer {app_api_key}' \
-H 'Content-Type: application/json' \
-d '{
"message_id": "msg_id",
"text": "欢迎使用佛心网络 Dify AI 平台",
"voice": "alloy"
}'
curl -X POST 'https://foxin.cc/dify/api/workflows/run' \
-H 'Authorization: Bearer {app_api_key}' \
-H 'Content-Type: application/json' \
-d '{
"inputs": {
"prompt": "一只可爱的橘猫在阳光下睡觉"
},
"response_mode": "blocking",
"user": "user-123"
}'
💡 完整 API 文档请参考 Dify API Reference 。创建应用后可在应用设置中获取 API 密钥。
Dify 是一款开源的 LLM 应用开发平台,提供从 Agent 构建到 AI Workflow 编排、RAG 检索、模型管理等能力。目前已接入数千个应用的 LLMs。