75trust / 100

Calc Hep

by magent in Other

x402 APIPassing, checked 3 h ago

Cuker 2010 HEP score: eight features with signed weights (range -16 to 19). Magnitude of platelet fall, typical- or rapid-onset timing, nadir, thrombosis (at most one), SQ heparin skin necrosis, IV-bolus systemic reaction, bleeding, and other causes (select all; no other cause +3). Cutoff 2 was 100% sensitive / 60% specific vs the expert panel. Not a HIT diagnosis or 4Ts score. magent does not assay SRA or ELISA.

GET
https://api.magentlab.com/api/calc/hep
Price
$0.005
per call in USDC
Uptime
100%
last 30 days
Response time
241 ms
411 ms slowest 5%
Last check
Passed
3 h ago, next in 3 h

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

GET https://api.magentlab.com/api/calc/hep

Each call costs $0.005 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.

GET https://api.magentlab.com/api/calc/hep?bleeding=false&chronic_thrombocytopenia=false&cpb_96h=false&intra_arterial_device=false&magnitude=gt_50&nadir=gt_20&new_drug_thrombocytopenia=false&no_other_cause=true&overt_dic=false&severe_infection=false&skin_necrosis=false&systemic_reaction=false&thrombosis=typical_new_ge_4d&timing=typical_5_10

Parameters

ParameterTypeRequiredDescription
bleedingbooleanYesPresence of bleeding, petechiae, or extensive bruising (Cuker 2010). true scores -1; false scores 0.
chronic_thrombocytopeniabooleanYesPresence of a chronic thrombocytopenic disorder (Cuker 2010 other causes; select all that apply). true scores -1. Mutually exclusive with no_other_cause true.
cpb_96hbooleanYesCardiopulmonary bypass within the previous 96 hours (Cuker 2010). true scores -1. Mutually exclusive with no_other_cause true.
intra_arterial_devicebooleanYesIndwelling intra-arterial device (Cuker 2010 examples: IABP, VAD, ECMO). true scores -2. Mutually exclusive with no_other_cause true.
magnitudestringYesCaller-assigned Cuker 2010 magnitude of platelet fall (peak to nadir since heparin exposure). lt_30 (<30%) scores -1; 30_to_50 (30-50%) scores 1; gt_50 (>50%) scores 3. magent does not grade platelet counts.
nadirstringYesCaller-assigned Cuker 2010 nadir platelet count. le_20 (≤20 ×10^9/L) scores -2; gt_20 (>20 ×10^9/L) scores 2. magent does not take a raw platelet count.
new_drug_thrombocytopeniabooleanYesNewly initiated non-heparin medication known to cause thrombocytopenia (Cuker 2010). true scores -2. Mutually exclusive with no_other_cause true.
no_other_causebooleanYesNo other apparent cause of thrombocytopenia (Cuker 2010). true scores 3. Must be false if any other-cause flag is true.
overt_dicbooleanYesOvert DIC as assigned by the caller (Cuker 2010: fibrinogen <100 mg/dL and D-dimer >5.0 μg/mL). true scores -2. magent does not assay fibrinogen or D-dimer. Mutually exclusive with no_other_cause true.
severe_infectionbooleanYesSevere infection as an other cause of thrombocytopenia (Cuker 2010). true scores -2. Mutually exclusive with no_other_cause true.
skin_necrosisbooleanYesSkin necrosis at subcutaneous heparin injection sites (Cuker 2010). true scores 3; false scores 0. magent does not examine the skin.
systemic_reactionbooleanYesAcute systemic reaction after intravenous heparin bolus (Cuker 2010). true scores 2; false scores 0.
thrombosisstringYesCaller-assigned Cuker 2010 thrombosis (select at most one). none scores 0. Typical-onset: typical_new_ge_4d (new VTE or ATE ≥4 days after heparin) 3; typical_progression (progression of preexisting VTE or ATE while receiving heparin) 2. Rapid-onset: rapid_new (new VTE or ATE after heparin) 3; rapid…
timingstringYesCaller-assigned Cuker 2010 timing. Typical-onset: typical_lt_4 (fall begins <4 days) -2; typical_day_4 (day 4) 2; typical_5_10 (days 5-10) 3; typical_11_14 (days 11-14) 2; typical_gt_14 (>14 days) -1. Rapid-onset after re-exposure within 100 days: rapid_lt_48h (<48 h) 2; rapid_gt_48h (>48 h) -1. ma…

Example response

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

