API quickstart
Score ~4-year depression risk with a single POST to /api/score
.
Request
curl -X POST https://<your-host>/api/score \ -H 'Content-Type: application/json' \ -d '{ "sleep_minutes": 480, "frag_index": 2, "age": 60, "sex": "M", "any_vuln": 1, "neuropathy": 0 }'
JS (fetch)
const res = await fetch("/api/score", { method: "POST", headers: {"Content-Type":"application/json"}, body: JSON.stringify({ "sleep_minutes": 480, "frag_index": 2, "age": 60, "sex": "M", "any_vuln": 1, "neuropathy": 0 }) }); const { prob } = await res.json(); // number in [0,1]
Response
{ "prob": 0.304 }
Research prototype — not a medical device.