跳转到主要内容

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.

此接口需要 LLM 凭证。 调用时需携带 X-LLM-ProviderX-LLM-Api-Key,详见 BYOK 协议

端点

POST /api/v1/food/analyze
Authorization:   Bearer <access_token>
X-LLM-Provider:  dashscope | volcengine | openai | gemini
X-LLM-Api-Key:   <您的 LLM Key>
X-Language:      zh-CN
Content-Type:    multipart/form-data
表单字段:
  • file=@/path/food.jpg(必填,PNG / JPEG / WEBP / HEIC / HEIF)
  • query=减脂(可选,注入用户健康目标)

SSE 事件

type含义
idfood_analysis_<ts>_<uid>
thinking阶段提示文字(“正在分析…”)
foodcontent字符串化 JSON,含 is_food(1 成功 / 0 失败)、food_itemsnutritionadvice
error例:Recognition failed!
end结束
food.content 是字符串,前端需 JSON.parse 一次。