78trust / 100

Calc Mipi

by magent in Other

x402 APIPassing, checked 5 h ago

Hoster 2008 simplified MIPI for advanced-stage mantle cell lymphoma: age (<50 0, 50–59 1, 60–69 2, ≥70 3), ECOG (0–1 0, 2–4 2), LDH/ULN (<0.67 0, 0.67–<1 1, 1–<1.5 2, ≥1.5 3), WBC ×10^9/L (<6.7 0, 6.7–<10 1, 10–<15 2, ≥15 3); max 11. Low 0–3, intermediate 4–5, high 6–11. Deterministic published score with citation; not a lymphoma diagnosis; not continuous MIPI; not MIPI-c. magent does not assay LDH or WBC.

POST
https://api.magentlab.com/api/calc/mipi
Price
$0.005
per call in USDC
Uptime
100%
last 30 days
Response time
289 ms
904 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/mipi

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.

POST https://api.magentlab.com/api/calc/mipi
content-type: application/json

{
  "items": [
    {
      "age": 40,
      "ecog": 0,
      "ldh_uln_ratio": 0.5,
      "wbc_k_ul": 5,
      "wbc_ul": 5000
    },
    {
      "age": 40,
      "ecog": 0,
      "ldh_uln_ratio": 0.5,
      "wbc_k_ul": 5,
      "wbc_ul": 5000
    }
  ]
}

Parameters

ParameterTypeRequiredDescription
itemsarray of objectYes

Example response

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

Example response, 100 lines
{
  "count": 2,
  "items": [
    {
      "age_years": 40,
      "citation": {
        "authors": "Hoster E, Dreyling M, Klapper W, et al.",
        "doi": "10.1182/blood-2007-06-095331",
        "id": "hoster-2008",
        "pmid": "17934064",
        "source": "Blood. 2008;111(2):558-565",
        "title": "A new prognostic index (MIPI) for patients with advanced-stage mantle cell lymphoma"
      },
      "components": [
        {
          "factor": "age",
          "points": 0,
          "present": false,
          "value": 40
        },
        {
          "factor": "ecog",
          "points": 0,
          "present": false,
          "value": 0
        },
        {
          "factor": "ldh_uln_ratio",
          "points": 0,
          "present": false,
          "value": 0.5
        },
        {
          "factor": "wbc",
          "points": 0,
          "present": false,
          "value": 5000
        }
      ],
      "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.",
      "ecog": 0,
      "formula": "mipi",
      "formula_expression": "simplified MIPI = age (<50 0, 50–59 1, 60–69 2, ≥70 3) + ECOG (0–1 0, 2–4 2) + LDH/ULN (<0.67 0, 0.67–<1.0 1, 1.0–<1.5 2, ≥1.5 3) + WBC ×10^9/L (<6.7 0, 6.7–<10 1, 10–<15 2, ≥15 3); Hoster 2008; max 11; low 0-3, intermediate 4-5, high 6-11",
      "ldh_uln_ratio": 0.5,
      "max_score": 11,
      "risk_group": "low",
      "score": 0,
      "wbc_10e9_l": 5,
      "wbc_ul": 5000
    },
    {
      "age_years": 40,
      "citation": {
        "authors": "Hoster E, Dreyling M, Klapper W, et al.",
        "doi": "10.1182/blood-2007-06-095331",
        "id": "hoster-2008",
        "pmid": "17934064",
        "source": "Blood. 2008;111(2):558-565",
        "title": "A new prognostic index (MIPI) for patients with advanced-stage mantle cell lymphoma"
      },
      "components": [
        {
          "factor": "age",
          "points": 0,
          "present": false,
          "value": 40
        },
        {
          "factor": "ecog",
          "points": 0,
          "present": false,
          "value": 0
        },
        {
          "factor": "ldh_uln_ratio",
          "points": 0,
          "present": false,
          "value": 0.5
        },
        {
          "factor": "wbc",
          "points": 0,
          "present": false,
          "value": 5000
        }
      ],
      "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.",
      "ecog": 0,
      "formula": "mipi",
      "formula_expression": "simplified MIPI = age (<50 0, 50–59 1, 60–69 2, ≥70 3) + ECOG (0–1 0, 2–4 2) + LDH/ULN (<0.67 0, 0.67–<1.0 1, 1.0–<1.5 2, ≥1.5 3) + WBC ×10^9/L (<6.7 0, 6.7–<10 1, 10–<15 2, ≥15 3); Hoster 2008; max 11; low 0-3, intermediate 4-5, high 6-11",
      "ldh_uln_ratio": 0.5,
      "max_score": 11,
      "risk_group": "low",
      "score": 0,
      "wbc_10e9_l": 5,
      "wbc_ul": 5000
    }
  ],
  "path": "/api/calc/mipi"
}

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 -X POST 'https://api.magentlab.com/api/calc/mipi' \
  -H 'content-type: application/json' \
  --data-raw '{"items":[{"age":40,"ecog":0,"ldh_uln_ratio":0.5,"wbc_k_ul":5,"wbc_ul":5000},{"age":40,"ecog":0,"ldh_uln_ratio":0.5,"wbc_k_ul":5,"wbc_ul":5000}]}'

# 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/mipi' \
  -H 'content-type: application/json' \
  --data-raw '{"items":[{"age":40,"ecog":0,"ldh_uln_ratio":0.5,"wbc_k_ul":5,"wbc_ul":5000},{"age":40,"ecog":0,"ldh_uln_ratio":0.5,"wbc_k_ul":5,"wbc_ul":5000}]}' \
  | 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%2Fmipi&method=POST
const res = await pay("https://api.magentlab.com/api/calc/mipi", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "items": [
      {
        "age": 40,
        "ecog": 0,
        "ldh_uln_ratio": 0.5,
        "wbc_k_ul": 5,
        "wbc_ul": 5000
      },
      {
        "age": 40,
        "ecog": 0,
        "ldh_uln_ratio": 0.5,
        "wbc_k_ul": 5,
        "wbc_ul": 5000
      }
    ]
  }),
});
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.post(
        "https://api.magentlab.com/api/calc/mipi",
        json={
            "items": [
                {
                    "age": 40,
                    "ecog": 0,
                    "ldh_uln_ratio": 0.5,
                    "wbc_k_ul": 5,
                    "wbc_ul": 5000,
                },
                {
                    "age": 40,
                    "ecog": 0,
                    "ldh_uln_ratio": 0.5,
                    "wbc_k_ul": 5,
                    "wbc_ul": 5000,
                },
            ],
        },
    )
    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
5 h agoPassed402391 ms$0.005
9 h agoPassed402285 ms$0.005
14 h agoPassed402299 ms$0.005
18 h agoPassed402238 ms$0.005
22 h agoPassed402135 ms$0.005
Show 10 older checks
26 h agoPassed402267 ms$0.005
30 h agoPassed402426 ms$0.005
35 h agoPassed402350 ms$0.005
39 h agoPassed402434 ms$0.005
43 h agoPassed402904 ms$0.005
47 h agoPassed402266 ms$0.005
2 days agoPassed402262 ms$0.005
2 days agoPassed402247 ms$0.005
2 days agoPassed402293 ms$0.005
3 days agoPassed402404 ms$0.005