67trust / 100

Calc Framingham Chd

by magent in Security & trust

x402 APIFailing, checked 35 min ago

Wilson 1998 Framingham 10-year CHD from sex-specific total-cholesterol point sheets: age 30-74, TC, HDL, JNC-V blood pressure, diabetes, and smoking. Deterministic published arithmetic with citation. Not a statin order, not ATP-III 2001, not pooled-cohort ASCVD. magent does not measure lipids or BP.

POST
https://api.magentlab.com/api/calc/framingham_chd
Price
$0.007
per call in USDC
Uptime
91.4%
last 30 days
Response time
161 ms
463 ms slowest 5%
Last check
Failed
35 min ago, next in 22 min

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Latest check failed 35 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/framingham_chd

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/framingham_chd
content-type: application/json

{
  "items": [
    {
      "age": 30,
      "dbp_mm_hg": 70,
      "diabetes": false,
      "hdl_mg_dl": 45,
      "sbp_mm_hg": 110,
      "sex": "male",
      "smoker": false,
      "total_cholesterol_mg_dl": 180
    },
    {
      "age": 30,
      "dbp_mm_hg": 70,
      "diabetes": false,
      "hdl_mg_dl": 45,
      "sbp_mm_hg": 110,
      "sex": "male",
      "smoker": false,
      "total_cholesterol_mg_dl": 180
    }
  ]
}

Parameters

ParameterTypeRequiredDescription
itemsarray of objectYes

Example response

The provider's example. We can't check it without paying.

Example response, 142 lines
{
  "count": 2,
  "items": [
    {
      "age_band": "30-34",
      "age_years": 30,
      "blood_pressure_category": "optimal",
      "cholesterol_band": "160-199",
      "citation": {
        "authors": "Wilson PW, D'Agostino RB, Levy D, Belanger AM, Silbershatz H, Kannel WB",
        "doi": "10.1161/01.CIR.97.18.1837",
        "id": "wilson-1998",
        "pmid": "9603539",
        "source": "Circulation. 1998;97(18):1837-1847",
        "title": "Prediction of coronary heart disease using risk factor categories"
      },
      "components": [
        {
          "band": "30-34",
          "factor": "age",
          "points": -1,
          "present": true,
          "value": 30
        },
        {
          "band": "160-199",
          "factor": "total_cholesterol",
          "points": 0,
          "present": true,
          "value": 180
        },
        {
          "band": "45-59",
          "factor": "hdl",
          "points": 0,
          "present": true,
          "value": 45
        },
        {
          "factor": "blood_pressure",
          "points": 0,
          "present": true,
          "value": "optimal"
        },
        {
          "factor": "diabetes",
          "points": 0,
          "present": false
        },
        {
          "factor": "smoker",
          "points": 0,
          "present": false
        }
      ],
      "dbp_mm_hg": 70,
      "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.",
      "formula": "framingham_chd",
      "formula_expression": "Wilson 1998 TC point sheets (Figs 3-4): sex-specific age + total cholesterol + HDL + JNC-V BP (higher of SBP/DBP stage) + diabetes + smoker; men age 30-34 -1, 35-39 0, 40-44 1, 45-49 2, 50-54 3, 55-59 4, 60-64 5, 65-69 6, 70-74 7; men TC <160 -3, 160-199 0, 200-239 1, 240-279 2, >=280 3; men HDL <35 2, 35-44 1, 45-59 0, >=60 -2; men BP optimal/normal 0, high-normal 1, stage I 2, stage II-IV 3; men diabetes 2, smoker 2; women age 30-34 -9, 35-39 -4, 40-44 0, 45-49 3, 50-54 6, 55-59 7, 60-74 8; women TC <160 -2, 160-199 0, 200-239 1, 240-279 1, >=280 3; women HDL <35 5, 35-44 2, 45-49 1, 50-59 0, >=60 -3; women BP optimal -3, normal/high-normal 0, stage I 2, stage II-IV 3; women diabetes 4, smoker 2; 10-year CHD % from the published point-total lookup; age 30-74; no race; not ATP-III",
      "hdl_band": "45-59",
      "hdl_mg_dl": 45,
      "max_score": 19,
      "sbp_mm_hg": 110,
      "score": -1,
      "sex": "male",
      "smoker": false,
      "ten_year_chd_risk_at_or_above": false,
      "ten_year_chd_risk_percent": 2,
      "total_cholesterol_mg_dl": 180
    },
    {
      "age_band": "30-34",
      "age_years": 30,
      "blood_pressure_category": "optimal",
      "cholesterol_band": "160-199",
      "citation": {
        "authors": "Wilson PW, D'Agostino RB, Levy D, Belanger AM, Silbershatz H, Kannel WB",
        "doi": "10.1161/01.CIR.97.18.1837",
        "id": "wilson-1998",
        "pmid": "9603539",
        "source": "Circulation. 1998;97(18):1837-1847",
        "title": "Prediction of coronary heart disease using risk factor categories"
      },
      "components": [
        {
          "band": "30-34",
          "factor": "age",
          "points": -1,
          "present": true,
          "value": 30
        },
        {
          "band": "160-199",
          "factor": "total_cholesterol",
          "points": 0,
          "present": true,
          "value": 180
        },
        {
          "band": "45-59",
          "factor": "hdl",
          "points": 0,
          "present": true,
          "value": 45
        },
        {
          "factor": "blood_pressure",
          "points": 0,
          "present": true,
          "value": "optimal"
        },
        {
          "factor": "diabetes",
          "points": 0,
          "present": false
        },
        {
          "factor": "smoker",
          "points": 0,
          "present": false
        }
      ],
      "dbp_mm_hg": 70,
      "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.",
      "formula": "framingham_chd",
      "formula_expression": "Wilson 1998 TC point sheets (Figs 3-4): sex-specific age + total cholesterol + HDL + JNC-V BP (higher of SBP/DBP stage) + diabetes + smoker; men age 30-34 -1, 35-39 0, 40-44 1, 45-49 2, 50-54 3, 55-59 4, 60-64 5, 65-69 6, 70-74 7; men TC <160 -3, 160-199 0, 200-239 1, 240-279 2, >=280 3; men HDL <35 2, 35-44 1, 45-59 0, >=60 -2; men BP optimal/normal 0, high-normal 1, stage I 2, stage II-IV 3; men diabetes 2, smoker 2; women age 30-34 -9, 35-39 -4, 40-44 0, 45-49 3, 50-54 6, 55-59 7, 60-74 8; women TC <160 -2, 160-199 0, 200-239 1, 240-279 1, >=280 3; women HDL <35 5, 35-44 2, 45-49 1, 50-59 0, >=60 -3; women BP optimal -3, normal/high-normal 0, stage I 2, stage II-IV 3; women diabetes 4, smoker 2; 10-year CHD % from the published point-total lookup; age 30-74; no race; not ATP-III",
      "hdl_band": "45-59",
      "hdl_mg_dl": 45,
      "max_score": 19,
      "sbp_mm_hg": 110,
      "score": -1,
      "sex": "male",
      "smoker": false,
      "ten_year_chd_risk_at_or_above": false,
      "ten_year_chd_risk_percent": 2,
      "total_cholesterol_mg_dl": 180
    }
  ],
  "path": "/api/calc/framingham_chd"
}

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/framingham_chd' \
  -H 'content-type: application/json' \
  --data-raw '{"items":[{"age":30,"dbp_mm_hg":70,"diabetes":false,"hdl_mg_dl":45,"sbp_mm_hg":110,"sex":"male","smoker":false,"total_cholesterol_mg_dl":180},{"age":30,"dbp_mm_hg":70,"diabetes":false,"hdl_mg_dl":45,"sbp_mm_hg":110,"sex":"male","smoker":false,"total_cholesterol_mg_dl":180}]}'

