68trust / 100

Calc Impact

by magent in AI models & inference

x402 APIFailing, checked 3 h ago

Steyerberg 2008 IMPACT prognostic score for 6-month mortality and unfavorable outcome after traumatic brain injury. model=core (age, motor, pupils), extended (plus hypoxia, hypotension, Marshall CT, tSAH, EDH), or lab (plus glucose mmol/L and Hb g/dL). Points and printed logistic LPs from that paper. Not a diagnosis, not MRC CRASH (Perel 2008), and not magent chemotherapy CRASH.

POST
https://api.magentlab.com/api/calc/impact
Price
$0.007
per call in USDC
Uptime
94.1%
last 30 days
Response time
218 ms
421 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/impact

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

{
  "items": [
    {
      "age": 35,
      "edh": false,
      "glucose_mmol_l": 10,
      "hemoglobin_g_dl": 11,
      "hypotension": false,
      "hypoxia": false,
      "marshall_ct": "II",
      "model": "core",
      "motor_score": 3,
      "pupillary_reactivity": "both",
      "tsah": false
    },
    {
      "age": 35,
      "edh": false,
      "glucose_mmol_l": 10,
      "hemoglobin_g_dl": 11,
      "hypotension": false,
      "hypoxia": false,
      "marshall_ct": "II",
      "model": "core",
      "motor_score": 3,
      "pupillary_reactivity": "both",
      "tsah": false
    }
  ]
}

Parameters

ParameterTypeRequiredDescription
itemsarray of objectYes

Example response

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

