Calc Garfield Af
by magent in Other
Fox 2017 GARFIELD-AF 1-year all-cause mortality, ischaemic stroke/systemic embolism, and major bleed from age, sex, weight, pulse, diastolic BP, comorbidities, smoking, caller-assigned ethnicity (White/Caucasian reference; Hispanic/Latino, Asian, Black/Mixed/Other), oral anticoagulant class (none, NOAC, VKA), carotid occlusive disease, and antiplatelet therapy. Published 1-year equations. magent does not assign race or ethnicity. Not a diagnosis or anticoagulation order.
https://api.magentlab.com/api/calc/garfield_af- Price
- $0.007
- per call in USDC
- Uptime
- 91.4%
- last 30 days
- Response time
- 183 ms
- 507 ms slowest 5%
- Last check
- Failed
- 35 min ago, next in 29 min
Reliability
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/garfield_af
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/garfield_af
content-type: application/json
{
"items": [
{
"age": 65,
"antiplatelet": false,
"carotid_occlusive_disease": false,
"current_smoking": false,
"dementia": false,
"diabetes": false,
"diastolic_bp_mm_hg": 80,
"ethnicity": "white",
"heart_failure": false,
"history_of_bleeding": false,
"moderate_to_severe_ckd": false,
"oac": "none",
"prior_stroke": false,
"pulse": 70,
"sex": "male",
"vascular_disease": false,
"weight_kg": 75
},
{
"age": 65,
"antiplatelet": false,
"carotid_occlusive_disease": false,
"current_smoking": false,
"dementia": false,
"diabetes": false,
"diastolic_bp_mm_hg": 80,
"ethnicity": "white",
"heart_failure": false,
"history_of_bleeding": false,
"moderate_to_severe_ckd": false,
"oac": "none",
"prior_stroke": false,
"pulse": 70,
"sex": "male",
"vascular_disease": false,
"weight_kg": 75
}
]
}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, 78 lines
{
"count": 2,
"items": [
{
"age": 65,
"antiplatelet": false,
"bleed_1y_percent": 0.7,
"bleed_lp": -0.20835515,
"carotid_occlusive_disease": false,
"citation": {
"authors": "Fox KAA, Lucas JE, Pieper KS, et al.",
"doi": "10.1136/bmjopen-2017-017157",
"id": "fox-2017-garfield-af",
"pmid": "29273652",
"source": "BMJ Open. 2017;7(12):e017157",
"title": "Improved risk stratification of patients with atrial fibrillation: an integrated GARFIELD-AF tool for the prediction of mortality, stroke and bleed in patients with and without anticoagulation"
},
"current_smoking": false,
"dementia": false,
"diabetes": false,
"diastolic_bp_mm_hg": 80,
"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.",
"ethnicity": "white",
"formula": "garfield_af",
"formula_expression": "mortality_1y_percent = 100*(1-0.962450119**exp(lp_mort)); lp_mort = 0.306202287*female + 0.693789082*heart_failure + 0.306120964*vascular_disease + 0.26585298*prior_stroke + 0.385407386*history_of_bleeding + 0.280133213*diabetes + 0.377903886*moderate_to_severe_ckd + 0.489453313*dementia + 0.345481149*current_smoking - 0.414591263*oac_noac - 0.18593561*oac_vka + 0.157023564*ethnicity_hispanic_latino - 0.609609055*ethnicity_asian + 0.375675102*ethnicity_black_mixed_other + 0.031050027*(age-65) if age<=65 + 0.064594824*(age-65) if age>65 - 0.021535182*(weight_kg-75) if weight_kg<=75 + 0.007678035*(pulse-120) if pulse<=120 - 0.019304333*(dbp-80) if dbp<=80; stroke_1y_percent = 100*(1-0.987574311**exp(lp_stroke)); lp_stroke = 0.233182644*heart_failure + 0.197919709*vascular_disease + 0.800863063*prior_stroke + 0.29883967*history_of_bleeding + 0.211995445*diabetes + 0.349516938*moderate_to_severe_ckd + 0.513221391*dementia + 0.478831506*current_smoking - 0.572199357*oac_noac - 0.352373263*…",
"heart_failure": false,
"history_of_bleeding": false,
"moderate_to_severe_ckd": false,
"mortality_1y_percent": 2.6,
"mortality_lp": -0.38390175,
"oac": "none",
"prior_stroke": false,
"pulse": 70,
"sex": "male",
"stroke_1y_percent": 1.2,
"stroke_lp": 0,
"vascular_disease": false,
"weight_kg": 75
},
{
"age": 65,
"antiplatelet": false,
"bleed_1y_percent": 0.7,
"bleed_lp": -0.20835515,
"carotid_occlusive_disease": false,
"citation": {
"authors": "Fox KAA, Lucas JE, Pieper KS, et al.",
"doi": "10.1136/bmjopen-2017-017157",
"id": "fox-2017-garfield-af",
"pmid": "29273652",
"source": "BMJ Open. 2017;7(12):e017157",
"title": "Improved risk stratification of patients with atrial fibrillation: an integrated GARFIELD-AF tool for the prediction of mortality, stroke and bleed in patients with and without anticoagulation"
},
"current_smoking": false,
"dementia": false,
"diabetes": false,
"diastolic_bp_mm_hg": 80,
"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.",
"ethnicity": "white",
"formula": "garfield_af",
"formula_expression": "mortality_1y_percent = 100*(1-0.962450119**exp(lp_mort)); lp_mort = 0.306202287*female + 0.693789082*heart_failure + 0.306120964*vascular_disease + 0.26585298*prior_stroke + 0.385407386*history_of_bleeding + 0.280133213*diabetes + 0.377903886*moderate_to_severe_ckd + 0.489453313*dementia + 0.345481149*current_smoking - 0.414591263*oac_noac - 0.18593561*oac_vka + 0.157023564*ethnicity_hispanic_latino - 0.609609055*ethnicity_asian + 0.375675102*ethnicity_black_mixed_other + 0.031050027*(age-65) if age<=65 + 0.064594824*(age-65) if age>65 - 0.021535182*(weight_kg-75) if weight_kg<=75 + 0.007678035*(pulse-120) if pulse<=120 - 0.019304333*(dbp-80) if dbp<=80; stroke_1y_percent = 100*(1-0.987574311**exp(lp_stroke)); lp_stroke = 0.233182644*heart_failure + 0.197919709*vascular_disease + 0.800863063*prior_stroke + 0.29883967*history_of_bleeding + 0.211995445*diabetes + 0.349516938*moderate_to_severe_ckd + 0.513221391*dementia + 0.478831506*current_smoking - 0.572199357*oac_noac - 0.352373263*…",
"heart_failure": false,
"history_of_bleeding": false,
"moderate_to_severe_ckd": false,
"mortality_1y_percent": 2.6,
"mortality_lp": -0.38390175,
"oac": "none",
"prior_stroke": false,
"pulse": 70,
"sex": "male",
"stroke_1y_percent": 1.2,
"stroke_lp": 0,
"vascular_disease": false,
"weight_kg": 75
}
],
"path": "/api/calc/garfield_af"
}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/garfield_af' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"age":65,"antiplatelet":false,"carotid_occlusive_disease":false,"current_smoking":false,"dementia":false,"diabetes":false,"diastolic_bp_mm_hg":80,"ethnicity":"white","heart_failure":false,"history_of_bleeding":false,"moderate_to_severe_ckd":false,"oac":"none","prior_stroke":false,"pulse":70,"sex":"male","vascular_disease":false,"weight_kg":75},{"age":65,"antiplatelet":false,"carotid_occlusive_disease":false,"current_smoking":false,"dementia":false,"diabetes":false,"diastolic_bp_mm_hg":80,"ethnicity":"white","heart_failure":false,"history_of_bleeding":false,"moderate_to_severe_ckd":false,"oac":"none","prior_stroke":false,"pulse":70,"sex":"male","vascular_disease":false,"weight_kg":75}]}'
# 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/garfield_af' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"age":65,"antiplatelet":false,"carotid_occlusive_disease":false,"current_smoking":false,"dementia":false,"diabetes":false,"diastolic_bp_mm_hg":80,"ethnicity":"white","heart_failure":false,"history_of_bleeding":false,"moderate_to_severe_ckd":false,"oac":"none","prior_stroke":false,"pulse":70,"sex":"male","vascular_disease":false,"weight_kg":75},{"age":65,"antiplatelet":false,"carotid_occlusive_disease":false,"current_smoking":false,"dementia":false,"diabetes":false,"diastolic_bp_mm_hg":80,"ethnicity":"white","heart_failure":false,"history_of_bleeding":false,"moderate_to_severe_ckd":false,"oac":"none","prior_stroke":false,"pulse":70,"sex":"male","vascular_disease":false,"weight_kg":75}]}' \
| 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%2Fgarfield_af&method=POST
const res = await pay("https://api.magentlab.com/api/calc/garfield_af", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"items": [
{
"age": 65,
"antiplatelet": false,
"carotid_occlusive_disease": false,
"current_smoking": false,
"dementia": false,
"diabetes": false,
"diastolic_bp_mm_hg": 80,
"ethnicity": "white",
"heart_failure": false,
"history_of_bleeding": false,
"moderate_to_severe_ckd": false,
"oac": "none",
"prior_stroke": false,
"pulse": 70,
"sex": "male",
"vascular_disease": false,
"weight_kg": 75
},
{
"age": 65,
"antiplatelet": false,
"carotid_occlusive_disease": false,
"current_smoking": false,
"dementia": false,
"diabetes": false,
"diastolic_bp_mm_hg": 80,
"ethnicity": "white",
"heart_failure": false,
"history_of_bleeding": false,
"moderate_to_severe_ckd": false,
"oac": "none",
"prior_stroke": false,
"pulse": 70,
"sex": "male",
"vascular_disease": false,
"weight_kg": 75
}
]
}),
});
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/garfield_af",
json={
"items": [
{
"age": 65,
"antiplatelet": False,
"carotid_occlusive_disease": False,
"current_smoking": False,
"dementia": False,
"diabetes": False,
"diastolic_bp_mm_hg": 80,
"ethnicity": "white",
"heart_failure": False,
"history_of_bleeding": False,
"moderate_to_severe_ckd": False,
"oac": "none",
"prior_stroke": False,
"pulse": 70,
"sex": "male",
"vascular_disease": False,
"weight_kg": 75,
},
{
"age": 65,
"antiplatelet": False,
"carotid_occlusive_disease": False,
"current_smoking": False,
"dementia": False,
"diabetes": False,
"diastolic_bp_mm_hg": 80,
"ethnicity": "white",
"heart_failure": False,
"history_of_bleeding": False,
"moderate_to_severe_ckd": False,
"oac": "none",
"prior_stroke": False,
"pulse": 70,
"sex": "male",
"vascular_disease": False,
"weight_kg": 75,
},
],
},
)
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 |
|---|---|---|---|---|
| 35 min ago | Timed out | - | - | - |
| 5 h ago | Timed out | - | - | - |
| 10 h ago | Timed out | - | - | - |
| 15 h ago | Passed | 402 | 279 ms | $0.007 |
| 20 h ago | Passed | 402 | 194 ms | $0.007 |
Show 10 older checks
| 25 h ago | Passed | 402 | 150 ms | $0.007 |
| 29 h ago | Passed | 402 | 171 ms | $0.007 |
| 34 h ago | Passed | 402 | 380 ms | $0.007 |
| 38 h ago | Passed | 402 | 507 ms | $0.007 |
| 43 h ago | Passed | 402 | 152 ms | $0.007 |
| 47 h ago | Passed | 402 | 393 ms | $0.007 |
| 2 days ago | Passed | 402 | 353 ms | $0.007 |
| 2 days ago | Passed | 402 | 183 ms | $0.007 |
| 2 days ago | Passed | 402 | 475 ms | $0.007 |
| 3 days ago | Passed | 402 | 191 ms | $0.007 |
History
| 11 Oct 2026 | Price changed from $0.005 to $0.007 |