Base URL:https://snowfure.com/api · 共 57 个接口 · 全部示例可直接复制运行
机读版:https://snowfure.com/api/v1/manifest · 速览版:https://snowfure.com/llms.txt
{
"how": "密钥三选一:查询串 ?key=… / 请求头 Authorization: Bearer … / X-API-Key: …",
"kinds": [
{
"kind": "master",
"ident": "owner",
"desc": "主密钥(曾健本人,全权限,可颁发)",
"where": "本机 ~/.hermes/.snowfure_live_key;控制台「接口 · 密钥」页可签发 sk_ 派生密钥"
},
{
"kind": "issued",
"ident": "apikey:<名字>",
"desc": "已颁发的 sk_… 密钥,按 scopes 限权",
"scopes": [
"chat",
"im",
"docs",
"admin"
]
},
{
"kind": "sso",
"ident": "<open_id>",
"desc": "飞书 SSO 令牌(?t=… 换来的会话令牌),只能看自己的数据"
}
],
"self_check": "GET /api/v1/whoami → {\"ok\":true,\"ident\":\"…\",\"name\":\"…\"}"
}{
"endpoint": "POST /api/chat/stream",
"content_type": "text/event-stream",
"frame_format": "每帧一行 `data: <json>`,帧间空行",
"events": [
{
"frame": "{\"snowfure\":{\"conversation_id\":\"…\",\"recall\":{…}}}",
"when": "首帧:会话 id + 本轮召回统计(记忆/本体命中数)"
},
{
"frame": "{\"choices\":[{\"delta\":{\"content\":\"字\"}}]}",
"when": "逐字增量:把 content 依次拼接"
},
{
"frame": "{\"choices\":[{\"finish_reason\":\"stop\"}],\"usage\":{…}}",
"when": "收尾帧(可能带 usage 用量)"
},
{
"frame": "[DONE]",
"when": "流结束,客户端收到即停止读取"
}
],
"tips": [
"用 SSE 客户端逐行读 data:;遇 [DONE] 关闭连接",
"首帧的 conversation_id 存下来,下次带上它就续上下文",
"断线重连不会重复计费:重发同一 conversation_id 即可"
]
}[
{
"http": 401,
"code": "UNAUTHORIZED",
"when": "缺密钥 / 密钥错 / 已吊销"
},
{
"http": 403,
"code": "FORBIDDEN",
"when": "身份没有该范围的数据权限"
},
{
"http": 403,
"code": "DEMO_DENIED",
"when": "演示身份调用了本地数据接口(只放开模型对话与网络数据)"
},
{
"http": 404,
"code": "NOT_FOUND",
"when": "对象不存在(会话/草稿/本体对象…)"
},
{
"http": 400,
"code": "BAD_ACTION",
"when": "action 参数不认识"
},
{
"http": 500,
"code": "SAVE_FAIL / UPLOAD_FAIL / ASR_FAIL / MCP_FAIL / ARTS_FAIL",
"when": "对应模块内部错误,error 字段有原因"
}
]curl -s -X POST 'https://snowfure.com/api/chat/stream?key=$KEY' -H 'Content-Type: application/json' -d '{"model": "glm-5.3", "messages": [{"role": "user", "content": "你好"}], "conversation_id": "", "recall": {"mode": "auto", "layers": ["essence", "summary"]}}'
{
"model": "glm-5.3",
"messages": [
{
"role": "user",
"content": "你好"
}
],
"conversation_id": "",
"recall": {
"mode": "auto",
"layers": [
"essence",
"summary"
]
}
}
SSE 流(帧格式见 manifest.sse)
curl -s -X POST 'https://snowfure.com/api/chat/run?key=$KEY' -H 'Content-Type: application/json' -d '{"model": "glm-5.3", "messages": [{"role": "user", "content": "你好"}]}'
{
"model": "glm-5.3",
"messages": [
{
"role": "user",
"content": "你好"
}
]
}
{"ok":true,"reply":"…"}
curl -s 'https://snowfure.com/api/chat/conversations?key=$KEY&limit=…'
curl -s 'https://snowfure.com/api/chat/conversation?key=$KEY&id=…'
curl -s -X POST 'https://snowfure.com/api/chat/conversations?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s -X POST 'https://snowfure.com/api/chat/rename?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s 'https://snowfure.com/api/chat/conversation?key=$KEY&id=…'
curl -s -X POST 'https://snowfure.com/api/chat/conversations/delete?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s -X POST 'https://snowfure.com/api/chat/insights?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s 'https://snowfure.com/api/chat/insights/result?key=$KEY&job_id=…'
curl -s 'https://snowfure.com/api/chat/conversations/trash?key=$KEY'
curl -s -X POST 'https://snowfure.com/api/chat/conversations/restore?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s -X POST 'https://snowfure.com/api/chat/conversations/purge?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s -X POST 'https://snowfure.com/api/chat/tasks?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s -X POST 'https://snowfure.com/api/chat/tasks?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s 'https://snowfure.com/api/chat/task/runs?key=$KEY&limit=…'
curl -s 'https://snowfure.com/api/chat/arts?key=$KEY'
curl -s 'https://snowfure.com/api/chat/agents?key=$KEY'
curl -s 'https://snowfure.com/api/chat/sop?key=$KEY'
curl -s 'https://snowfure.com/api/chat/onto/schema?key=$KEY&scope=…'
curl -s 'https://snowfure.com/api/chat/onto/graph?key=$KEY&type=…'
curl -s 'https://snowfure.com/api/chat/onto/object?key=$KEY&uri=…'
curl -s 'https://snowfure.com/api/chat/onto?key=$KEY&scope=…'
curl -s -X POST 'https://snowfure.com/api/chat/onto/query?key=$KEY' -H 'Content-Type: application/json' -d '{"sparql": "SELECT ?s ?p ?o WHERE {?s ?p ?o} LIMIT 5"}'
{
"sparql": "SELECT ?s ?p ?o WHERE {?s ?p ?o} LIMIT 5"
}
{"ok":true,"rows":[…]}"
curl -s -X POST 'https://snowfure.com/api/chat/onto/plan?key=$KEY' -H 'Content-Type: application/json' -d '{"intent": "重启微信上传网关"}'
{
"intent": "重启微信上传网关"
}
{"ok":true,"facts":[…],"steps":[…]}
curl -s -X POST 'https://snowfure.com/api/chat/onto/run?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s 'https://snowfure.com/api/chat/sop?key=$KEY'
curl -s -X POST 'https://snowfure.com/api/chat/sop?key=$KEY' -H 'Content-Type: application/json' -d '{"action": "save", "id": "s…", "name": "流程名", "text": "第一步:… | 参与:… | 交付:… | 验收:总督"}'
{
"action": "save",
"id": "s…",
"name": "流程名",
"text": "第一步:… | 参与:… | 交付:… | 验收:总督"
}
{"ok":true}
curl -s -X POST 'https://snowfure.com/api/chat/sop/ai?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s 'https://snowfure.com/api/chat/drafts?key=$KEY&q=…'
curl -s 'https://snowfure.com/api/chat/draft?key=$KEY&id=…'
curl -s -X POST 'https://snowfure.com/api/chat/upload?key=$KEY' -H 'Content-Type: application/json' -d '{"name": "a.png", "data": "<base64>", "mime": "image/png"}'
{
"name": "a.png",
"data": "<base64>",
"mime": "image/png"
}
{"ok":true,"kind":"image","url":"…"}
curl -s -X POST 'https://snowfure.com/api/chat/asr?key=$KEY' -H 'Content-Type: application/json' -d '{"data": "<base64 音频>", "mime": "audio/wav"}'
{
"data": "<base64 音频>",
"mime": "audio/wav"
}
{"ok":true,"text":"…"}
curl -s 'https://snowfure.com/api/im/convos?key=$KEY&kind(固定=…'
curl -s -X POST 'https://snowfure.com/api/im/convo/done?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s -X POST 'https://snowfure.com/api/im/convo/done?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s 'https://snowfure.com/api/im/messages?key=$KEY&conv=…'
curl -s -X POST 'https://snowfure.com/api/im/send?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s -X POST 'https://snowfure.com/api/im/convo/rename?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s -X POST 'https://snowfure.com/api/im/convo/delete?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s 'https://snowfure.com/api/im/convos?key=$KEY'
curl -s -X POST 'https://snowfure.com/api/im/send?key=$KEY' -H 'Content-Type: application/json' -d '{"conv": "<会话 id>", "text": "你好"}'
{
"conv": "<会话 id>",
"text": "你好"
}
{"ok":true,"seq":123}
curl -s 'https://snowfure.com/api/im/people?key=$KEY'
curl -s 'https://snowfure.com/api/im/contacts?key=$KEY'
curl -s 'https://snowfure.com/api/im/plugins?key=$KEY'
curl -s -X POST 'https://snowfure.com/api/im/plugins/test?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s -X POST 'https://snowfure.com/api/im/ws/endpoint?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s 'https://snowfure.com/api/im/ws/status?key=$KEY'
curl -s 'https://snowfure.com/api/kb/web_search?key=$KEY&q=…'
curl -s -X POST 'https://snowfure.com/api/kb/import_url?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s -X POST 'https://snowfure.com/api/kb/web_pipeline?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s 'https://snowfure.com/api/kb/search?key=$KEY&q=…'
curl -s 'https://snowfure.com/api/kb/docs?key=$KEY'
curl -s 'https://snowfure.com/api/v1/apps?key=$KEY'
curl -s -X POST 'https://snowfure.com/api/v1/apps?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s -X POST 'https://snowfure.com/api/v1/auth/app_access_token/internal?key=$KEY' -H 'Content-Type: application/json' -d '{}'
curl -s 'https://snowfure.com/api/v1/keys?key=$KEY'