65trust / 100

Calc Caprini

by magent in Security & trust

x402 APIFailing, checked 5 min ago

Caprini 2005 thrombosis risk assessment (Table 3): exclusive age (41-60=1, 61-74=2, >=75=3) and exclusive surgery (minor=1; arthroscopic/major/laparoscopic=2; arthroplasty=5) plus caller-assigned 1-, 2-, 3-, and 5-point flags. Max 78. Bands: 0-1 low, 2 moderate, 3-4 high, >=5 highest. Not a diagnosis. Not Caprini 2009/2013. Not a prophylaxis order.

POST
https://api.magentlab.com/api/calc/caprini
Price
$0.007
per call in USDC
Uptime
88.9%
last 30 days
Response time
254 ms
551 ms slowest 5%
Last check
Failed
5 min ago, next in 50 min

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Latest check failed 5 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/caprini

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

{
  "items": [
    {
      "abnormal_pulmonary_function": false,
      "acute_myocardial_infarction": false,
      "adverse_pregnancy_history": false,
      "age": 50,
      "anticardiolipin_antibodies": false,
      "central_venous_access": false,
      "confined_to_bed_gt_72h": false,
      "congestive_heart_failure": false,
      "elevated_homocysteine": false,
      "factor_v_leiden": false,
      "family_history_thrombosis": false,
      "heparin_induced_thrombocytopenia": false,
      "hip_pelvis_leg_fracture": false,
      "history_dvt_pe": false,
      "immobilizing_plaster_cast": false,
      "inflammatory_bowel_disease": false,
      "lupus_anticoagulant": false,
      "malignancy": false,
      "medical_bed_rest": false,
      "multiple_trauma": false,
      "obesity": false,
      "oral_contraceptives_or_hrt": false,
      "other_risk_factor": false,
      "other_thrombophilia": false,
      "pregnancy_or_postpartum": false,
      "prior_major_surgery": false,
      "prothrombin_20210a": false,
      "sepsis": false,
      "serious_lung_disease": false,
      "spinal_cord_injury": false,
      "stroke": false,
      "surgery": "none",
      "swollen_legs": false,
      "varicose_veins": false
    },
    {
      "abnormal_pulmonary_function": false,
      "acute_myocardial_infarction": false,
      "adverse_pregnancy_history": false,
      "age": 50,
      "anticardiolipin_antibodies": false,
      "central_venous_access": false,
      "confined_to_bed_gt_72h": false,
      "congestive_heart_failure": false,
      "elevated_homocysteine": false,
      "factor_v_leiden": false,
      "family_history_thrombosis": false,
      "heparin_induced_thrombocytopenia": false,
      "hip_pelvis_leg_fracture": false,
      "history_dvt_pe": false,
      "immobilizing_plaster_cast": false,
      "inflammatory_bowel_disease": false,
      "lupus_anticoagulant": false,
      "malignancy": false,
      "medical_bed_rest": false,
      "multiple_trauma": false,
      "obesity": false,
      "oral_contraceptives_or_hrt": false,
      "other_risk_factor": false,
      "other_thrombophilia": false,
      "pregnancy_or_postpartum": false,
      "prior_major_surgery": false,
      "prothrombin_20210a": false,
      "sepsis": false,
      "serious_lung_disease": false,
      "spinal_cord_injury": false,
      "stroke": false,
      "surgery": "none",
      "swollen_legs": false,
      "varicose_veins": false
    }
  ]
}

Parameters

ParameterTypeRequiredDescription
itemsarray of objectYes

Example response

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

