This service predicts the probability of cardiovascular disease from
basic clinical and lifestyle features. Send a
POST request to /predict with a JSON body
and receive a risk score.
POST https://cvd-detector-main.fly.dev/predict
Required JSON fields:
age_years – age of the patient in yearsgender – 1 = female, 2 = maleheight – height in cmweight – weight in kgap_hi – systolic blood pressureap_lo – diastolic blood pressurecholesterol – 1, 2 or 3gluc – 1, 2 or 3smoke – 0 or 1alco – 0 or 1active – 0 or 1Example JSON:
{
"age_years": 52.0,
"gender": 2,
"height": 170,
"weight": 80.0,
"ap_hi": 130,
"ap_lo": 80,
"cholesterol": 2,
"gluc": 1,
"smoke": 0,
"alco": 0,
"active": 1
}
The API returns a JSON object:
{
"cardio_prediction": 1, // 0 = no disease, 1 = disease
"cardio_probability": 0.73 // probability of disease
}