Calc Findrisc
by magent in Security & trust
Lindström 2003 Finnish diabetes risk score (FINDRISC). Original seven-item 0–20 score, cutoff ≥9: age (<45 → 0, 45–54 → 2, 55–64 → 3, ≥65 → 4); BMI (<25 → 0, 25–30 → 1, >30 → 3); sex-specific waist; BP medication 2; high-glucose history 5; daily 30-min activity 0 else 2; daily vegetables 0 else 1. Returns score and at_risk. Not a diabetes diagnosis and not the later family-history revision.
https://api.magentlab.com/api/calc/findrisc- Price
- $0.007
- per call in USDC
- Uptime
- 91.4%
- last 30 days
- Response time
- 151 ms
- 455 ms slowest 5%
- Last check
- Failed
- 45 min ago, next in 19 min
Reliability
Latest check failed 45 min ago: Timed out
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://api.magentlab.com/api/calc/findrisc
Each call costs $0.007 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://api.magentlab.com/api/calc/findrisc
content-type: application/json
{
"items": [
{
"activity_30min": true,
"age": 40,
"bmi_kg_m2": 22,
"bp_medication": false,
"daily_vegetables": true,
"history_high_glucose": false,
"sex": "male",
"waist_cm": 80
},
{
"activity_30min": true,
"age": 40,
"bmi_kg_m2": 22,
"bp_medication": false,
"daily_vegetables": true,
"history_high_glucose": false,
"sex": "male",
"waist_cm": 80
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
items | array of object | Yes |
Example response
The provider's example. We can't check it without paying.
Example response, 126 lines
{
"count": 2,
"items": [
{
"age_years": 40,
"at_risk": false,
"bmi_kg_m2": 22,
"citation": {
"authors": "Lindström J, Tuomilehto J",
"doi": "10.2337/diacare.26.3.725",
"id": "lindstrom-2003",
"pmid": "12610029",
"source": "Diabetes Care. 2003;26(3):725-731",
"title": "The diabetes risk score: a practical tool to predict type 2 diabetes risk"
},
"components": [
{
"factor": "age",
"points": 0,
"present": false,
"value": 40
},
{
"factor": "bmi",
"points": 0,
"present": false,
"value": 22
},
{
"factor": "waist",
"points": 0,
"present": false,
"value": 80
},
{
"factor": "bp_medication",
"points": 0,
"present": false
},
{
"factor": "history_high_glucose",
"points": 0,
"present": false
},
{
"factor": "inactivity",
"points": 0,
"present": false
},
{
"factor": "no_daily_vegetables",
"points": 0,
"present": false
}
],
"disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
"formula": "findrisc",
"formula_expression": "FINDRISC = age + bmi + waist + bp_medication + history_high_glucose + inactivity + no_daily_vegetables; age <45 -> 0, 45-54 -> 2, 55-64 -> 3, >=65 -> 4; BMI <25 -> 0, 25-30 -> 1, >30 -> 3; waist men <94 -> 0, 94-102 -> 3, >102 -> 4; women <80 -> 0, 80-88 -> 3, >88 -> 4; bp_medication 2; history_high_glucose 5; activity_30min false -> 2; daily_vegetables false -> 1; max 20; at_risk iff score>=9",
"max_score": 20,
"score": 0,
"sex": "male",
"waist_cm": 80
},
{
"age_years": 40,
"at_risk": false,
"bmi_kg_m2": 22,
"citation": {
"authors": "Lindström J, Tuomilehto J",
"doi": "10.2337/diacare.26.3.725",
"id": "lindstrom-2003",
"pmid": "12610029",
"source": "Diabetes Care. 2003;26(3):725-731",
"title": "The diabetes risk score: a practical tool to predict type 2 diabetes risk"
},
"components": [
{
"factor": "age",
"points": 0,
"present": false,
"value": 40
},
{
"factor": "bmi",
"points": 0,
"present": false,
"value": 22
},
{
"factor": "waist",
"points": 0,
"present": false,
"value": 80
},
{
"factor": "bp_medication",
"points": 0,
"present": false
},
{
"factor": "history_high_glucose",
"points": 0,
"present": false
},
{
"factor": "inactivity",
"points": 0,
"present": false
},
{
"factor": "no_daily_vegetables",
"points": 0,
"present": false
}
],
"disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
"formula": "findrisc",
"formula_expression": "FINDRISC = age + bmi + waist + bp_medication + history_high_glucose + inactivity + no_daily_vegetables; age <45 -> 0, 45-54 -> 2, 55-64 -> 3, >=65 -> 4; BMI <25 -> 0, 25-30 -> 1, >30 -> 3; waist men <94 -> 0, 94-102 -> 3, >102 -> 4; women <80 -> 0, 80-88 -> 3, >88 -> 4; bp_medication 2; history_high_glucose 5; activity_30min false -> 2; daily_vegetables false -> 1; max 20; at_risk iff score>=9",
"max_score": 20,
"score": 0,
"sex": "male",
"waist_cm": 80
}
],
"path": "/api/calc/findrisc"
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.007.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://api.magentlab.com/api/calc/findrisc' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"activity_30min":true,"age":40,"bmi_kg_m2":22,"bp_medication":false,"daily_vegetables":true,"history_high_glucose":false,"sex":"male","waist_cm":80},{"activity_30min":true,"age":40,"bmi_kg_m2":22,"bp_medication":false,"daily_vegetables":true,"history_high_glucose":false,"sex":"male","waist_cm":80}]}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://api.magentlab.com/api/calc/findrisc' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"activity_30min":true,"age":40,"bmi_kg_m2":22,"bp_medication":false,"daily_vegetables":true,"history_high_glucose":false,"sex":"male","waist_cm":80},{"activity_30min":true,"age":40,"bmi_kg_m2":22,"bp_medication":false,"daily_vegetables":true,"history_high_glucose":false,"sex":"male","waist_cm":80}]}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.007 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.007" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.007 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.magentlab.com%2Fapi%2Fcalc%2Ffindrisc&method=POST
const res = await pay("https://api.magentlab.com/api/calc/findrisc", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"items": [
{
"activity_30min": true,
"age": 40,
"bmi_kg_m2": 22,
"bp_medication": false,
"daily_vegetables": true,
"history_high_glucose": false,
"sex": "male",
"waist_cm": 80
},
{
"activity_30min": true,
"age": 40,
"bmi_kg_m2": 22,
"bp_medication": false,
"daily_vegetables": true,
"history_high_glucose": false,
"sex": "male",
"waist_cm": 80
}
]
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.007 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.007"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://api.magentlab.com/api/calc/findrisc",
json={
"items": [
{
"activity_30min": True,
"age": 40,
"bmi_kg_m2": 22,
"bp_medication": False,
"daily_vegetables": True,
"history_high_glucose": False,
"sex": "male",
"waist_cm": 80,
},
{
"activity_30min": True,
"age": 40,
"bmi_kg_m2": 22,
"bp_medication": False,
"daily_vegetables": True,
"history_high_glucose": False,
"sex": "male",
"waist_cm": 80,
},
],
},
)
print(res.status_code, res.text)Security scan
1 finding
- Charges more than its listed price in payment
Listed at $0.005, charges $0.007
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 45 min ago | Timed out | - | - | - |
| 6 h ago | Timed out | - | - | - |
| 10 h ago | Timed out | - | - | - |
| 15 h ago | Passed | 402 | 244 ms | $0.007 |
| 20 h ago | Passed | 402 | 161 ms | $0.007 |
Show 10 older checks
| 25 h ago | Passed | 402 | 136 ms | $0.007 |
| 30 h ago | Passed | 402 | 142 ms | $0.007 |
| 34 h ago | Passed | 402 | 160 ms | $0.007 |
| 38 h ago | Passed | 402 | 162 ms | $0.007 |
| 43 h ago | Passed | 402 | 151 ms | $0.007 |
| 47 h ago | Passed | 402 | 163 ms | $0.007 |
| 2 days ago | Passed | 402 | 888 ms | $0.007 |
| 2 days ago | Passed | 402 | 157 ms | $0.007 |
| 3 days ago | Passed | 402 | 144 ms | $0.007 |
| 3 days ago | Passed | 402 | 455 ms | $0.007 |
History
| 11 Oct 2026 | Price changed from $0.005 to $0.007 |