71trust / 100

Calc Sex Shock

by magent in Documents & files

x402 APIPassing, checked 5 h ago

Wang 2024 SEX-SHOCK Supplementary Table S13 sex-specific integer nomogram for in-hospital cardiogenic shock after ACS PCI. ORBI-like clinical flags plus ST-segment elevation, LVEF bands, and log-transformed creatinine and CRP levels as printed. Sum points; S13 Pr(CS) conversion. Not a medical device, not a cath-lab or shock-treatment order, and not ORBI.

POST
https://api.magentlab.com/api/calc/sex_shock
Price
$0.007
per call in USDC
Uptime
100%
last 30 days
Response time
175 ms
354 ms slowest 5%
Last check
Passed
5 h ago, next any minute now

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

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

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

{
  "items": [
    {
      "age_years": 65,
      "cardiac_arrest_on_admission": false,
      "creatinine_log": 4,
      "crp_log": 0,
      "glucose_gt_10_mmol_l": false,
      "heart_rate_gt_90": false,
      "killip_class_iii": false,
      "left_main_culprit": false,
      "lvef_band": "gt_50",
      "post_pci_timi_lt_3": false,
      "sbp_lt_125_and_pp_lt_45": false,
      "sex": "female",
      "st_segment_elevation": true
    },
    {
      "age_years": 65,
      "cardiac_arrest_on_admission": false,
      "creatinine_log": 4,
      "crp_log": 0,
      "glucose_gt_10_mmol_l": false,
      "heart_rate_gt_90": false,
      "killip_class_iii": false,
      "left_main_culprit": false,
      "lvef_band": "gt_50",
      "post_pci_timi_lt_3": false,
      "sbp_lt_125_and_pp_lt_45": false,
      "sex": "female",
      "st_segment_elevation": true
    }
  ]
}

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": 65,
      "citation": {
        "authors": "Wang Y, Zeller M, Auffret V, Georgiopoulos G, Räber L, Roffi M, Templin C, Muller O, Liberale L, Ministrini S, Stamatelopoulos K, Stellos K, Camici GG, Montecucco F, Rickli H, Maza M, Radovanovic D, Cottin Y, Chague F, Niederseer D, Lüscher TF, Kraler S; AMIS-Plus, SPUM-ACS and RICO investigators",
        "doi": "10.1093/eurheartj/ehae593",
        "id": "wang-2024-sex-shock",
        "pmid": "39217456",
        "source": "Eur Heart J. 2024;45(43):4564-4578",
        "title": "Sex-specific prediction of cardiogenic shock after acute coronary syndromes: the SEX-SHOCK score"
      },
      "components": [
        {
          "factor": "post_pci_timi_lt_3",
          "points": 49,
          "present": false,
          "value": false
        },
        {
          "factor": "left_main_culprit",
          "points": 49,
          "present": false,
          "value": false
        },
        {
          "factor": "glucose_gt_10_mmol_l",
          "points": 49,
          "present": false,
          "value": false
        },
        {
          "factor": "sbp_lt_125_and_pp_lt_45",
          "points": 49,
          "present": false,
          "value": false
        },
        {
          "factor": "heart_rate_gt_90",
          "points": 49,
          "present": false,
          "value": false
        },
        {
          "factor": "killip_class_iii",
          "points": 49,
          "present": false,
          "value": false
        },
        {
          "factor": "cardiac_arrest_on_admission",
          "points": 49,
          "present": false,
          "value": false
        },
        {
          "factor": "st_segment_elevation",
          "points": 50,
          "present": true,
          "value": true
        },
        {
          "factor": "age_years",
          "points": 49,
          "present": false,
          "value": 65
        },
        {
          "factor": "lvef_band",
          "points": 0,
          "present": false,
          "value": "gt_50"
        },
        {
          "factor": "creatinine_log",
          "points": 15,
          "present": true,
          "value": 4
        },
        {
          "factor": "crp_log",
          "points": 43,
          "present": true,
          "value": 0
        }
      ],
      "creatinine_log": 4,
      "crp_log": 0,
      "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": "sex_shock",
      "formula_expression": "SEX-SHOCK = S13 sex-specific nomogram points (female|male): post_pci_timi_lt_3 (F 49/67, M 49/61) + left_main_culprit (F 49/65, M 49/71) + glucose_gt_10_mmol_l (F 49/59, M 49/69) + sbp_lt_125_and_pp_lt_45 (F 49/70, M 49/66) + heart_rate_gt_90 (F 49/55, M 49/62) + killip_class_iii (F 49/76, M 49/66) + cardiac_arrest_on_admission (F 49/81, M 49/77) + age_years (<70: 49; >=70 F 54 M 55) + lvef_band (gt_50: 0; 35_to_50 F 22 M 18; lt_35: 49) + st_segment_elevation (F 49/50, M 49/68) + creatinine_log ticks (F 4:15 5:31 6:46 7:62 8:77 9:92; M 4.5:21 5.5:35 6.5:50 7.5:65 8.5:80 9.5:94; linear interpolate, round) + crp_log ticks (F 0:43 4:52 8:61; M 0:45 6:55 10:61; linear interpolate, round); sum; in_hospital_cs_probability is S13 Pr(CS) at printed totals (F 500-720, M 500-740; linear between ticks; clamp outside); max F 779 M 799; Wang 2024 Table S13; not ORBI; not CS-on-admission",
      "in_hospital_cs_probability": 0.001342,
      "lvef_band": "gt_50",
      "max_score": 779,
      "score": 500,
      "sex": "female"
    },
    {
      "age_years": 65,
      "citation": {
        "authors": "Wang Y, Zeller M, Auffret V, Georgiopoulos G, Räber L, Roffi M, Templin C, Muller O, Liberale L, Ministrini S, Stamatelopoulos K, Stellos K, Camici GG, Montecucco F, Rickli H, Maza M, Radovanovic D, Cottin Y, Chague F, Niederseer D, Lüscher TF, Kraler S; AMIS-Plus, SPUM-ACS and RICO investigators",
        "doi": "10.1093/eurheartj/ehae593",
        "id": "wang-2024-sex-shock",
        "pmid": "39217456",
        "source": "Eur Heart J. 2024;45(43):4564-4578",
        "title": "Sex-specific prediction of cardiogenic shock after acute coronary syndromes: the SEX-SHOCK score"
      },
      "components": [
        {
          "factor": "post_pci_timi_lt_3",
          "points": 49,
          "present": false,
          "value": false
        },
        {
          "factor": "left_main_culprit",
          "points": 49,
          "present": false,
          "value": false
        },
        {
          "factor": "glucose_gt_10_mmol_l",
          "points": 49,
          "present": false,
          "value": false
        },
        {
          "factor": "sbp_lt_125_and_pp_lt_45",
          "points": 49,
          "present": false,
          "value": false
        },
        {
          "factor": "heart_rate_gt_90",
          "points": 49,
          "present": false,
          "value": false
        },
        {
          "factor": "killip_class_iii",
          "points": 49,
          "present": false,
          "value": false
        },
        {
          "factor": "cardiac_arrest_on_admission",
          "points": 49,
          "present": false,
          "value": false
        },
        {
          "factor": "st_segment_elevation",
          "points": 50,
          "present": true,
          "value": true
        },
        {
          "factor": "age_years",
          "points": 49,
          "present": false,
          "value": 65
        },
        {
          "factor": "lvef_band",
          "points": 0,
          "present": false,
          "value": "gt_50"
        },
        {
          "factor": "creatinine_log",
          "points": 15,
          "present": true,
          "value": 4
        },
        {
          "factor": "crp_log",
          "points": 43,
          "present": true,
          "value": 0
        }
      ],
      "creatinine_log": 4,
      "crp_log": 0,
      "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": "sex_shock",
      "formula_expression": "SEX-SHOCK = S13 sex-specific nomogram points (female|male): post_pci_timi_lt_3 (F 49/67, M 49/61) + left_main_culprit (F 49/65, M 49/71) + glucose_gt_10_mmol_l (F 49/59, M 49/69) + sbp_lt_125_and_pp_lt_45 (F 49/70, M 49/66) + heart_rate_gt_90 (F 49/55, M 49/62) + killip_class_iii (F 49/76, M 49/66) + cardiac_arrest_on_admission (F 49/81, M 49/77) + age_years (<70: 49; >=70 F 54 M 55) + lvef_band (gt_50: 0; 35_to_50 F 22 M 18; lt_35: 49) + st_segment_elevation (F 49/50, M 49/68) + creatinine_log ticks (F 4:15 5:31 6:46 7:62 8:77 9:92; M 4.5:21 5.5:35 6.5:50 7.5:65 8.5:80 9.5:94; linear interpolate, round) + crp_log ticks (F 0:43 4:52 8:61; M 0:45 6:55 10:61; linear interpolate, round); sum; in_hospital_cs_probability is S13 Pr(CS) at printed totals (F 500-720, M 500-740; linear between ticks; clamp outside); max F 779 M 799; Wang 2024 Table S13; not ORBI; not CS-on-admission",
      "in_hospital_cs_probability": 0.001342,
      "lvef_band": "gt_50",
      "max_score": 779,
      "score": 500,
      "sex": "female"
    }
  ],
  "path": "/api/calc/sex_shock"
}

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/sex_shock' \
  -H 'content-type: application/json' \
  --data-raw '{"items":[{"age_years":65,"cardiac_arrest_on_admission":false,"creatinine_log":4,"crp_log":0,"glucose_gt_10_mmol_l":false,"heart_rate_gt_90":false,"killip_class_iii":false,"left_main_culprit":false,"lvef_band":"gt_50","post_pci_timi_lt_3":false,"sbp_lt_125_and_pp_lt_45":false,"sex":"female","st_segment_elevation":true},{"age_years":65,"cardiac_arrest_on_admission":false,"creatinine_log":4,"crp_log":0,"glucose_gt_10_mmol_l":false,"heart_rate_gt_90":false,"killip_class_iii":false,"left_main_culprit":false,"lvef_band":"gt_50","post_pci_timi_lt_3":false,"sbp_lt_125_and_pp_lt_45":false,"sex":"female","st_segment_elevation":true}]}'

