开发者中心
API 参考文档 · 代码示例 · 快速集成指南
API 端点参考
对话 & Agent
6 端点POST
/api/chat/sendGET
/api/chat/agentsGET
/api/chat/agents/:idPOST
/api/chat/agentsPATCH
/api/chat/agents/:idDELETE
/api/chat/agents/:id知识库 & RAG
5 端点GET
/api/knowledge-basePOST
/api/knowledge-baseDELETE
/api/knowledge-base/:idPOST
/api/knowledge-base/:id/documentsGET
/api/knowledge-base/:id/search工作流 & 定时任务
6 端点GET
/api/workflowPOST
/api/workflowPATCH
/api/workflow/:idDELETE
/api/workflow/:idGET
/api/schedulePOST
/api/schedule用户 & 认证
4 端点GET
/api/users/meGET
/api/users/usageGET
/api/users/quotaPOST
/api/auth/refresh模型 & API 密钥
5 端点GET
/api/models/listGET
/api/models/availabilityGET
/api/api-keysPOST
/api/api-keysDELETE
/api/api-keys/:id沙箱 & 运行监控
4 端点POST
/api/agent-runtime/runs/code-execGET
/api/agent-runtime/runsPOST
/api/agent-runtime/runs/:id/approvePOST
/api/agent-runtime/runs/:id/reject代码示例
# 发送对话消息
curl -X POST https://zhiflow.com/api/chat/send \
-H "Content-Type: application/json" \
-H "Cookie: zhiflow_token=YOUR_TOKEN" \
-d '{
"message": "你好,请介绍一下自己",
"model": "deepseek-chat"
}'
# 获取知识库列表
curl https://zhiflow.com/api/knowledge-base \
-H "Cookie: zhiflow_token=YOUR_TOKEN"
# 执行 JavaScript 代码
curl -X POST https://zhiflow.com/api/agent-runtime/runs/code-exec \
-H "Content-Type: application/json" \
-H "Cookie: zhiflow_token=YOUR_TOKEN" \
-d '{
"language": "javascript",
"code": "console.log(2 + 2)",
"timeoutMs": 5000
}'集成指南
免费额度
新用户注册即获赠算力额度,无需绑定支付方式即可体验全部功能。
API 状态
所有 API 服务运行正常 · 平均响应时间 <2s · 99.9% 可用性