| 项目 | 说明 |
|---|---|
| Dify 账号 | Cloud 版或自部署版本均可 |
| code0.ai API Key | 在 code0.ai 控制台 获取 |
| API Base URL | https://hk.code0.ai/v1 |
| 模型 ID | 如 claude-sonnet-4-6、claude-opus-4-7 |

http://你的服务器IP/installhttp://localhost/install推荐最低配置:CPU ≥ 2 核,内存 ≥ 4 GiB。
右上角头像 → Settings → Model ProvidersOpenAI-API-compatible| 配置项 | 填写内容 |
|---|---|
| Model Type | LLM |
| Model Name | claude-sonnet-4-6 |
| API Key | 你的 code0.ai API Key |
| API Endpoint URL | https://hk.code0.ai/v1 |
| Completion mode | Chat |
| Stream | 建议开启 |
claude-sonnet-4-6
claude-opus-4-7
claude-haiku-4-5-20251001Claude Sonnet
Claude 4.6
sonnet-4你好,请用一句话介绍一下你自己。Create App → Chatbot / Agent / Workflow
claude-sonnet-4-6| 场景 | Temperature | Max Tokens |
|---|---|---|
| 普通聊天机器人 | 0.7 | 4096 |
| 知识库 RAG 问答 | 0.2 – 0.5 | 4096 |
| 代码生成 | 0.2 – 0.4 | 8192 |
| 长文档分析 | 0.2 – 0.4 | 8192 |
claude-sonnet-4-6Claude Sonnet
sonnet-4
Claude 4.6https://hk.code0.aihttps://hk.code0.ai/v1/v1。marketplace.dify.ai
github.com| 项目 | 内容 |
|---|---|
| Provider | OpenAI-API-compatible |
| API Endpoint URL | https://hk.code0.ai/v1 |
| API Key | code0.ai 控制台获取 |
| 推荐模型 | claude-sonnet-4-6 / claude-opus-4-7 |
| Completion mode | Chat |
| Stream | 建议开启 |
| Dify Cloud | dify.ai |
| Dify GitHub | github.com/langgenius/dify |
| Dify 插件市场 | marketplace.dify.ai |
| code0.ai | code0.ai |
准备 code0.ai API Key
安装 OpenAI-API-compatible 插件
填写 API Endpoint URL 和模型 ID
在 Dify 应用中选择 Claude 模型