Health Triage
POST /api/v1/health/analyze
Send a medical image (X-ray, ultrasound, skin lesion) or raw EEG data from a portable headset. Pi queues an async job and returns a job_id you use to poll for the structured triage report.
Request
Body parameters
The clinical payload to analyze.
Arbitrary JSON context passed to the triage engine. Useful for patient age, symptoms, duration, pregnancy status, locale, and any other clinical metadata. Must serialize to at most 16,000 characters.
Controls the response format.
Response
Returns202 Accepted immediately. Poll GET /api/v1/jobs/:id for the result.
Polling for results
Use the Jobs endpoint with long-polling to retrieve the completed triage report:include=diagnostics when debugging routing and step timing.
Completed job output
When the job reachescompleted, data.payload.output contains the triage report:
Urgency classification. One of
"critical", "urgent", "standard", or "low".Overall confidence score between
0 and 1.Locale used for the response text.
Array of structured clinical findings. Each item contains
title, summary, confidence, and evidence.URL to an annotated segmentation overlay image when the MONAI sidecar is configured.
null otherwise.Seizure flag from the EEG classification step.
null for image inputs or when the MetaBCI sidecar is unavailable.Supportive care guidance including when to refer, in the requested locale.
Referral guidance based on severity and findings.
List of warning signs that require urgent escalation.
Mandatory disclaimer text indicating this is triage support, not a diagnosis.
Use cases
Smartphone-to-diagnosis (X-ray / ultrasound / skin lesion) Setinput.type to "image" and provide a base64 image or URL. Use input.modality to indicate the image type. The response includes structured findings, triage level, and an optional segmentation overlay when the MONAI sidecar is running.
Low-cost epilepsy screening (EEG)
Set input.type to "eeg" and provide a base64-encoded EEG payload. The response includes a seizure flag (when MetaBCI is configured) and a care plan for the local health worker.
Error codes
| Code | HTTP | Description |
|---|---|---|
missing_authorization_header | 401 | No Authorization header present |
invalid_request_body | 400 | Schema validation failed (e.g. missing modality for image input) |
health_triage_disabled | 403 | HEALTH_TRIAGE_ENABLED=false in server environment |
job_create_failed | 500 | Database insert failed |
job_trigger_failed | 502 | Background worker not reachable |