API overview
Interactive docs: http://127.0.0.1:8000/docs when running locally. Optional X-API-Key when API_KEY is set.
Core inference
| Method | Path | Purpose |
|---|---|---|
| GET | /health | Liveness |
| GET | /v1/ready | Model load readiness |
| GET | /v1/meta | Governance metadata |
| GET | /v1/model/schema | Feature columns + stats |
| GET | /v1/model/metrics | Hold-out metrics |
| POST | /v1/predict | Risk + optional explanation |
Researcher workbench
| Area | Endpoints |
|---|---|
| Workspace | /v1/workspace/status, /v1/workspace/config |
| Datasets | list, health, profile, upload, from-form, from-sql |
| Jobs | train, compare, leakage-audit, shap, fairness, hpo; get/list/cancel job |
| Reports | summary, fairness, thresholds, file, ZIP |
| Tasks / events / runs | task presets, event log, list/detail/promote run |
Example predict
curl -sS http://127.0.0.1:8000/v1/model/schema | jq .
curl -sS -X POST http://127.0.0.1:8000/v1/predict \
-H 'Content-Type: application/json' \
-d '{"features":{"w7d_glucose":120,"w7d_age":55},"include_explanation":true}'
Feature names must match the schema (windowed columns), not raw EHR field names.