70trust / 100

Calc Nccn Ipi

by magent in Other

x402 APIFailing, checked 3 h ago

Zhou 2014 NCCN-IPI for DLBCL in the rituximab era: age (≤40 0, 41–60 1, 61–75 2, ≥76 3), LDH/ULN (≤1 0, >1–3 1, >3 2), Ann Arbor III or IV 1, major-organ extranodal (bone marrow, CNS, liver/GI tract, or lung) 1, ECOG ≥2 1; max 8. Low 0–1, low_intermediate 2–3, high_intermediate 4–5, high 6–8. Deterministic published score; not a DLBCL diagnosis or treatment choice; not Shipp IPI, not R-IPI, not CNS-IPI. magent does not assay LDH or stage lymphoma.

GET
https://api.magentlab.com/api/calc/nccn_ipi
Price
$0.005
per call in USDC
Uptime
84.6%
last 30 days
Response time
239 ms
418 ms slowest 5%
Last check
Failed
3 h ago, next in 4 h

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

GET https://api.magentlab.com/api/calc/nccn_ipi

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/nccn_ipi?age=40&ecog=0&extranodal_major=false&ldh_uln_ratio=0.9&stage_iii_or_iv=false

Parameters

ParameterTypeRequiredDescription
ageintegerYesAge in years (18-120). ≤40 scores 0; 41–60 scores 1; 61–75 scores 2; ≥76 scores 3 (Zhou 2014 NCCN-IPI refined age). Age 40 scores 0; 41 and 60 score 1; 61 and 75 score 2; 76 scores 3. Not Shipp IPI binary >60.
ecogintegerYesECOG performance status 0-4 as assigned by the caller (Zhou 2014 NCCN-IPI). ≥2 scores 1. magent does not assign ECOG.
extranodal_majorbooleanYesExtranodal involvement of major organs (bone marrow, CNS, liver/GI tract, or lung) as assigned by the caller (Zhou 2014 NCCN-IPI). true scores 1. This is not IPI extranodal sites >1. magent does not image extranodal sites.
ldh_uln_rationumberYesSerum LDH divided by the laboratory ULN (0.1-20). ≤1 scores 0; >1 and ≤3 scores 1; >3 scores 2 (Zhou 2014 NCCN-IPI). 1.0 scores 0; 1.01 and 3.0 score 1; 3.01 scores 2. magent does not assay LDH.
stage_iii_or_ivbooleanYesAnn Arbor stage III or IV as assigned by the caller (Zhou 2014 NCCN-IPI). true scores 1. magent does not stage lymphoma.

Example response

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

Example response, 50 lines
{
  "age_years": 40,
  "citation": {
    "authors": "Zhou Z, Sehn LH, Rademaker AW, Gordon LI, Lacasce AS, Crosby-Thompson A, Vanderplas A, Zelenetz AD, Abel GA, Rodriguez MA, Nademanee A, Kaminski MS, Czuczman MS, Millenson M, Niland J, Gascoyne RD, Connors JM, Friedberg JW, Winter JN",
    "doi": "10.1182/blood-2013-09-524108",
    "id": "zhou-2014",
    "pmid": "24264230",
    "source": "Blood. 2014;123(6):837-842",
    "title": "An enhanced International Prognostic Index (NCCN-IPI) for patients with diffuse large B-cell lymphoma treated in the rituximab era"
  },
  "components": [
    {
      "factor": "age",
      "points": 0,
      "present": false,
      "value": 40
    },
    {
      "factor": "ldh_uln_ratio",
      "points": 0,
      "present": false,
      "value": 0.9
    },
    {
      "factor": "stage_iii_or_iv",
      "points": 0,
      "present": false
    },
    {
      "factor": "extranodal_major",
      "points": 0,
      "present": false
    },
    {
      "factor": "ecog_ge_2",
      "points": 0,
      "present": false,
      "value": 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.",
  "ecog": 0,
  "extranodal_major": false,
  "formula": "nccn_ipi",
  "formula_expression": "NCCN-IPI = age (≤40 0, 41–60 1, 61–75 2, ≥76 3) + LDH/ULN (≤1 0, >1–3 1, >3 2) + stage_iii_or_iv 1 + extranodal_major 1 + ecog_ge_2 1; Zhou 2014; max 8; low 0-1, low_intermediate 2-3, high_intermediate 4-5, high 6-8",
  "ldh_uln_ratio": 0.9,
  "max_score": 8,
  "nccn_ipi_risk": "low",
  "score": 0
}

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/nccn_ipi?age=40&ecog=0&extranodal_major=false&ldh_uln_ratio=0.9&stage_iii_or_iv=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 - 'https://api.magentlab.com/api/calc/nccn_ipi?age=40&ecog=0&extranodal_major=false&ldh_uln_ratio=0.9&stage_iii_or_iv=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.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%2Fnccn_ipi
const res = await pay("https://api.magentlab.com/api/calc/nccn_ipi?age=40&ecog=0&extranodal_major=false&ldh_uln_ratio=0.9&stage_iii_or_iv=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.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/nccn_ipi?age=40&ecog=0&extranodal_major=false&ldh_uln_ratio=0.9&stage_iii_or_iv=false")
    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
3 h agoTimed out---
14 h agoTimed out---
24 h agoPassed402284 ms$0.005
34 h agoPassed402146 ms$0.005
44 h agoPassed402401 ms$0.005
Show 8 older checks
2 days agoPassed402142 ms$0.005
3 days agoPassed402140 ms$0.005
3 days agoPassed402269 ms$0.005
3 days agoPassed402418 ms$0.005
4 days agoPassed402274 ms$0.005
4 days agoPassed402140 ms$0.005
5 days agoPassed402239 ms$0.005
5 days agoPassed402143 ms$0.005