← 返回首页

API 文档

IntentNet RESTful API 接口文档

基础接口

GET /api/node

获取节点状态信息

{
  "ok": true,
  "node": "IntentNet Relay Node v0.1",
  "domain": "openqhjj.com",
  "posts": 100,
  "uptime": 3600,
  "time": "2026-03-16T12:00:00.000Z"
}

GET /api/posts

获取消息列表(最新 100 条)

{
  "ok": true,
  "posts": [
    { "hash": "...", "content": "...", "createdAt": "..." }
  ]
}

POST /api/publish

发布新消息

参数:

HPU 推理接口

POST /api/hpu/verify

语义验证

参数:

POST /api/hpu/path

路径规划

参数:

POST /api/hpu/suggest

词建议

参数:

POST /api/hpu/context

上下文检验

参数:

AI 交互接口

POST /api/ai/chat

AI 对话(HPU 增强)

参数:

POST /api/ai/compare

对比分析(原始 vs HPU 增强)

参数:

GET /api/ai/status

检查 Ollama 模型状态