# 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/sex_shock' \
  -H 'content-type: application/json' \
  --data-raw '{"items":[{"age_years":65,"cardiac_arrest_on_admission":false,"creatinine_log":4,"crp_log":0,"glucose_gt_10_mmol_l":false,"heart_rate_gt_90":false,"killip_class_iii":false,"left_main_culprit":false,"lvef_band":"gt_50","post_pci_timi_lt_3":false,"sbp_lt_125_and_pp_lt_45":false,"sex":"female","st_segment_elevation":true},{"age_years":65,"cardiac_arrest_on_admission":false,"creatinine_log":4,"crp_log":0,"glucose_gt_10_mmol_l":false,"heart_rate_gt_90":false,"killip_class_iii":false,"left_main_culprit":false,"lvef_band":"gt_50","post_pci_timi_lt_3":false,"sbp_lt_125_and_pp_lt_45":false,"sex":"female","st_segment_elevation":true}]}' \
  | 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%2Fsex_shock&method=POST
const res = await pay("https://api.magentlab.com/api/calc/sex_shock", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "items": [
      {
        "age_years": 65,
        "cardiac_arrest_on_admission": false,
        "creatinine_log": 4,
        "crp_log": 0,
        "glucose_gt_10_mmol_l": false,
        "heart_rate_gt_90": false,
        "killip_class_iii": false,
        "left_main_culprit": false,
        "lvef_band": "gt_50",
        "post_pci_timi_lt_3": false,
        "sbp_lt_125_and_pp_lt_45": false,
        "sex": "female",
        "st_segment_elevation": true
      },
      {
        "age_years": 65,
        "cardiac_arrest_on_admission": false,
        "creatinine_log": 4,
        "crp_log": 0,
        "glucose_gt_10_mmol_l": false,
        "heart_rate_gt_90": false,
        "killip_class_iii": false,
        "left_main_culprit": false,
        "lvef_band": "gt_50",
        "post_pci_timi_lt_3": false,
        "sbp_lt_125_and_pp_lt_45": false,
        "sex": "female",
        "st_segment_elevation": true
      }
    ]
  }),
});
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/sex_shock",
        json={
            "items": [
                {
                    "age_years": 65,
                    "cardiac_arrest_on_admission": False,
                    "creatinine_log": 4,
                    "crp_log": 0,
                    "glucose_gt_10_mmol_l": False,
                    "heart_rate_gt_90": False,
                    "killip_class_iii": False,
                    "left_main_culprit": False,
                    "lvef_band": "gt_50",
                    "post_pci_timi_lt_3": False,
                    "sbp_lt_125_and_pp_lt_45": False,
                    "sex": "female",
                    "st_segment_elevation": True,
                },
                {
                    "age_years": 65,
                    "cardiac_arrest_on_admission": False,
                    "creatinine_log": 4,
                    "crp_log": 0,
                    "glucose_gt_10_mmol_l": False,
                    "heart_rate_gt_90": False,
                    "killip_class_iii": False,
                    "left_main_culprit": False,
                    "lvef_band": "gt_50",
                    "post_pci_timi_lt_3": False,
                    "sbp_lt_125_and_pp_lt_45": False,
                    "sex": "female",
                    "st_segment_elevation": True,
                },
            ],
        },
    )
    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 h agoPassed402183 ms$0.007
9 h agoPassed402142 ms$0.007
14 h agoPassed402200 ms$0.007
18 h agoPassed402187 ms$0.007
23 h agoPassed402316 ms$0.007
Show 10 older checks
27 h agoPassed402175 ms$0.007
31 h agoPassed402175 ms$0.007
35 h agoPassed402160 ms$0.007
40 h agoPassed402407 ms$0.007
44 h agoPassed402269 ms$0.007
2 days agoPassed402260 ms$0.007
2 days agoPassed402176 ms$0.007
2 days agoPassed402155 ms$0.007
3 days agoPassed402159 ms$0.007
3 days agoPassed402354 ms$0.007

History

11 Oct 2026Price changed from $0.005 to $0.007