> ## 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.

# Build health agents on standardized health data

> Store source data, standardize health readings, and put AI to work on them.

**Mirobody API** turns messy health data into **standardized, AI-ready records** — and gives you two OpenAI-compatible surfaces to put agents to work on them. It's the managed layer over the [open-source Mirobody engine](/en/welcome): we host storage, models, and keys; you point an OpenAI SDK at the base URL with an `mb_live_*` key.

## The loop: upload → standardize → use with AI

<Steps>
  <Step title="Send the right data shape">
    Structured readings go to [`POST /v1/data`](/en/api-reference/data). [`POST /v1/files`](/en/api-reference/files) stores lab PDFs, photos, and spreadsheets and extracts their text. Use [`POST /v1/standardize`](/en/api-reference/extract) to turn a report into standardized readings.
  </Step>

  <Step title="Every structured reading is standardized">
    Names resolve to **LOINC** deterministically (no LLM code-guessing), values normalize to **UCUM** units, every reading gets a **FHIR** mirror. `"血糖(空腹)"`, `"FBG"` and `"Glucose, fasting"` become one series. See [Standardization](/en/api-reference/standardization).
  </Step>

  <Step title="Put AI on top">
    Ask the [Answers API](/en/api-reference/chat) for a grounded, evidence-cited answer — or build a full agent on the [Agent API](/en/api-reference/responses) with your own tools, stored conversations, and the openai-agents SDK working out of the box.
  </Step>
</Steps>

## Four shapes of data, one door each

Health data arrives in four shapes — each has exactly one door in:

| Data shape                    | Typical source                                                                       | How it goes in         | Endpoint                                                                                                                                                                                                              |
| ----------------------------- | ------------------------------------------------------------------------------------ | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Structured readings**       | Devices / wearables (**you integrate them**, write daily aggregates), manual entries | Structured records     | [`POST /v1/data`](/en/api-reference/data) — pre-aggregate high-frequency samples; episodes (sleep, workouts) carry `time` + `end_time`. See the [device-data cookbook](/en/api-reference/device-data).                |
| **Files / photos**            | Lab reports, checkup PDFs, phone photos                                              | File upload            | [`POST /v1/files`](/en/api-reference/files) — stores the original and extracts text; pass the `file_key` to [`POST /v1/standardize`](/en/api-reference/extract) to create structured readings                         |
| **Narrative with readings**   | "headache all day, temperature was 38.2 °C", dictated notes                          | Narrative text         | [`POST /v1/standardize`](/en/api-reference/extract) — the quantifiable readings are extracted; the narrative around them is dropped                                                                                   |
| **Purely subjective journal** | "dizzy and a headache all afternoon", mood notes                                     | Single-turn agent call | [`POST /v1/responses`](/en/api-reference/responses) with `store: true` — background consolidation extracts indicators + durable memories. See the [Journaling recipe](/en/api-reference/state-and-memory#journaling). |

Mirobody stores source data, standardizes structured readings, and makes both available to AI. You decide how data is collected and prepared before it reaches the API.

## Two API surfaces, one engine

<CardGroup cols={2}>
  <Card title="Agent API — recommended" icon="robot" href="/en/api-reference/responses">
    `POST /v1/responses` (OpenAI Responses-compatible). Your function tools, `previous_response_id` / `session_id` state, `response.*` streaming. The openai-agents SDK works by changing only the base URL.
  </Card>

  <Card title="Answers API" icon="comment-dots" href="/en/api-reference/chat">
    `POST /v1/chat/completions`. A closed grounded completion — one question, one evidence-backed answer. Drop-in for any OpenAI SDK, and ideal as [a tool inside your own agent](/en/api-reference/use-as-a-tool).
  </Card>
</CardGroup>

Not sure? [Choose your API](/en/api-reference/choose-your-api) in one minute.

## Why Mirobody

* **Grounded, not plausible** — answers can include `health_records`, `citations`, and the server tool steps used to gather evidence.
* **Standardized structured data** — LOINC + UCUM + FHIR on records written through `/v1/data` or stored by `/v1/standardize`; your analytics and the agent read the same series.
* **OpenAI-compatible twice over** — Chat Completions *and* Responses protocols; existing SDKs and agent frameworks just work.
* **Multi-tenant by design** — one key, an isolated Subject per end-user; per-Subject [right-to-be-forgotten deletes](/en/api-reference/overview#endpoints-at-a-glance).
* **Open at the core** — the same engine is [open source](/en/welcome); self-host it whenever you want.

## Two ways to run Mirobody

* **Hosted API** (this platform) — an `mb_live_*` key against our managed clusters; storage, models, and keys are run for you. Start with the [Quickstart](/en/api-reference/quickstart).
* **Open source** — `git clone` the [Mirobody engine](/en/welcome), build it with `./build.sh`, and run it yourself.

## Start here

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/en/api-reference/quickstart">
    Key → data → standardized records → your first agent, in minutes.
  </Card>

  <Card title="Choose your API" icon="signs-post" href="/en/api-reference/choose-your-api">
    Answers vs Agent — the one-minute decision.
  </Card>

  <Card title="API Overview" icon="code" href="/en/api-reference/overview">
    Auth, multi-tenancy, retention, errors, every endpoint.
  </Card>

  <Card title="Regions" icon="location-dot" href="/en/api-reference/regions/overview">
    Which cluster to use and what's live today.
  </Card>
</CardGroup>
