68trust / 100

Calc Ie Mortality

by magent in Other

x402 APIFailing, checked 3 h ago

Park 2016 ICE Table 5 simplified 6-month IE mortality score: constant 4, age bands (<=45: 0; 46-60: 2; 61-70: 3; >70: 4), and caller-assigned flags (dialysis +3, nosocomial +2, prosthetic +1, symptoms >1 month -1, S. aureus +1, viridans -2, aortic/mitral vegetation +1 each, NYHA 3-4 +3, stroke +2, paravalvular +2, persistent bacteremia +2, surgery -2). Returns score, quadratic mortality percent, and score >= 8. Not a diagnosis. magent does not examine the patient or decide surgery.

POST
https://api.magentlab.com/api/calc/ie_mortality
Price
$0.007
per call in USDC
Uptime
94.1%
last 30 days
Response time
167 ms
528 ms slowest 5%
Last check
Failed
3 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Latest check failed 3 h ago: Timed out

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

How to call it

POST https://api.magentlab.com/api/calc/ie_mortality

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

{
  "items": [
    {
      "age": 40,
      "aortic_vegetation": false,
      "dialysis": false,
      "mitral_vegetation": false,
      "nosocomial_ie": false,
      "nyha_class_3_or_4": false,
      "paravalvular_complication": false,
      "persistent_bacteremia": false,
      "prosthetic_ie": false,
      "staphylococcus_aureus": false,
      "stroke": false,
      "surgical_treatment": false,
      "symptoms_gt_1_month": false,
      "viridans_group_streptococci": false
    },
    {
      "age": 40,
      "aortic_vegetation": false,
      "dialysis": false,
      "mitral_vegetation": false,
      "nosocomial_ie": false,
      "nyha_class_3_or_4": false,
      "paravalvular_complication": false,
      "persistent_bacteremia": false,
      "prosthetic_ie": false,
      "staphylococcus_aureus": false,
      "stroke": false,
      "surgical_treatment": false,
      "symptoms_gt_1_month": false,
      "viridans_group_streptococci": false
    }
  ]
}

Parameters

ParameterTypeRequiredDescription
itemsarray of objectYes

Example response

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

