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.

This endpoint requires LLM credentials. Pass X-LLM-Provider and X-LLM-Api-Key. See BYOK.

Endpoint

POST /api/v1/food/analyze
Authorization:   Bearer <access_token>
X-LLM-Provider:  dashscope | volcengine | openai | gemini
X-LLM-Api-Key:   <your LLM key>
X-Language:      zh-CN
Content-Type:    multipart/form-data
Form fields:
  • file=@/path/food.jpg (required, PNG / JPEG / WEBP / HEIC / HEIF)
  • query=Maintain healthy diet (optional — inject user’s health goal)

SSE events

typeMeaning
idfood_analysis_<ts>_<uid>
thinkingPhase prompts (“Analyzing image…”)
foodcontent is a stringified JSON containing is_food (1 = success / 0 = not food), food_items, nutrition, advice
errore.g. Recognition failed!
endEnd
food.content is a string — the client must JSON.parse it.