Example response, 94 lines
{
  "count": 2,
  "items": [
    {
      "age": 35,
      "citation": {
        "authors": "Steyerberg EW, Mushkudiani N, Perel P, Butcher I, Lu J, McHugh GS, Murray GD, Marmarou A, Roberts I, Habbema JDF, Maas AIR",
        "doi": "10.1371/journal.pmed.0050165",
        "id": "steyerberg-2008-impact",
        "pmid": "18640954",
        "source": "PLoS Med. 2008;5(8):e165",
        "title": "Predicting outcome after traumatic brain injury: development and international validation of prognostic scores based on admission characteristics"
      },
      "components": [
        {
          "factor": "age",
          "points": 1,
          "present": true,
          "value": 35
        },
        {
          "factor": "motor_score",
          "points": 4,
          "present": true,
          "value": 3
        },
        {
          "factor": "pupillary_reactivity",
          "points": 0,
          "present": false,
          "value": "both"
        }
      ],
      "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": "impact",
      "formula_expression": "IMPACT (Steyerberg 2008 Fig 1): core = age(<=30:0, 31-39:1, 40-49:2, 50-59:3, 60-69:4, >=70:5) + motor(1-2:6, 3:4, 4:2, 5-6:0, 9:3) + pupils(both:0, one:2, none:4); extended = core + hypoxia(yes/suspected:1) + hypotension(yes/suspected:2) + marshall(I:-2, II:0, III-VI:2) + tSAH(yes:2) + EDH(yes:-2); lab = extended + glucose_mmol_l(<6:0, 6-8.9:1, 9-11.9:2, 12-14.9:3, >=15:4) + hb_g_dl(<9:3, 9-11.9:2, 12-14.9:1, >=15:0); p = 1/(1+e^(-LP)); LPcore mort=-2.55+0.275*sum; LPcore unfav=-1.62+0.299*sum; LPext mort=-2.98+0.256*sum; LPext unfav=-2.10+0.276*sum; LPlab mort=-3.42+0.216*sum; LPlab unfav=-2.82+0.257*sum; 6-month percent 1 decimal; not MRC CRASH",
      "linear_predictor_mortality": -1.175,
      "linear_predictor_unfavorable": -0.125,
      "max_score": 15,
      "model": "core",
      "mortality_6_month_percent": 23.6,
      "motor_score": 3,
      "pupillary_reactivity": "both",
      "score": 5,
      "sum_core": 5,
      "unfavorable_6_month_percent": 46.9
    },
    {
      "age": 35,
      "citation": {
        "authors": "Steyerberg EW, Mushkudiani N, Perel P, Butcher I, Lu J, McHugh GS, Murray GD, Marmarou A, Roberts I, Habbema JDF, Maas AIR",
        "doi": "10.1371/journal.pmed.0050165",
        "id": "steyerberg-2008-impact",
        "pmid": "18640954",
        "source": "PLoS Med. 2008;5(8):e165",
        "title": "Predicting outcome after traumatic brain injury: development and international validation of prognostic scores based on admission characteristics"
      },
      "components": [
        {
          "factor": "age",
          "points": 1,
          "present": true,
          "value": 35
        },
        {
          "factor": "motor_score",
          "points": 4,
          "present": true,
          "value": 3
        },
        {
          "factor": "pupillary_reactivity",
          "points": 0,
          "present": false,
          "value": "both"
        }
      ],
      "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": "impact",
      "formula_expression": "IMPACT (Steyerberg 2008 Fig 1): core = age(<=30:0, 31-39:1, 40-49:2, 50-59:3, 60-69:4, >=70:5) + motor(1-2:6, 3:4, 4:2, 5-6:0, 9:3) + pupils(both:0, one:2, none:4); extended = core + hypoxia(yes/suspected:1) + hypotension(yes/suspected:2) + marshall(I:-2, II:0, III-VI:2) + tSAH(yes:2) + EDH(yes:-2); lab = extended + glucose_mmol_l(<6:0, 6-8.9:1, 9-11.9:2, 12-14.9:3, >=15:4) + hb_g_dl(<9:3, 9-11.9:2, 12-14.9:1, >=15:0); p = 1/(1+e^(-LP)); LPcore mort=-2.55+0.275*sum; LPcore unfav=-1.62+0.299*sum; LPext mort=-2.98+0.256*sum; LPext unfav=-2.10+0.276*sum; LPlab mort=-3.42+0.216*sum; LPlab unfav=-2.82+0.257*sum; 6-month percent 1 decimal; not MRC CRASH",
      "linear_predictor_mortality": -1.175,
      "linear_predictor_unfavorable": -0.125,
      "max_score": 15,
      "model": "core",
      "mortality_6_month_percent": 23.6,
      "motor_score": 3,
      "pupillary_reactivity": "both",
      "score": 5,
      "sum_core": 5,
      "unfavorable_6_month_percent": 46.9
    }
  ],
  "path": "/api/calc/impact"
}

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/impact' \
  -H 'content-type: application/json' \
  --data-raw '{"items":[{"age":35,"edh":false,"glucose_mmol_l":10,"hemoglobin_g_dl":11,"hypotension":false,"hypoxia":false,"marshall_ct":"II","model":"core","motor_score":3,"pupillary_reactivity":"both","tsah":false},{"age":35,"edh":false,"glucose_mmol_l":10,"hemoglobin_g_dl":11,"hypotension":false,"hypoxia":false,"marshall_ct":"II","model":"core","motor_score":3,"pupillary_reactivity":"both","tsah":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/impact' \
  -H 'content-type: application/json' \
  --data-raw '{"items":[{"age":35,"edh":false,"glucose_mmol_l":10,"hemoglobin_g_dl":11,"hypotension":false,"hypoxia":false,"marshall_ct":"II","model":"core","motor_score":3,"pupillary_reactivity":"both","tsah":false},{"age":35,"edh":false,"glucose_mmol_l":10,"hemoglobin_g_dl":11,"hypotension":false,"hypoxia":false,"marshall_ct":"II","model":"core","motor_score":3,"pupillary_reactivity":"both","tsah":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%2Fimpact&method=POST
const res = await pay("https://api.magentlab.com/api/calc/impact", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "items": [
      {
        "age": 35,
        "edh": false,
        "glucose_mmol_l": 10,
        "hemoglobin_g_dl": 11,
        "hypotension": false,
        "hypoxia": false,
        "marshall_ct": "II",
        "model": "core",
        "motor_score": 3,
        "pupillary_reactivity": "both",
        "tsah": false
      },
      {
        "age": 35,
        "edh": false,
        "glucose_mmol_l": 10,
        "hemoglobin_g_dl": 11,
        "hypotension": false,
        "hypoxia": false,
        "marshall_ct": "II",
        "model": "core",
        "motor_score": 3,
        "pupillary_reactivity": "both",
        "tsah": 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/impact",
        json={
            "items": [
                {
                    "age": 35,
                    "edh": False,
                    "glucose_mmol_l": 10,
                    "hemoglobin_g_dl": 11,
                    "hypotension": False,
                    "hypoxia": False,
                    "marshall_ct": "II",
                    "model": "core",
                    "motor_score": 3,
                    "pupillary_reactivity": "both",
                    "tsah": False,
                },
                {
                    "age": 35,
                    "edh": False,
                    "glucose_mmol_l": 10,
                    "hemoglobin_g_dl": 11,
                    "hypotension": False,
                    "hypoxia": False,
                    "marshall_ct": "II",
                    "model": "core",
                    "motor_score": 3,
                    "pupillary_reactivity": "both",
                    "tsah": 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---
12 h agoPassed402196 ms$0.007
17 h agoPassed402169 ms$0.007
22 h agoPassed402144 ms$0.007
Show 10 older checks
27 h agoPassed402391 ms$0.007
31 h agoPassed402300 ms$0.007
36 h agoPassed402163 ms$0.007
40 h agoPassed402154 ms$0.007
44 h agoPassed402185 ms$0.007
2 days agoPassed402229 ms$0.007
2 days agoPassed402218 ms$0.007
2 days agoPassed402162 ms$0.007
3 days agoPassed402175 ms$0.007
3 days agoPassed402403 ms$0.007

History

11 Oct 2026Price changed from $0.005 to $0.007