Example response, 196 lines
{
  "count": 2,
  "items": [
    {
      "age_years": 40,
      "citation": {
        "authors": "Park LP, Chu VH, Peterson G, et al.",
        "doi": "10.1161/JAHA.115.003016",
        "id": "park-2016",
        "pmid": "27091179",
        "source": "J Am Heart Assoc. 2016;5(4):e003016",
        "title": "Validated Risk Score for Predicting 6-Month Mortality in Infective Endocarditis"
      },
      "components": [
        {
          "factor": "constant",
          "points": 4,
          "present": true
        },
        {
          "factor": "age",
          "points": 0,
          "present": true,
          "value": 40
        },
        {
          "factor": "dialysis",
          "points": 0,
          "present": false
        },
        {
          "factor": "nosocomial_ie",
          "points": 0,
          "present": false
        },
        {
          "factor": "prosthetic_ie",
          "points": 0,
          "present": false
        },
        {
          "factor": "symptoms_gt_1_month",
          "points": 0,
          "present": false
        },
        {
          "factor": "staphylococcus_aureus",
          "points": 0,
          "present": false
        },
        {
          "factor": "viridans_group_streptococci",
          "points": 0,
          "present": false
        },
        {
          "factor": "aortic_vegetation",
          "points": 0,
          "present": false
        },
        {
          "factor": "mitral_vegetation",
          "points": 0,
          "present": false
        },
        {
          "factor": "nyha_class_3_or_4",
          "points": 0,
          "present": false
        },
        {
          "factor": "stroke",
          "points": 0,
          "present": false
        },
        {
          "factor": "paravalvular_complication",
          "points": 0,
          "present": false
        },
        {
          "factor": "persistent_bacteremia",
          "points": 0,
          "present": false
        },
        {
          "factor": "surgical_treatment",
          "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": "ie_mortality",
      "formula_expression": "Park 2016 Table 5 simplified IE 6-month mortality score = constant 4 + age (<=45: 0, 46-60: 2, 61-70: 3, >70: 4) + dialysis 3 + nosocomial_ie 2 + prosthetic_ie 1 + symptoms_gt_1_month -1 + staphylococcus_aureus 1 + viridans_group_streptococci -2 + aortic_vegetation 1 + mitral_vegetation 1 + nyha_class_3_or_4 3 + stroke 2 + paravalvular_complication 2 + persistent_bacteremia 2 + surgical_treatment -2; mortality_percent = 2.416*score + 0.109*score*score - 4.849 rounded to 1 decimal (Table 5 footnote); score_ge_8 iff score >= 8 (paper ROC operating point). Not Table 6 quintile bands",
      "mortality_percent": 6.6,
      "score": 4,
      "score_ge_8": false
    },
    {
      "age_years": 40,
      "citation": {
        "authors": "Park LP, Chu VH, Peterson G, et al.",
        "doi": "10.1161/JAHA.115.003016",
        "id": "park-2016",
        "pmid": "27091179",
        "source": "J Am Heart Assoc. 2016;5(4):e003016",
        "title": "Validated Risk Score for Predicting 6-Month Mortality in Infective Endocarditis"
      },
      "components": [
        {
          "factor": "constant",
          "points": 4,
          "present": true
        },
        {
          "factor": "age",
          "points": 0,
          "present": true,
          "value": 40
        },
        {
          "factor": "dialysis",
          "points": 0,
          "present": false
        },
        {
          "factor": "nosocomial_ie",
          "points": 0,
          "present": false
        },
        {
          "factor": "prosthetic_ie",
          "points": 0,
          "present": false
        },
        {
          "factor": "symptoms_gt_1_month",
          "points": 0,
          "present": false
        },
        {
          "factor": "staphylococcus_aureus",
          "points": 0,
          "present": false
        },
        {
          "factor": "viridans_group_streptococci",
          "points": 0,
          "present": false
        },
        {
          "factor": "aortic_vegetation",
          "points": 0,
          "present": false
        },
        {
          "factor": "mitral_vegetation",
          "points": 0,
          "present": false
        },
        {
          "factor": "nyha_class_3_or_4",
          "points": 0,
          "present": false
        },
        {
          "factor": "stroke",
          "points": 0,
          "present": false
        },
        {
          "factor": "paravalvular_complication",
          "points": 0,
          "present": false
        },
        {
          "factor": "persistent_bacteremia",
          "points": 0,
          "present": false
        },
        {
          "factor": "surgical_treatment",
          "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": "ie_mortality",
      "formula_expression": "Park 2016 Table 5 simplified IE 6-month mortality score = constant 4 + age (<=45: 0, 46-60: 2, 61-70: 3, >70: 4) + dialysis 3 + nosocomial_ie 2 + prosthetic_ie 1 + symptoms_gt_1_month -1 + staphylococcus_aureus 1 + viridans_group_streptococci -2 + aortic_vegetation 1 + mitral_vegetation 1 + nyha_class_3_or_4 3 + stroke 2 + paravalvular_complication 2 + persistent_bacteremia 2 + surgical_treatment -2; mortality_percent = 2.416*score + 0.109*score*score - 4.849 rounded to 1 decimal (Table 5 footnote); score_ge_8 iff score >= 8 (paper ROC operating point). Not Table 6 quintile bands",
      "mortality_percent": 6.6,
      "score": 4,
      "score_ge_8": false
    }
  ],
  "path": "/api/calc/ie_mortality"
}

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/ie_mortality' \
  -H 'content-type: application/json' \
  --data-raw '{"items":[{"age":40,"aortic_vegetation":false,"dialysis":false,"mitral_vegetation":false,"nosocomial_ie":false,"nyha_class_3_or_4":false,"paravalvular_complication":false,"persistent_bacteremia":false,"prosthetic_ie":false,"staphylococcus_aureus":false,"stroke":false,"surgical_treatment":false,"symptoms_gt_1_month":false,"viridans_group_streptococci":false},{"age":40,"aortic_vegetation":false,"dialysis":false,"mitral_vegetation":false,"nosocomial_ie":false,"nyha_class_3_or_4":false,"paravalvular_complication":false,"persistent_bacteremia":false,"prosthetic_ie":false,"staphylococcus_aureus":false,"stroke":false,"surgical_treatment":false,"symptoms_gt_1_month":false,"viridans_group_streptococci":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/ie_mortality' \
  -H 'content-type: application/json' \
  --data-raw '{"items":[{"age":40,"aortic_vegetation":false,"dialysis":false,"mitral_vegetation":false,"nosocomial_ie":false,"nyha_class_3_or_4":false,"paravalvular_complication":false,"persistent_bacteremia":false,"prosthetic_ie":false,"staphylococcus_aureus":false,"stroke":false,"surgical_treatment":false,"symptoms_gt_1_month":false,"viridans_group_streptococci":false},{"age":40,"aortic_vegetation":false,"dialysis":false,"mitral_vegetation":false,"nosocomial_ie":false,"nyha_class_3_or_4":false,"paravalvular_complication":false,"persistent_bacteremia":false,"prosthetic_ie":false,"staphylococcus_aureus":false,"stroke":false,"surgical_treatment":false,"symptoms_gt_1_month":false,"viridans_group_streptococci":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%2Fie_mortality&method=POST
const res = await pay("https://api.magentlab.com/api/calc/ie_mortality", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "items": [
      {
        "age": 40,
        "aortic_vegetation": false,
        "dialysis": false,
        "mitral_vegetation": false,
        "nosocomial_ie": false,
        "nyha_class_3_or_4": false,
        "paravalvular_complication": false,
        "persistent_bacteremia": false,
        "prosthetic_ie": false,
        "staphylococcus_aureus": false,
        "stroke": false,
        "surgical_treatment": false,
        "symptoms_gt_1_month": false,
        "viridans_group_streptococci": false
      },
      {
        "age": 40,
        "aortic_vegetation": false,
        "dialysis": false,
        "mitral_vegetation": false,
        "nosocomial_ie": false,
        "nyha_class_3_or_4": false,
        "paravalvular_complication": false,
        "persistent_bacteremia": false,
        "prosthetic_ie": false,
        "staphylococcus_aureus": false,
        "stroke": false,
        "surgical_treatment": false,
        "symptoms_gt_1_month": false,
        "viridans_group_streptococci": 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/ie_mortality",
        json={
            "items": [
                {
                    "age": 40,
                    "aortic_vegetation": False,
                    "dialysis": False,
                    "mitral_vegetation": False,
                    "nosocomial_ie": False,
                    "nyha_class_3_or_4": False,
                    "paravalvular_complication": False,
                    "persistent_bacteremia": False,
                    "prosthetic_ie": False,
                    "staphylococcus_aureus": False,
                    "stroke": False,
                    "surgical_treatment": False,
                    "symptoms_gt_1_month": False,
                    "viridans_group_streptococci": False,
                },
                {
                    "age": 40,
                    "aortic_vegetation": False,
                    "dialysis": False,
                    "mitral_vegetation": False,
                    "nosocomial_ie": False,
                    "nyha_class_3_or_4": False,
                    "paravalvular_complication": False,
                    "persistent_bacteremia": False,
                    "prosthetic_ie": False,
                    "staphylococcus_aureus": False,
                    "stroke": False,
                    "surgical_treatment": False,
                    "symptoms_gt_1_month": False,
                    "viridans_group_streptococci": 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
3 h agoTimed out---
8 h agoTimed out---
13 h agoPassed402169 ms$0.007
18 h agoPassed402157 ms$0.007
22 h agoPassed402168 ms$0.007
Show 10 older checks
27 h agoPassed402172 ms$0.007
32 h agoPassed402234 ms$0.007
36 h agoPassed402152 ms$0.007
40 h agoPassed402194 ms$0.007
44 h agoPassed402146 ms$0.007
2 days agoPassed402179 ms$0.007
2 days agoPassed402160 ms$0.007
2 days agoPassed402528 ms$0.007
3 days agoPassed402794 ms$0.007
3 days agoPassed402145 ms$0.007

History

11 Oct 2026Price changed from $0.005 to $0.007