Skip to content

Response schema

All successful responses from POST /api/v1/biom/process and GET /api/v1/biom/retrieve return a StandardAPIResponse object with four top-level fields.

Creating JSON for BiomDIRECT? Follow JSON input / BiomDIRECT for the upload requirements. This page describes the completed output: fields such as metadata are always present in the response but need not be provided in your input.

Other endpoints use their own response formats, documented in the REST API reference.

Start with the complete synthetic response, or explore the API in Swagger UI.


StandardAPIResponse
├── data: BiometryReport (always present)
├── extra_data: ExtraReport | null (optional notes, posterior or total keratometry)
├── metadata: ResponseMetadata (always present)
└── biompin: BiomPINInfo | null (present when a share was created)

Core biometry data. Always present.

Field Type Required Values
device_name enum Yes See Device names
manufacturer enum Yes See Manufacturers

Optional ISO 8601 date (YYYY-MM-DD) for when the biometry examination was performed. This is report-level information and is separate from data.patient.date_of_birth. It is null when no exam date is available.

All patient fields are optional — they may be null if not present in the source file.

Field Type Description
name string | null Automatically converted to all-caps initials for privacy (e.g., "John Douglas Doe" → "JDD")
id string | null Patient ID or medical record number
date_of_birth date (ISO 8601) | null e.g., "1965-03-15"
gender enum | null "Male" or "Female"

data.right_eye / data.left_eye — BiometricData

Section titled “data.right_eye / data.left_eye — BiometricData”

Both eye objects are required, but their measurement fields are optional. Use an empty object for an eye with no provided data. The response fills its fields with null. A missing measurement is not zero or a normal finding. Validation ranges describe accepted input, not clinical reference ranges.

Field Unit Valid range Description
AL mm 14 – 40 Axial length
ACD mm 1 – 6 Anterior chamber depth
K1_magnitude D 20 – 99 Flat keratometry power
K1_axis ° 0 – 180 (integer) K1 axis
K2_magnitude D 20 – 99 Steep keratometry power
K2_axis ° 0 – 180 (integer) K2 axis
WTW mm 7 – 17 White-to-white corneal diameter
LT mm 0.1 – 7 Crystalline lens thickness
CCT µm 200 – 900 (integer) Central corneal thickness
lens_status enum | null — See Lens status
post_refractive enum | null — See Post-refractive
keratometric_index — 1.330 – 1.338 Index of refraction used for keratometry conversion (typically 1.3375)

For JSON uploads and manual edits, when both K magnitudes are provided, K1_magnitude ≤ K2_magnitude is required. When both axes are provided, they must differ by exactly 90°. Partial sets are accepted, including magnitudes without axes. Inconsistent pairs return HTTP 422 with field-level validation details; measurements are not swapped or inferred.

BiomAI keeps its stricter extraction guard: incomplete or inconsistent anterior K sets are cleared, after any supported device-specific correction.


Optional notes and keratometry measurements. BiomAI extracts explicitly printed PK and TK from IOLMaster700 reports only. JSON input and manual measurements can provide PK from other devices, while TK requires IOLMaster700 as its source. Older JSON files may leave out extra_data or any TK fields.

Field Type Description
notes string | null Clinical notes or free-text annotations
posterior_keratometry PosteriorKeratometry | null PK and TK measurements; either group may be absent

This existing property name contains both posterior keratometry (PK) and total keratometry (TK). Each eye can contain PK, TK, both, or neither. pk_device_name identifies their shared source independently of data.biometer; TK values require IOLMaster700, but PK values do not. See PK devices.

Field Type Description
pk_device_name enum | null Shared source device for PK and TK measurements — see PK devices
right_eye PosteriorKeratometryData Right eye PK/TK measurements
left_eye PosteriorKeratometryData Left eye PK/TK measurements

A TK-only extra_data fragment in a complete JSON input is valid:

{
"extra_data": {
"posterior_keratometry": {
"pk_device_name": "IOLMaster700",
"right_eye": {
"TK1_magnitude": 43.25,
"TK1_axis": 5,
"TK2_magnitude": 44.5,
"TK2_axis": 95
},
"left_eye": {}
}
}
}

The same per-eye object holds both sets of optional measurements.

Field Unit Valid range Description
PK1_magnitude D 2 – 10 Posterior flat keratometry power
PK1_axis ° 0 – 180 (integer) PK1 axis
PK2_magnitude D 2 – 10 Posterior steep keratometry power
PK2_axis ° 0 – 180 (integer) PK2 axis

PK powers accept either sign on input and are normalized to positive magnitudes before applying the 2–10 D range. Newly processed responses, BiomPIN shares, and exports contain those positive magnitudes. For example, -6.1 and -6.5 become 6.1 and 6.5.

