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.

Upload completes quickly. The returned file_url is a signed URL valid for ~2 hours.

Endpoint

POST /files/upload
Authorization: Bearer <access_token>
Content-Type: multipart/form-data
Form fields:
  • files=@/path/file (repeat for multiple files in one request)
  • Query optional ?folder=<prefix>, default uploads

Response

{
  "code": 0, "msg": "All 1 files uploaded successfully",
  "data": [
    {
      "file_url":    "<signed CDN URL returned by /files/upload>",
      "file_name":   "report.pdf",
      "file_key":    "uploads/20260522_xxx.pdf",
      "file_size":   102400,
      "file_type":   "application/pdf",
      "upload_time": "2026-05-22T06:23:12",
      "duration":    0
    }
  ]
}

Use in chat

Feed the data array directly into /api/chat’s file_list — all five fields are already populated. See POST /api/chat.

Supported file types

PDF / PNG / JPEG / WEBP / HEIC / HEIF / PPTX / DOCX / TXT / WAV / MP3 and more.
  • Recommend ≤ 10 MB per file. Larger files should go through WebSocket / Health Report Upload.
  • Food image recognition only supports PNG / JPEG / WEBP / HEIC / HEIF.

holywell-flavored upload

POST /api/v1/holywell/file-upload/upload
Same request / response shape as above, but additionally registers the file in th_files and triggers parsing (indicator extraction, summary generation). Use this when the file is part of a health business flow (lab report, exam result).