Example response, 93 lines
{
  "citation": {
    "authors": "Cuker A, Arepally G, Crowther MA, Rice L, Datko F, Hook K, Propert KJ, Kuter DJ, Ortel TL, Konkle BA, Cines DB",
    "doi": "10.1111/j.1538-7836.2010.04059.x",
    "id": "cuker-2010",
    "pmid": "20854372",
    "source": "J Thromb Haemost. 2010;8(12):2642-2650",
    "title": "The HIT Expert Probability (HEP) Score: a novel pre-test probability model for heparin-induced thrombocytopenia based on broad expert opinion"
  },
  "components": [
    {
      "factor": "magnitude",
      "points": 3,
      "present": true,
      "value": "gt_50"
    },
    {
      "factor": "timing",
      "points": 3,
      "present": true,
      "value": "typical_5_10"
    },
    {
      "factor": "nadir",
      "points": 2,
      "present": true,
      "value": "gt_20"
    },
    {
      "factor": "thrombosis",
      "points": 3,
      "present": true,
      "value": "typical_new_ge_4d"
    },
    {
      "factor": "skin_necrosis",
      "points": 0,
      "present": false
    },
    {
      "factor": "systemic_reaction",
      "points": 0,
      "present": false
    },
    {
      "factor": "bleeding",
      "points": 0,
      "present": false
    },
    {
      "factor": "chronic_thrombocytopenia",
      "points": 0,
      "present": false
    },
    {
      "factor": "new_drug_thrombocytopenia",
      "points": 0,
      "present": false
    },
    {
      "factor": "severe_infection",
      "points": 0,
      "present": false
    },
    {
      "factor": "overt_dic",
      "points": 0,
      "present": false
    },
    {
      "factor": "intra_arterial_device",
      "points": 0,
      "present": false
    },
    {
      "factor": "cpb_96h",
      "points": 0,
      "present": false
    },
    {
      "factor": "no_other_cause",
      "points": 3,
      "present": true
    }
  ],
  "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": "hep",
  "formula_expression": "HEP = magnitude (lt_30 -1, 30_to_50 1, gt_50 3) + timing (typical_lt_4 -2, typical_day_4 2, typical_5_10 3, typical_11_14 2, typical_gt_14 -1; rapid_lt_48h 2, rapid_gt_48h -1) + nadir (le_20 -2, gt_20 2) + thrombosis select at most one (none 0; typical_new_ge_4d 3, typical_progression 2; rapid_new 3, rapid_progression 2) + skin_necrosis 3 + systemic_reaction 2 + bleeding -1 + other causes select all (chronic_thrombocytopenia -1, new_drug_thrombocytopenia -2, severe_infection -2, overt_dic -2, intra_arterial_device -2, cpb_96h -1, no_other_cause 3 mutually exclusive with other causes); Cuker 2010; range -16 to 19; cutoff 2 was 100% sensitive / 60% specific vs expert panel; cutoff 5 was 86% sensitive / 88% specific",
  "max_score": 19,
  "score": 14,
  "score_ge_2": true,
  "score_ge_5": true
}

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.005.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i 'https://api.magentlab.com/api/calc/hep?bleeding=false&chronic_thrombocytopenia=false&cpb_96h=false&intra_arterial_device=false&magnitude=gt_50&nadir=gt_20&new_drug_thrombocytopenia=false&no_other_cause=true&overt_dic=false&severe_infection=false&skin_necrosis=false&systemic_reaction=false&thrombosis=typical_new_ge_4d&timing=typical_5_10'

# 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 - 'https://api.magentlab.com/api/calc/hep?bleeding=false&chronic_thrombocytopenia=false&cpb_96h=false&intra_arterial_device=false&magnitude=gt_50&nadir=gt_20&new_drug_thrombocytopenia=false&no_other_cause=true&overt_dic=false&severe_infection=false&skin_necrosis=false&systemic_reaction=false&thrombosis=typical_new_ge_4d&timing=typical_5_10' \
  | 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.005 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.005" });
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.005 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.magentlab.com%2Fapi%2Fcalc%2Fhep
const res = await pay("https://api.magentlab.com/api/calc/hep?bleeding=false&chronic_thrombocytopenia=false&cpb_96h=false&intra_arterial_device=false&magnitude=gt_50&nadir=gt_20&new_drug_thrombocytopenia=false&no_other_cause=true&overt_dic=false&severe_infection=false&skin_necrosis=false&systemic_reaction=false&thrombosis=typical_new_ge_4d&timing=typical_5_10");
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.005 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.005"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.get("https://api.magentlab.com/api/calc/hep?bleeding=false&chronic_thrombocytopenia=false&cpb_96h=false&intra_arterial_device=false&magnitude=gt_50&nadir=gt_20&new_drug_thrombocytopenia=false&no_other_cause=true&overt_dic=false&severe_infection=false&skin_necrosis=false&systemic_reaction=false&thrombosis=typical_new_ge_4d&timing=typical_5_10")
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402398 ms$0.005
13 h agoPassed402411 ms$0.005
24 h agoPassed402148 ms$0.005
34 h agoPassed402161 ms$0.005
43 h agoPassed402310 ms$0.005
Show 6 older checks
2 days agoPassed402156 ms$0.005
3 days agoPassed402241 ms$0.005
3 days agoPassed402273 ms$0.005
3 days agoPassed402299 ms$0.005
4 days agoPassed402160 ms$0.005
4 days agoPassed402163 ms$0.005