Field Unit Valid range Description
TK1_magnitude D 20 – 99 Total flat keratometry power
TK1_axis ° 0 – 180 (integer) TK1 axis
TK2_magnitude D 20 – 99 Total steep keratometry power
TK2_axis ° 0 – 180 (integer) TK2 axis

For JSON uploads and manual edits, each provided power pair must be ordered: abs(PK1_magnitude) ≤ abs(PK2_magnitude) or TK1_magnitude ≤ TK2_magnitude. When both axes of a PK or TK pair are provided, they must differ by exactly 90°. Partial pairs and equal powers are accepted; missing measurements are not inferred. Inconsistent pairs return HTTP 422.

BiomAI applies a stricter extraction guard to each PK and TK pair: both powers and axes must be present, ordered, and 90° apart. Invalid or incomplete extracted pairs are cleared separately, without rejecting otherwise valid core biometry. This does not change JSON or manual-input validation.


Provenance and version information. Always present.

Field Type Description
request_id string Request correlation ID for this response; retrieval assigns a new ID
schema_version string Report schema version (now "1.1.0")
app_version string BiomAPI server version (e.g., "2.2.22")
extraction PublicBiomAIMetadata | BiomDIRECTMetadata Discriminated union — see below

metadata.extraction — discriminated union

Section titled “metadata.extraction — discriminated union”

The type is determined by method. Re-uploaded metadata declares provenance. It is not proof that a downloaded file was unmodified. Web-app edits set method to BiomDIRECT.

method value Type When
"BiomAI" PublicBiomAIMetadata Extracted from PDF or image through OpenRouter
"BiomDIRECT" BiomDIRECTMetadata Manual entry, web edit, script, EHR export, or any latest-state non-LLM JSON
Field Type Description
method "BiomAI" | "BiomDIRECT" Discriminator
timestamp datetime (ISO 8601) When the extraction was performed

Public BiomAI metadata includes provenance only. Internal LLM diagnostics such as token counts, retry timing, response time, and preprocessing details are not included in API responses.

Field Type Description
byok bool true if the user provided their own OpenRouter key
llm string Model identifier used (e.g., "google/gemini-3.8-flash")
input_schema_version string | null Schema version of the uploaded JSON on round-trip re-upload; null for fresh PDF/image extractions
Field Type Description
input_schema_version string Schema version of the input payload (always filled)
source_app string | null Client-declared source application, such as "BiomAPI Webapp" or "BiomLINK"
source_version string | null Client-declared source application version

source_app and source_version are provenance fields only. They are not authentication or trust signals.

Fresh BiomAI PDF/image extraction:

{
"method": "BiomAI",
"timestamp": "2026-09-05T10:00:00Z",
"byok": false,
"llm": "google/gemini-3.8-flash",
"input_schema_version": null
}

BiomDIRECT direct/manual data:

{
"method": "BiomDIRECT",
"timestamp": "2026-09-05T10:00:00Z",
"input_schema_version": "1.0.0",
"source_app": "BiomAPI Webapp",
"source_version": "2.2.22"
}

Present when a BiomPIN was successfully generated. It can be null even when biompin=true was requested if sharing was unavailable. Treat sharing as optional and check for a PIN before using it.

Field Type Description
pin string Full PIN code: word-word-123456
expires_at string (ISO 8601) When the PIN expires (default: 31 days from creation)
db_id string BiomPIN database instance identifier

Value Device Manufacturer
"Aladdin" Aladdin Topcon
"Anterion" Anterion Heidelberg
"Argos" Argos Alcon
"IOLMaster700" IOLMaster 700 Zeiss
"LenstarLS900" Lenstar LS 900 HaagStreit
"EyestarES900" Eyestar ES 900 HaagStreit
"MS39" MS-39 CSO
"OA-2000" OA-2000 Tomey
"PentacamAXL" Pentacam AXL Oculus
"Other" Unrecognized device —

"Alcon", "CSO", "HaagStreit", "Heidelberg", "Oculus", "Tomey", "Topcon", "Zeiss", "Other"

Value Description
"Phakic" Natural crystalline lens present
"Phakic IOL" Natural lens present with an additional phakic IOL
"Pseudophakic" Natural lens replaced with IOL
"Aphakic" No lens present
Value Description
"None" No prior refractive surgery
"Myopic LVC" Myopic laser vision correction (LASIK, PRK, LASEK)
"Hyperopic LVC" Hyperopic laser vision correction
"Radial Keratotomy" Radial keratotomy

"Anterion", "EyestarES900", "Galilei", "IOLMaster700", "MS39", "Pentacam", "Other"