Calc Mipi
by magent in Other
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.
https://api.magentlab.com/api/calc/mipi- Price
- $0.005
- per call in USDC
- Uptime
- 92.3%
- last 30 days
- Response time
- 221 ms
- 385 ms slowest 5%
- Last check
- Failed
- 2 h ago, next in 4 h
Reliability
Latest check failed 2 h ago: Timed out
Status and outage history · Atom feed · Watch with other listings
How to call it
GET 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.
GET https://api.magentlab.com/api/calc/mipi?age=40&ecog=0&ldh_uln_ratio=0.5&wbc_k_ul=5&wbc_ul=5000Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
age | integer | Yes | Age in years (18-120). <50 scores 0; 50–59 scores 1; 60–69 scores 2; ≥70 scores 3 (Hoster 2008 simplified MIPI). 50 and 59 score 1; 60 and 69 score 2; 70 scores 3. |
ecog | integer | Yes | ECOG performance status 0-4 as assigned by the caller (Hoster 2008 simplified MIPI). 0–1 scores 0; 2–4 scores 2. magent does not assign ECOG. |
ldh_uln_ratio | number | Yes | Serum LDH divided by the laboratory ULN (0.1-20). <0.67 scores 0; 0.67–<1.0 scores 1; 1.0–<1.5 scores 2; ≥1.5 scores 3 (0.67 scores 1; 0.99 scores 1; 1.0 scores 2; 1.49 scores 2; 1.5 scores 3). magent does not assay LDH. |
wbc_k_ul | number | No | WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul, not both. Range 0.01-500. Converted to ×10^9/L: <6.7 scores 0; 6.7–<10 scores 1; 10–<15 scores 2; ≥15 scores 3 (6.7 scores 1; 9.999 scores 1; 10 scores 2; 14.999 scores 2; 15 scores 3). |
wbc_ul | number | No | WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul, not both. Range 10-500000. Converted to ×10^9/L (= wbc_ul/1000): <6.7 scores 0; 6.7–<10 scores 1; 10–<15 scores 2; ≥15 scores 3 (6.7 scores 1; 9.999 scores 1; 10 scores 2; 14.999 scores 2; 15 scores 3). |
Example response
The provider's example. We can't check it without paying.
Example response, 47 lines
{
"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
}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/mipi?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 - 'https://api.magentlab.com/api/calc/mipi?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 --decodeJavaScript: 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
const res = await pay("https://api.magentlab.com/api/calc/mipi?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.get("https://api.magentlab.com/api/calc/mipi?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
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 2 h ago | Timed out | - | - | - |
| 13 h ago | Passed | 402 | 291 ms | $0.005 |
| 23 h ago | Passed | 402 | 221 ms | $0.005 |
| 33 h ago | Passed | 402 | 261 ms | $0.005 |
| 42 h ago | Passed | 402 | 361 ms | $0.005 |
Show 8 older checks
| 2 days ago | Passed | 402 | 262 ms | $0.005 |
| 3 days ago | Passed | 402 | 133 ms | $0.005 |
| 3 days ago | Passed | 402 | 385 ms | $0.005 |
| 3 days ago | Passed | 402 | 148 ms | $0.005 |
| 4 days ago | Passed | 402 | 146 ms | $0.005 |
| 4 days ago | Passed | 402 | 264 ms | $0.005 |
| 5 days ago | Passed | 402 | 143 ms | $0.005 |
| 5 days ago | Passed | 402 | 150 ms | $0.005 |