API · v1 preview
One call between the model and the clinician.
Send the AI's draft plus the patient context. CAIVI checks it against the record, guidelines and formulary, then returns a disposition, CAI/CRI scores and an audit ID — in under 200 ms.
EHR / FHIR → AI model → [ CAIVI intercept ] → Clinician
│
└→ audit log · CAI/CRI dashboardRequest
POST https://api.caivi.com/v1/intercept
Authorization: Bearer <CAIVI_KEY>
Content-Type: application/json
{
"setting": "ward",
"patient": {
"fhir_bundle_ref": "Patient/8842",
"allergies": ["sulfonamide"],
"egfr": 28,
"medications": ["metoprolol 25 mg BID"]
},
"model_output": "Start Bactrim DS 1 tab BID for UTI."
}Response
200 OK · 142 ms
{
"disposition": "HARD_INTERCEPT",
"cai": 41.2,
"cri": 88.6,
"findings": [{
"type": "contra",
"merp": "G-I",
"claim": "Bactrim DS",
"evidence": "Documented sulfonamide allergy",
"safe_alternative": "Nitrofurantoin 100 mg BID x5d (check eGFR)"
}],
"audit_id": "aud_7f3c91"
}Dispositions
PASSNo issues. Output is delivered to the clinician unchanged.
WARNOutput delivered with inline annotations the clinician must acknowledge.
HARD_INTERCEPTOutput blocked. A safe alternative and reason are returned instead.
Integration options
REST
Call /v1/intercept from your app before showing AI output.
FHIR proxy
Point your SMART-on-FHIR app at CAIVI; it forwards and validates transparently.
Batch audit
Upload historical outputs to /v1/audit for CAI/CRI benchmarking.
Preview specification — endpoints are illustrative and not yet live.