Skip to main content

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 does not sell LLM tokens — you bring your own. This page defines the BYOK protocol.
Security guarantees
  • Never persisted — LLM keys are not written to any database.
  • Never logged — middleware scrubs X-LLM-* from log copies at ingress.
  • Per-request isolation — keys live only in-memory for the current request, then discarded.

Protocol

Only the LLM-dependent endpoints require BYOK; everything else needs only Authorization.
POST /api/chat
Authorization:   Bearer <mirobody_access_token>
X-LLM-Provider:  openai | gemini | dashscope | volcengine
X-LLM-Api-Key:   <your official key at the LLM provider>
X-LLM-Base-Url:  <optional; your own relay endpoint>
Content-Type:    application/json

Pick a backend

Aliyun DashScope

China cluster first choice. One key covers DeepSeek (Flash/Pro), Kimi, Qwen.

Volcengine

China cluster alternative. Doubao models.

OpenAI

Global cluster default (no SLA on the China cluster).

Google Gemini

Global cluster alternative.

Which endpoints need BYOK

EndpointLLM use
POST /api/chatMain chat
POST /api/v1/food/analyzeFood image recognition
POST /api/v1/holywell/journal/createJournal AI processing
POST /api/v1/holywell/journal/reprocessRe-run journal AI
POST /api/v1/holywell/journal/updateOnly when the body carries new text_input or files
WS /ws/upload-health-reportReport parsing + summary
WS /ws/upload-with-llm-analysisEnd-to-end LLM analysis
All other REST endpoints (auth, sessions, file management, health indicators, family sharing, etc.) need only Authorization.

Errors

ScenarioHTTPcodemsg
Missing X-LLM-Api-Key on an AI endpoint400-10X-LLM-Api-Key header is required for this endpoint.
Upstream LLM returns 401200 (SSE)-data: {"type":"error","content":"LLM auth failed: ..."}
Upstream LLM network error200 (SSE)-data: {"type":"error","content":"LLM upstream error: ..."}