Complete reference for every endpoint in the MedExtract API. Expand each card to see available parameters and requirements.
/healthBasic health check. Returns HTTP 200 when the service is running. Use this for liveness probes.
/readyReadiness probe. Returns HTTP 200 when the service is fully initialized and ready to accept requests. Use this for readiness probes in container orchestrators.
All endpoints below require authentication via the X-API-Key header.
/v1/lab/parseAuthUpload a lab report image (JPEG, PNG, TIFF, WebP) and receive structured results with LOINC codes, reference ranges, and clinical interpretations.
/v1/lab/parse-pdfAuthUpload a lab report PDF and receive structured results. Supports multi-page documents with automatic table detection and extraction.
/v1/lab/fhirAuthUpload a lab report image or PDF and receive a FHIR R4 Bundle containing Patient and Observation resources. Compatible with any FHIR-compliant EHR system.
Returned by /v1/lab/parse and /v1/lab/parse-pdf
| Field | Type | Description |
|---|---|---|
patient | object | Patient demographics (name, age, sex, date) |
sections | array | Array of lab sections, each containing a name and array of results |
sections[].results[] | object | Individual test result with test_name, test_name_en, value, numeric_value, unit, unit_ucum, reference_range, reference_low, reference_high, loinc_code, panel, interpretation, flag, plausibility, confidence, needs_review |
summary | object | Summary counts: total_tests, flagged, needs_review |
metadata | object | Processing metadata: engine, processing_time_ms, confidence_mean |
Returned by /v1/lab/fhir
| Field | Type | Description |
|---|---|---|
resourceType | string | Always "Bundle" |
type | string | Always "collection" |
entry | array | Array of FHIR resources (Patient, Observation) |
| Status | Meaning | Common cause |
|---|---|---|
400 | Bad Request | Missing file, invalid format, or invalid query parameters |
401 | Unauthorized | Missing or invalid X-API-Key header |
413 | Payload Too Large | File exceeds the maximum upload size (20 MB) |
422 | Unprocessable Entity | File could not be parsed (corrupt or unreadable) |
429 | Too Many Requests | Rate limit exceeded. Check Retry-After header. |
500 | Internal Server Error | Unexpected server error. Contact support if persistent. |