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.
POST /v1/extract is a deprecated alias for this endpoint and still works — same request, same response.
Document in, standardized indicators out. /v1/standardize reads a lab report or health document and returns every reading it found, each matched to a LOINC code and normalized to a UCUM unit (the mechanism is in How standardization works). The call is synchronous — one request, readings back — so a full multi-page document can take several seconds; size your client timeout accordingly. By default it is a dry-run (store=false): you get the standardization result and nothing is persisted — zero side effects. Set store=true (with a retention) to also write those readings into the Subject’s store as records, through the same pipeline as POST /v1/data.
store=true is not idempotent — repeating the same call can write duplicate records. Inspect a document with the default dry-run first, and don’t blindly retry after a timeout.

Request

Two input shapes:
  • multipart/form-data — a file (PDF / image / Excel / plain text; images and PDFs are OCR’d) plus the fields below as form fields.
  • application/json — {"text": "..."} (raw report text) or {"file_key": "..."} (a file already uploaded via /v1/files).
The user field is the tenant-isolation key. The backend maps (your account, user) to an internal Subject, and Subjects are fully isolated from one another — pass each end-user’s stable id and no user ever sees another’s data. Omit it and the call falls back to your account’s default Subject. Subjects are invisible to the Mirobody web app and to other developers.The value is normalized (trimmed + lowercased) before mapping, so Alice and alice resolve to the same Subject. Pass a stable, canonical id.

Dry-run (default)

Standardize and store

Response

Narrative text with no readings

/v1/standardize returns quantifiable readings. Purely narrative text — “dizzy and a headache all afternoon” — is a documented boundary, not an error: the call succeeds (200) with an empty data array and a note:
Mixed text does what you’d expect — “headache all day, temperature was 38.2 °C” yields the temperature reading and drops the narrative. Purely subjective entries (journaling) use the Agent API — no dedicated endpoint. Send each entry as a single-turn POST /v1/responses with store: true, a unique session_id such as journal-{entry_id}, builtin_tools: "none", and short-acknowledgement instructions. Mirobody then pulls any quantifiable readings and durable memories out of the stored entry automatically. With one response per session_id, deleting that response also retracts the memories it produced; readings already written to the data plane stay until you delete them through /v1/data. See Journaling for the exact lifecycle.

Errors

Every failure is explicit — there is no silent partial success.

See also