# 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/framingham_chd' \
  -H 'content-type: application/json' \
  --data-raw '{"items":[{"age":30,"dbp_mm_hg":70,"diabetes":false,"hdl_mg_dl":45,"sbp_mm_hg":110,"sex":"male","smoker":false,"total_cholesterol_mg_dl":180},{"age":30,"dbp_mm_hg":70,"diabetes":false,"hdl_mg_dl":45,"sbp_mm_hg":110,"sex":"male","smoker":false,"total_cholesterol_mg_dl":180}]}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: 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%2Fframingham_chd&method=POST
const res = await pay("https://api.magentlab.com/api/calc/framingham_chd", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "items": [
      {
        "age": 30,
        "dbp_mm_hg": 70,
        "diabetes": false,
        "hdl_mg_dl": 45,
        "sbp_mm_hg": 110,
        "sex": "male",
        "smoker": false,
        "total_cholesterol_mg_dl": 180
      },
      {
        "age": 30,
        "dbp_mm_hg": 70,
        "diabetes": false,
        "hdl_mg_dl": 45,
        "sbp_mm_hg": 110,
        "sex": "male",
        "smoker": false,
        "total_cholesterol_mg_dl": 180
      }
    ]
  }),
});
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/framingham_chd",
        json={
            "items": [
                {
                    "age": 30,
                    "dbp_mm_hg": 70,
                    "diabetes": False,
                    "hdl_mg_dl": 45,
                    "sbp_mm_hg": 110,
                    "sex": "male",
                    "smoker": False,
                    "total_cholesterol_mg_dl": 180,
                },
                {
                    "age": 30,
                    "dbp_mm_hg": 70,
                    "diabetes": False,
                    "hdl_mg_dl": 45,
                    "sbp_mm_hg": 110,
                    "sex": "male",
                    "smoker": False,
                    "total_cholesterol_mg_dl": 180,
                },
            ],
        },
    )
    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

WhenResultHTTPTimePrice
35 min agoTimed out---
6 h agoTimed out---
10 h agoTimed out---
15 h agoPassed402145 ms$0.007
20 h agoPassed402168 ms$0.007
Show 10 older checks
25 h agoPassed402532 ms$0.007
29 h agoPassed402157 ms$0.007
34 h agoPassed402348 ms$0.007
38 h agoPassed402158 ms$0.007
43 h agoPassed402157 ms$0.007
47 h agoPassed402244 ms$0.007
2 days agoPassed402141 ms$0.007
2 days agoPassed402164 ms$0.007
3 days agoPassed402163 ms$0.007
3 days agoPassed402154 ms$0.007

History

11 Oct 2026Price changed from $0.005 to $0.007