Skip to content

JSON input / BiomDIRECT

Use BiomDIRECT for biometry data provided by your integration, script, EHR, or manual entry. BiomDIRECT identifies the origin of the data. The BiomJSON engine validates and normalizes the JSON without calling an LLM.

You do not need to create a complete StandardAPIResponse or provide metadata. Submit the required report objects and any available measurements. BiomAPI validates them and builds the standard response, including metadata and explicit null values for optional fields you do not provide.

This complete JSON object passes validation without metadata or measurements:

{
"data": {
"biometer": {
"device_name": "IOLMaster700",
"manufacturer": "Zeiss"
},
"patient": {},
"right_eye": {},
"left_eye": {}
}
}

Use the actual device and manufacturer values when known. "Other" is available for an unrecognized device or manufacturer.

The top-level data object is required. It must contain four objects: biometer, patient, right_eye, and left_eye. Within biometer, both device_name and manufacturer are required. Patient and eye objects may be empty ({}), but cannot be left out or replaced with null.

Patient fields, exam_date, and individual measurements may be left out or set to null. Add measurements inside the appropriate eye object, using the exact field names, enum values, and units in the field reference. See the complete synthetic report for an example with measurements.

Provide CCT in whole micrometers and all K, PK, and TK axes in whole degrees. Fractional values for these fields fail validation; BiomAPI does not round them.

Keep the core report inside data. Add optional extra_data and metadata alongside it:

{
"data": {
"biometer": { "device_name": "Argos", "manufacturer": "Alcon" },
"patient": {},
"right_eye": { "AL": 23.45 },
"left_eye": {}
},
"extra_data": { "notes": "Synthetic example; not a patient report." },
"metadata": {
"schema_version": "1.0.0",
"extraction": {
"method": "BiomDIRECT",
"source_app": "Example EHR",
"source_version": "1.0.0"
}
}
}

Only data is required at the top level. If either eye has a non-null TK field, set extra_data.posterior_keratometry.pk_device_name to IOLMaster700. This requirement applies regardless of the main biometer. Its contents follow the requirements above. Place notes, posterior keratometry, or total keratometry in top-level extra_data. See the extra-data reference.

source_app and source_version are optional, client-declared provenance under metadata.extraction. They are not authentication or trust signals. Leave out unused metadata blocks. When provided, metadata and metadata.extraction must be objects, not null. Neither a schema version nor an extraction method is needed for a newly created BiomDIRECT input.

You provide BiomAPI adds or returns
Required report objects and available values Validated data, with optional fields you do not provide filled as null
Optional extra_data Validated notes, posterior keratometry, and total keratometry, or extra_data: null when absent
No extraction metadata for newly created JSON metadata.extraction.method: "BiomDIRECT"
Optional metadata.extraction.source_app and source_version The provided source fields, or null when left out
Optional metadata.extraction.timestamp The provided parseable ISO timestamp; current UTC time when missing or invalid
Optional metadata.schema_version The current response metadata.schema_version; extraction.input_schema_version records the input version, defaulting to the current schema when left out
No response request ID or app version needed A request correlation ID and the current server metadata.app_version
Optional biompin=true request form field A newly created share when available; otherwise biompin: null

The current schema is 1.1.0, adding optional TK fields and accepting PK magnitudes from 2–10 D. Existing 1.0.0 documents remain accepted.

If declared, the input schema version must have the supported major version. Minor and patch differences are accepted. The response metadata reference describes the returned fields.

Bare reports without data are rejected with HTTP 422. Do not mix root-level report fields with data, or nest extra_data, metadata, or biompin inside data. These layouts also return HTTP 422.

BiomAPI fills optional fields and metadata. You must provide the required report objects. BiomAPI does not infer missing measurements or repair inconsistent keratometry. Missing required fields, invalid enums, out-of-range measurements, and inconsistent K/PK/TK pairs fail validation. Follow the anterior keratometry rules and the shared PK and TK field and validation reference.

Validation also applies documented normalization, including patient names to initials and signed posterior powers to positive magnitudes. A missing measurement remains null. It does not mean zero, normal, or confirmed absent. Schema validation cannot establish clinical correctness.

Save either complete input example as a UTF-8 file named report.json, then upload it using multipart file:

Terminal window
curl --fail-with-body https://biomapi.com/api/v1/biom/process \
-F "file=@report.json" \
-o result.json

The .json extension is required for JSON routing. The endpoint expects a file upload, not an application/json request body. Open result.json to read the completed response.

Add -F "biompin=true" to request a new BiomPIN share. Sharing is off by default. Check the returned biompin because processing may succeed even if a share cannot be created. See the REST API for authentication, options, and errors.

A saved StandardAPIResponse is also accepted as the uploaded JSON file. BiomJSON revalidates data and any extra_data against the current rules, then reconstructs supported extraction provenance.

Declared BiomAI provenance is kept, including the model, BYOK flag, and parseable timestamp. Direct-entry source fields are kept for BiomDIRECT. The input version is recorded as metadata.extraction.input_schema_version; response schema/app versions and the request ID are filled for the new processing request. A saved response is not returned unchanged.

Provenance preservation does not detect edits or prove that a file is unmodified. If you edit extracted values outside the web app, set metadata.extraction.method to "BiomDIRECT" and remove obsolete BiomAI-specific fields. Web-app edits make that provenance change automatically.

Uploaded biompin information is not reused. Request biompin=true as a form field to create a new share. Without it, the response has biompin: null.