Skip to main content
Before copying a curl example, choose your Cloud region. For authenticated calls, it must be the same region as your key. The examples below use MIROBODY_API_BASE:
For SDK examples with a literal Global URL, use the matching China URL when your account is in China. See Regions. Health data arrives messy — “血糖(空腹)”, “FBG”, “Glucose, fasting” all name the same indicator, and the units vary just as much. Mirobody standardizes every structured reading written through POST /v1/data or stored by POST /v1/standardize, so the agent and your queries see one coherent, coded dataset. POST /v1/files is a separate storage and text-extraction surface; uploading a file standardizes its report values into structured readings automatically. /v1/standardize is the explicit path for that same extraction — use it to inspect the result (dry-run), or to standardize text / file_key sources on demand.

The pipeline

Both a document and a structured record enter the same pipeline:
1

Read the source

PDF / image → text (OCR); Excel → rows.
2

Pull out readings

Find each {indicator, value, unit, date}. Documents only — a /v1/data record is already structured and skips straight to coding.
3

Code the indicator

Match the name to a LOINC code. With no confident match, loinc_code stays null — never a wrong code.
4

Normalize the unit

Fold the unit spelling to one UCUM form and parse the value to a number: "mg/dl" → mg/dL.
5

Store as one series

One row per reading on the Subject’s timeline, queryable by indicator, code and date.
The important part is step 3: codes are matched, never invented. A model is great at reading a document but shouldn’t be trusted to recite a code system — a wrong LOINC code is worse than none. So when the match isn’t confident, Mirobody keeps the raw name and leaves loinc_code null rather than guess. When self-hosting, the engine runs the same stages on your own infrastructure. How a reading passes through them, from the device connection to the answer, is described in The Pipeline.

Before / after

What you send to /v1/data (or what /v1/standardize reads from a report) vs. what the structured store holds: Three spellings of the same test become one series — trend queries, the agent’s data tools, and your own analytics all see it as one indicator.

Standardized output in the API

Cookbook: one call, report → structured data

See Standardize a report for the full row shape (indicator_raw, loinc_code, confidence, …).

See also