Example response, 250 lines
{
  "count": 2,
  "items": [
    {
      "age_years": 50,
      "citation": {
        "authors": "Caprini JA",
        "doi": "10.1016/j.disamonth.2005.02.003",
        "id": "caprini-2005",
        "pmid": "15900257",
        "source": "Dis Mon. 2005;51(2-3):70-78",
        "title": "Thrombosis risk assessment as a guide to quality patient care"
      },
      "components": [
        {
          "factor": "age",
          "points": 1,
          "present": true,
          "value": 50
        },
        {
          "factor": "surgery",
          "points": 0,
          "present": false,
          "value": "none"
        },
        {
          "factor": "prior_major_surgery",
          "points": 0,
          "present": false
        },
        {
          "factor": "varicose_veins",
          "points": 0,
          "present": false
        },
        {
          "factor": "inflammatory_bowel_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "swollen_legs",
          "points": 0,
          "present": false
        },
        {
          "factor": "obesity",
          "points": 0,
          "present": false
        },
        {
          "factor": "acute_myocardial_infarction",
          "points": 0,
          "present": false
        },
        {
          "factor": "congestive_heart_failure",
          "points": 0,
          "present": false
        },
        {
          "factor": "sepsis",
          "points": 0,
          "present": false
        },
        {
          "factor": "serious_lung_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "abnormal_pulmonary_function",
          "points": 0,
          "present": false
        },
        {
          "factor": "medical_bed_rest",
          "points": 0,
          "present": false
        },
        {
          "factor": "other_risk_factor",
          "points": 0,
          "present": false
        },
        {
          "factor": "oral_contraceptives_or_hrt",
          "points": 0,
          "present": false
        },
        {
          "factor": "pregnancy_or_postpartum",
          "points": 0,
          "present": false
        },
        {
          "factor": "adverse_pregnancy_history",
          "points": 0,
          "present": false
        },
        {
          "factor": "malignancy",
          "points": 0,
          "present": false
        },
        {
          "factor": "confined_to_bed_gt_72h",
          "points": 0,
          "present": false
        },
        {
          "factor": "immobilizing_plaster_cast",
          "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": "caprini",
      "formula_expression": "Caprini 2005 = exclusive age (<=40: 0, 41-60: 1, 61-74: 2, >=75: 3) + exclusive surgery (none 0, minor 1, arthroscopic 2, major >45 min 2, laparoscopic >45 min 2, elective arthroplasty 5) + Table 3 flags (1, 2, 3, or 5); max 78; 0-1 low, 2 moderate, 3-4 high, >=5 highest",
      "max_score": 78,
      "risk_band": "low",
      "score": 1,
      "surgery": "none"
    },
    {
      "age_years": 50,
      "citation": {
        "authors": "Caprini JA",
        "doi": "10.1016/j.disamonth.2005.02.003",
        "id": "caprini-2005",
        "pmid": "15900257",
        "source": "Dis Mon. 2005;51(2-3):70-78",
        "title": "Thrombosis risk assessment as a guide to quality patient care"
      },
      "components": [
        {
          "factor": "age",
          "points": 1,
          "present": true,
          "value": 50
        },
        {
          "factor": "surgery",
          "points": 0,
          "present": false,
          "value": "none"
        },
        {
          "factor": "prior_major_surgery",
          "points": 0,
          "present": false
        },
        {
          "factor": "varicose_veins",
          "points": 0,
          "present": false
        },
        {
          "factor": "inflammatory_bowel_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "swollen_legs",
          "points": 0,
          "present": false
        },
        {
          "factor": "obesity",
          "points": 0,
          "present": false
        },
        {
          "factor": "acute_myocardial_infarction",
          "points": 0,
          "present": false
        },
        {
          "factor": "congestive_heart_failure",
          "points": 0,
          "present": false
        },
        {
          "factor": "sepsis",
          "points": 0,
          "present": false
        },
        {
          "factor": "serious_lung_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "abnormal_pulmonary_function",
          "points": 0,
          "present": false
        },
        {
          "factor": "medical_bed_rest",
          "points": 0,
          "present": false
        },
        {
          "factor": "other_risk_factor",
          "points": 0,
          "present": false
        },
        {
          "factor": "oral_contraceptives_or_hrt",
          "points": 0,
          "present": false
        },
        {
          "factor": "pregnancy_or_postpartum",
          "points": 0,
          "present": false
        },
        {
          "factor": "adverse_pregnancy_history",
          "points": 0,
          "present": false
        },
        {
          "factor": "malignancy",
          "points": 0,
          "present": false
        },
        {
          "factor": "confined_to_bed_gt_72h",
          "points": 0,
          "present": false
        },
        {
          "factor": "immobilizing_plaster_cast",
          "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": "caprini",
      "formula_expression": "Caprini 2005 = exclusive age (<=40: 0, 41-60: 1, 61-74: 2, >=75: 3) + exclusive surgery (none 0, minor 1, arthroscopic 2, major >45 min 2, laparoscopic >45 min 2, elective arthroplasty 5) + Table 3 flags (1, 2, 3, or 5); max 78; 0-1 low, 2 moderate, 3-4 high, >=5 highest",
      "max_score": 78,
      "risk_band": "low",
      "score": 1,
      "surgery": "none"
    }
  ],
  "path": "/api/calc/caprini"
}

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/caprini' \
  -H 'content-type: application/json' \
  --data-raw '{"items":[{"abnormal_pulmonary_function":false,"acute_myocardial_infarction":false,"adverse_pregnancy_history":false,"age":50,"anticardiolipin_antibodies":false,"central_venous_access":false,"confined_to_bed_gt_72h":false,"congestive_heart_failure":false,"elevated_homocysteine":false,"factor_v_leiden":false,"family_history_thrombosis":false,"heparin_induced_thrombocytopenia":false,"hip_pelvis_leg_fracture":false,"history_dvt_pe":false,"immobilizing_plaster_cast":false,"inflammatory_bowel_disease":false,"lupus_anticoagulant":false,"malignancy":false,"medical_bed_rest":false,"multiple_trauma":false,"obesity":false,"oral_contraceptives_or_hrt":false,"other_risk_factor":false,"other_thrombophilia":false,"pregnancy_or_postpartum":false,"prior_major_surgery":false,"prothrombin_20210a":false,"sepsis":false,"serious_lung_disease":false,"spinal_cord_injury":false,"stroke":false,"surgery":"none","swollen_legs":false,"varicose_veins":false},{"abnormal_pulmonary_function":false,"acute_myocardial_infarction":false,"adverse_pregnancy_history":false,"age":50,"anticardiolipin_antibodies":false,"central_venous_access":false,"confined_to_bed_gt_72h":false,"congestive_heart_failure":false,"elevated_homocysteine":false,"factor_v_leiden":false,"family_history_thrombosis":false,"heparin_induced_thrombocytopenia":false,"hip_pelvis_leg_fracture":false,"history_dvt_pe":false,"immobilizing_plaster_cast":false,"inflammatory_bowel_disease":false,"lupus_anticoagulant":false,"malignancy":false,"medical_bed_rest":false,"multiple_trauma":false,"obesity":false,"oral_contraceptives_or_hrt":false,"other_risk_factor":false,"other_thrombophilia":false,"pregnancy_or_postpartum":false,"prior_major_surgery":false,"prothrombin_20210a":false,"sepsis":false,"serious_lung_disease":false,"spinal_cord_injury":false,"stroke":false,"surgery":"none","swollen_legs":false,"varicose_veins":false}]}'

# 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/caprini' \
  -H 'content-type: application/json' \
  --data-raw '{"items":[{"abnormal_pulmonary_function":false,"acute_myocardial_infarction":false,"adverse_pregnancy_history":false,"age":50,"anticardiolipin_antibodies":false,"central_venous_access":false,"confined_to_bed_gt_72h":false,"congestive_heart_failure":false,"elevated_homocysteine":false,"factor_v_leiden":false,"family_history_thrombosis":false,"heparin_induced_thrombocytopenia":false,"hip_pelvis_leg_fracture":false,"history_dvt_pe":false,"immobilizing_plaster_cast":false,"inflammatory_bowel_disease":false,"lupus_anticoagulant":false,"malignancy":false,"medical_bed_rest":false,"multiple_trauma":false,"obesity":false,"oral_contraceptives_or_hrt":false,"other_risk_factor":false,"other_thrombophilia":false,"pregnancy_or_postpartum":false,"prior_major_surgery":false,"prothrombin_20210a":false,"sepsis":false,"serious_lung_disease":false,"spinal_cord_injury":false,"stroke":false,"surgery":"none","swollen_legs":false,"varicose_veins":false},{"abnormal_pulmonary_function":false,"acute_myocardial_infarction":false,"adverse_pregnancy_history":false,"age":50,"anticardiolipin_antibodies":false,"central_venous_access":false,"confined_to_bed_gt_72h":false,"congestive_heart_failure":false,"elevated_homocysteine":false,"factor_v_leiden":false,"family_history_thrombosis":false,"heparin_induced_thrombocytopenia":false,"hip_pelvis_leg_fracture":false,"history_dvt_pe":false,"immobilizing_plaster_cast":false,"inflammatory_bowel_disease":false,"lupus_anticoagulant":false,"malignancy":false,"medical_bed_rest":false,"multiple_trauma":false,"obesity":false,"oral_contraceptives_or_hrt":false,"other_risk_factor":false,"other_thrombophilia":false,"pregnancy_or_postpartum":false,"prior_major_surgery":false,"prothrombin_20210a":false,"sepsis":false,"serious_lung_disease":false,"spinal_cord_injury":false,"stroke":false,"surgery":"none","swollen_legs":false,"varicose_veins":false}]}' \
  | 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%2Fcaprini&method=POST
const res = await pay("https://api.magentlab.com/api/calc/caprini", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "items": [
      {
        "abnormal_pulmonary_function": false,
        "acute_myocardial_infarction": false,
        "adverse_pregnancy_history": false,
        "age": 50,
        "anticardiolipin_antibodies": false,
        "central_venous_access": false,
        "confined_to_bed_gt_72h": false,
        "congestive_heart_failure": false,
        "elevated_homocysteine": false,
        "factor_v_leiden": false,
        "family_history_thrombosis": false,
        "heparin_induced_thrombocytopenia": false,
        "hip_pelvis_leg_fracture": false,
        "history_dvt_pe": false,
        "immobilizing_plaster_cast": false,
        "inflammatory_bowel_disease": false,
        "lupus_anticoagulant": false,
        "malignancy": false,
        "medical_bed_rest": false,
        "multiple_trauma": false,
        "obesity": false,
        "oral_contraceptives_or_hrt": false,
        "other_risk_factor": false,
        "other_thrombophilia": false,
        "pregnancy_or_postpartum": false,
        "prior_major_surgery": false,
        "prothrombin_20210a": false,
        "sepsis": false,
        "serious_lung_disease": false,
        "spinal_cord_injury": false,
        "stroke": false,
        "surgery": "none",
        "swollen_legs": false,
        "varicose_veins": false
      },
      {
        "abnormal_pulmonary_function": false,
        "acute_myocardial_infarction": false,
        "adverse_pregnancy_history": false,
        "age": 50,
        "anticardiolipin_antibodies": false,
        "central_venous_access": false,
        "confined_to_bed_gt_72h": false,
        "congestive_heart_failure": false,
        "elevated_homocysteine": false,
        "factor_v_leiden": false,
        "family_history_thrombosis": false,
        "heparin_induced_thrombocytopenia": false,
        "hip_pelvis_leg_fracture": false,
        "history_dvt_pe": false,
        "immobilizing_plaster_cast": false,
        "inflammatory_bowel_disease": false,
        "lupus_anticoagulant": false,
        "malignancy": false,
        "medical_bed_rest": false,
        "multiple_trauma": false,
        "obesity": false,
        "oral_contraceptives_or_hrt": false,
        "other_risk_factor": false,
        "other_thrombophilia": false,
        "pregnancy_or_postpartum": false,
        "prior_major_surgery": false,
        "prothrombin_20210a": false,
        "sepsis": false,
        "serious_lung_disease": false,
        "spinal_cord_injury": false,
        "stroke": false,
        "surgery": "none",
        "swollen_legs": false,
        "varicose_veins": false
      }
    ]
  }),
});
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/caprini",
        json={
            "items": [
                {
                    "abnormal_pulmonary_function": False,
                    "acute_myocardial_infarction": False,
                    "adverse_pregnancy_history": False,
                    "age": 50,
                    "anticardiolipin_antibodies": False,
                    "central_venous_access": False,
                    "confined_to_bed_gt_72h": False,
                    "congestive_heart_failure": False,
                    "elevated_homocysteine": False,
                    "factor_v_leiden": False,
                    "family_history_thrombosis": False,
                    "heparin_induced_thrombocytopenia": False,
                    "hip_pelvis_leg_fracture": False,
                    "history_dvt_pe": False,
                    "immobilizing_plaster_cast": False,
                    "inflammatory_bowel_disease": False,
                    "lupus_anticoagulant": False,
                    "malignancy": False,
                    "medical_bed_rest": False,
                    "multiple_trauma": False,
                    "obesity": False,
                    "oral_contraceptives_or_hrt": False,
                    "other_risk_factor": False,
                    "other_thrombophilia": False,
                    "pregnancy_or_postpartum": False,
                    "prior_major_surgery": False,
                    "prothrombin_20210a": False,
                    "sepsis": False,
                    "serious_lung_disease": False,
                    "spinal_cord_injury": False,
                    "stroke": False,
                    "surgery": "none",
                    "swollen_legs": False,
                    "varicose_veins": False,
                },
                {
                    "abnormal_pulmonary_function": False,
                    "acute_myocardial_infarction": False,
                    "adverse_pregnancy_history": False,
                    "age": 50,
                    "anticardiolipin_antibodies": False,
                    "central_venous_access": False,
                    "confined_to_bed_gt_72h": False,
                    "congestive_heart_failure": False,
                    "elevated_homocysteine": False,
                    "factor_v_leiden": False,
                    "family_history_thrombosis": False,
                    "heparin_induced_thrombocytopenia": False,
                    "hip_pelvis_leg_fracture": False,
                    "history_dvt_pe": False,
                    "immobilizing_plaster_cast": False,
                    "inflammatory_bowel_disease": False,
                    "lupus_anticoagulant": False,
                    "malignancy": False,
                    "medical_bed_rest": False,
                    "multiple_trauma": False,
                    "obesity": False,
                    "oral_contraceptives_or_hrt": False,
                    "other_risk_factor": False,
                    "other_thrombophilia": False,
                    "pregnancy_or_postpartum": False,
                    "prior_major_surgery": False,
                    "prothrombin_20210a": False,
                    "sepsis": False,
                    "serious_lung_disease": False,
                    "spinal_cord_injury": False,
                    "stroke": False,
                    "surgery": "none",
                    "swollen_legs": False,
                    "varicose_veins": False,
                },
            ],
        },
    )
    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
5 min agoTimed out---
6 h agoTimed out---
11 h agoTimed out---
15 h agoTimed out---
20 h agoPassed402386 ms$0.007
Show 10 older checks
25 h agoPassed402167 ms$0.007
30 h agoPassed402203 ms$0.007
35 h agoPassed402321 ms$0.007
39 h agoPassed402308 ms$0.007
44 h agoPassed402269 ms$0.007
2 days agoPassed402292 ms$0.007
2 days agoPassed402197 ms$0.007
2 days agoPassed402445 ms$0.007
3 days agoPassed402154 ms$0.007
3 days agoPassed402193 ms$0.007

History

11 Oct 2026Price changed from $0.005 to $0.007