跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.mirobody.ai/llms.txt

Use this file to discover all available pages before exploring further.

Mirobody Platform 不卖 LLM token,LLM 算力由您自带。本页定义 BYOK 协议。
安全承诺
  • 永不持久化 — LLM key 不会写入任何数据库。
  • 永不入日志 — 网关中间件在 ingress 处即从 header 副本中清除 X-LLM-*
  • 请求级隔离 — key 仅在本次请求内存中传递到上游 LLM,请求结束即丢弃。

协议

只有 需要 LLM 的接口 才要求 BYOK;其他接口仍只需 Authorization
POST /api/chat
Authorization:   Bearer <mirobody_access_token>
X-LLM-Provider:  openai | gemini | dashscope | volcengine
X-LLM-Api-Key:   <您在 LLM 厂商的官方 key>
X-LLM-Base-Url:  <可选;自有相对网关>
Content-Type:    application/json

选择 LLM 后端

阿里 DashScope

中国集群首选。一把 key 覆盖 DeepSeek(Flash/Pro)、Kimi、通义

火山引擎

中国集群备选。豆包系列模型

OpenAI

海外集群首选(中国集群不保证)

Google Gemini

海外集群备选

哪些接口需要 BYOK

接口LLM 用途
POST /api/chat对话主流程
POST /api/v1/food/analyze食物图像识别
POST /api/v1/holywell/journal/create日记 AI 处理
POST /api/v1/holywell/journal/reprocess重跑日记 AI
POST /api/v1/holywell/journal/update当请求携带新 text_inputfiles
WS /ws/upload-health-report报告解析 + 摘要
WS /ws/upload-with-llm-analysis一站式 LLM 分析
其余 REST 接口(鉴权、会话、文件管理、健康指标查询、家庭共享等)只需 Authorization

错误码

场景HTTP业务 codemsg
X-LLM-Api-Key 调 AI 接口400-10X-LLM-Api-Key header is required for this endpoint.
上游 LLM 返回 401200 (SSE)-data: {"type":"error","content":"LLM auth failed: ..."}
上游 LLM 网络错误200 (SSE)-data: {"type":"error","content":"LLM upstream error: ..."}