Calc Score2 Op
by magent in Security & trust
ESC 2021 SCORE2-OP 10-year fatal plus non-fatal CVD percent for age 70-89 from sex, current smoking, diabetes, systolic BP, non-HDL cholesterol, and European geographic risk region (low, moderate, high, very_high). Published sex-specific Table 2 coefficients and region scale1/scale2. Not SCORE2, not SCORE2-Diabetes, not 2013 PCE, not PREVENT, not a diagnosis or statin order. magent does not assay lipids.
https://api.magentlab.com/api/calc/score2_op- Price
- $0.007
- per call in USDC
- Uptime
- 100%
- last 30 days
- Response time
- 239 ms
- 449 ms slowest 5%
- Last check
- Passed
- 4 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://api.magentlab.com/api/calc/score2_op
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/score2_op
content-type: application/json
{
"items": [
{
"age": 75,
"diabetes": false,
"european_risk_region": "low",
"non_hdl_mmol_l": 4.5,
"sbp_mm_hg": 150,
"sex": "male",
"smoker": true
},
{
"age": 75,
"diabetes": false,
"european_risk_region": "low",
"non_hdl_mmol_l": 4.5,
"sbp_mm_hg": 150,
"sex": "male",
"smoker": true
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
items | array of object | Yes |
Example response
The provider's example. We can't check it without paying. Shortened for display.
Example response, 54 lines
{
"count": 2,
"items": [
{
"age": 75,
"citation": {
"authors": "SCORE2-OP working group and ESC Cardiovascular risk collaboration",
"doi": "10.1093/eurheartj/ehab312",
"id": "score2-op-2021",
"pmid": "34120185",
"source": "Eur Heart J. 2021;42(25):2455-2467",
"title": "SCORE2-OP risk prediction algorithms: estimating incident cardiovascular event risk in older persons in four geographical risk regions"
},
"diabetes": 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.",
"european_risk_region": "low",
"formula": "score2_op",
"formula_expression": "10-year fatal+non-fatal CVD % = 100*(1-exp(-exp(scale1+scale2*ln(-ln(1-uncal))))); uncal=1-S0^exp(lp); cage=age-73; csbp=(SBP-150)/10; charts display non-HDL mmol/L; equation uses TC and HDL at paper HDL centering 1.4 so TC=non-HDL+1.4, ctc=TC-6, chdl=0; diabetes is included (not SCORE2-Diabetes); men S0=0.7576 lp=0.063*cage+0.425*diabetes-0.017*cage*diabetes+0.352*smoke-0.025*cage*smoke+0.094*csbp-0.005*cage*csbp+0.085*ctc+0.007*cage*ctc-0.356*chdl+0.009*cage*chdl; women S0=0.8082 lp=0.079*cage+0.601*diabetes-0.011*cage*diabetes+0.492*smoke-0.026*cage*smoke+0.102*csbp-0.004*cage*csbp+0.060*ctc-0.001*cage*ctc-0.304*chdl+0.015*cage*chdl; region (scale1,scale2) men low (-0.3400,1.1900) moderate (0.0100,1.2500) high (0.0800,1.1500) very_high (0.0500,0.7000); women low (-0.5200,1.0100) moderate (-0.1000,1.1000) high (0.3800,1.0900) very_high (0.3800,0.6900); SCORE2-OP 2021 Table 2 coefficients and supplement four-decimal scale1/scale2 and baseline survival; age 70-89; geographic region no…",
"hdl_mmol_l": 1.4,
"linear_predictor": 0.4181,
"non_hdl_mmol_l": 4.5,
"risk_10y_percent": 22.5,
"sbp_mm_hg": 150,
"sex": "male",
"smoker": true,
"total_cholesterol_mmol_l": 5.9
},
{
"age": 75,
"citation": {
"authors": "SCORE2-OP working group and ESC Cardiovascular risk collaboration",
"doi": "10.1093/eurheartj/ehab312",
"id": "score2-op-2021",
"pmid": "34120185",
"source": "Eur Heart J. 2021;42(25):2455-2467",
"title": "SCORE2-OP risk prediction algorithms: estimating incident cardiovascular event risk in older persons in four geographical risk regions"
},
"diabetes": 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.",
"european_risk_region": "low",
"formula": "score2_op",
"formula_expression": "10-year fatal+non-fatal CVD % = 100*(1-exp(-exp(scale1+scale2*ln(-ln(1-uncal))))); uncal=1-S0^exp(lp); cage=age-73; csbp=(SBP-150)/10; charts display non-HDL mmol/L; equation uses TC and HDL at paper HDL centering 1.4 so TC=non-HDL+1.4, ctc=TC-6, chdl=0; diabetes is included (not SCORE2-Diabetes); men S0=0.7576 lp=0.063*cage+0.425*diabetes-0.017*cage*diabetes+0.352*smoke-0.025*cage*smoke+0.094*csbp-0.005*cage*csbp+0.085*ctc+0.007*cage*ctc-0.356*chdl+0.009*cage*chdl; women S0=0.8082 lp=0.079*cage+0.601*diabetes-0.011*cage*diabetes+0.492*smoke-0.026*cage*smoke+0.102*csbp-0.004*cage*csbp+0.060*ctc-0.001*cage*ctc-0.304*chdl+0.015*cage*chdl; region (scale1,scale2) men low (-0.3400,1.1900) moderate (0.0100,1.2500) high (0.0800,1.1500) very_high (0.0500,0.7000); women low (-0.5200,1.0100) moderate (-0.1000,1.1000) high (0.3800,1.0900) very_high (0.3800,0.6900); SCORE2-OP 2021 Table 2 coefficients and supplement four-decimal scale1/scale2 and baseline survival; age 70-89; geographic region no…",
"hdl_mmol_l": 1.4,
"linear_predictor": 0.4181,
"non_hdl_mmol_l": 4.5,
"risk_10y_percent": 22.5,
"sbp_mm_hg": 150,
"sex": "male",
"smoker": true,
"total_cholesterol_mmol_l": 5.9
}
],
"path": "/api/calc/score2_op"
}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/score2_op' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"age":75,"diabetes":false,"european_risk_region":"low","non_hdl_mmol_l":4.5,"sbp_mm_hg":150,"sex":"male","smoker":true},{"age":75,"diabetes":false,"european_risk_region":"low","non_hdl_mmol_l":4.5,"sbp_mm_hg":150,"sex":"male","smoker":true}]}'
# 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/score2_op' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"age":75,"diabetes":false,"european_risk_region":"low","non_hdl_mmol_l":4.5,"sbp_mm_hg":150,"sex":"male","smoker":true},{"age":75,"diabetes":false,"european_risk_region":"low","non_hdl_mmol_l":4.5,"sbp_mm_hg":150,"sex":"male","smoker":true}]}' \
| 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%2Fscore2_op&method=POST
const res = await pay("https://api.magentlab.com/api/calc/score2_op", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"items": [
{
"age": 75,
"diabetes": false,
"european_risk_region": "low",
"non_hdl_mmol_l": 4.5,
"sbp_mm_hg": 150,
"sex": "male",
"smoker": true
},
{
"age": 75,
"diabetes": false,
"european_risk_region": "low",
"non_hdl_mmol_l": 4.5,
"sbp_mm_hg": 150,
"sex": "male",
"smoker": true
}
]
}),
});
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/score2_op",
json={
"items": [
{
"age": 75,
"diabetes": False,
"european_risk_region": "low",
"non_hdl_mmol_l": 4.5,
"sbp_mm_hg": 150,
"sex": "male",
"smoker": True,
},
{
"age": 75,
"diabetes": False,
"european_risk_region": "low",
"non_hdl_mmol_l": 4.5,
"sbp_mm_hg": 150,
"sex": "male",
"smoker": True,
},
],
},
)
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 |
|---|---|---|---|---|
| 4 h ago | Passed | 402 | 257 ms | $0.007 |
| 9 h ago | Passed | 402 | 161 ms | $0.007 |
| 13 h ago | Passed | 402 | 156 ms | $0.007 |
| 18 h ago | Passed | 402 | 190 ms | $0.007 |
| 22 h ago | Passed | 402 | 268 ms | $0.007 |
Show 10 older checks
| 27 h ago | Passed | 402 | 709 ms | $0.007 |
| 31 h ago | Passed | 402 | 323 ms | $0.007 |
| 35 h ago | Passed | 402 | 314 ms | $0.007 |
| 39 h ago | Passed | 402 | 404 ms | $0.007 |
| 43 h ago | Passed | 402 | 371 ms | $0.007 |
| 2 days ago | Passed | 402 | 367 ms | $0.007 |
| 2 days ago | Passed | 402 | 225 ms | $0.007 |
| 2 days ago | Passed | 402 | 147 ms | $0.007 |
| 3 days ago | Passed | 402 | 449 ms | $0.007 |
| 3 days ago | Passed | 402 | 239 ms | $0.007 |
History
| 11 Oct 2026 | Price changed from $0.005 to $0.007 |