75trust / 100

Calc Plasmic

by magent in Other

x402 APIPassing, checked 5 h ago

Bendapudi 2017 PLASMIC: seven 1-point items (platelets <30×10^9/L, caller-assigned hemolysis, no active cancer, no solid-organ or stem-cell transplant, MCV <90 fL, INR <1.5, creatinine <2.0 mg/dL), max 7. Bands 0-4 / 5 / 6-7 are pretest groups for severe ADAMTS13 deficiency, not percents or a plasma-exchange order. magent does not assay hemolysis. Cutoffs 30, 90, 1.5, and 2.0 do not score.

GET
https://api.magentlab.com/api/calc/plasmic
Price
$0.005
per call in USDC
Uptime
100%
last 30 days
Response time
208 ms
312 ms slowest 5%
Last check
Passed
5 h ago, next in 11 min

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

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

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/plasmic?active_cancer=false&creatinine_mg_dl=1&creatinine_umol_l=88.4&hemolysis=true&inr=1.1&mcv_fl=85&platelets_10e9_l=15&solid_organ_or_stem_cell_transplant=false

Parameters

ParameterTypeRequiredDescription
active_cancerbooleanYesActive cancer as assigned by the caller. true or false. 1 point when false (no active cancer).
creatinine_mg_dlnumberNoSerum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. Scores 1 when <2.0; 2.0 does not score.
creatinine_umol_lnumberNoSerum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. Provide this or creatinine_mg_dl.
hemolysisbooleanYesCaller-assigned hemolysis (Bendapudi 2017: reticulocyte count >2.5% or undetectable haptoglobin or indirect bilirubin >2.0 mg/dL). true or false. magent does not assay. 1 point if true.
inrnumberYesINR (0.8-10). Scores 1 when <1.5; 1.5 does not score.
mcv_flnumberYesMean corpuscular volume in fL (50-120). Scores 1 when <90; 90.0 does not score.
platelets_10e9_lnumberYesPlatelet count ×10^9/L (1-2000). Scores 1 when <30; 30 does not score (Bendapudi 2017).
solid_organ_or_stem_cell_transplantbooleanYesHistory of solid-organ or stem-cell transplant as assigned by the caller. true or false. 1 point when false (no transplant history).

Example response

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

Example response, 64 lines
{
  "active_cancer": false,
  "citation": {
    "authors": "Bendapudi PK, Hurwitz S, Fry A, et al.",
    "doi": "10.1016/S2352-3026(17)30026-1",
    "id": "bendapudi-2017",
    "pmid": "28259520",
    "source": "Lancet Haematol. 2017;4(4):e157-e164",
    "title": "Derivation and external validation of the PLASMIC score for rapid assessment of adults with thrombotic microangiopathies: a cohort study"
  },
  "components": [
    {
      "factor": "platelets_lt_30",
      "points": 1,
      "present": true,
      "value": 15
    },
    {
      "factor": "hemolysis",
      "points": 1,
      "present": true
    },
    {
      "factor": "no_active_cancer",
      "points": 1,
      "present": true
    },
    {
      "factor": "no_solid_organ_or_stem_cell_transplant",
      "points": 1,
      "present": true
    },
    {
      "factor": "mcv_lt_90",
      "points": 1,
      "present": true,
      "value": 85
    },
    {
      "factor": "inr_lt_1_5",
      "points": 1,
      "present": true,
      "value": 1.1
    },
    {
      "factor": "creatinine_lt_2",
      "points": 1,
      "present": true,
      "value": 1
    }
  ],
  "creatinine_mg_dl": 1,
  "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": "plasmic",
  "formula_expression": "PLASMIC = (platelets_10e9_l<30) + hemolysis + (not active_cancer) + (not solid_organ_or_stem_cell_transplant) + (mcv_fl<90) + (inr<1.5) + (creatinine_mg_dl<2.0); each 1; max 7; bands 0-4 / 5 / 6-7",
  "hemolysis": true,
  "inr": 1.1,
  "max_score": 7,
  "mcv_fl": 85,
  "plasmic_band": "6-7",
  "platelets_10e9_l": 15,
  "score": 7,
  "solid_organ_or_stem_cell_transplant": false
}

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/plasmic?active_cancer=false&creatinine_mg_dl=1&creatinine_umol_l=88.4&hemolysis=true&inr=1.1&mcv_fl=85&platelets_10e9_l=15&solid_organ_or_stem_cell_transplant=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/plasmic?active_cancer=false&creatinine_mg_dl=1&creatinine_umol_l=88.4&hemolysis=true&inr=1.1&mcv_fl=85&platelets_10e9_l=15&solid_organ_or_stem_cell_transplant=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%2Fplasmic
const res = await pay("https://api.magentlab.com/api/calc/plasmic?active_cancer=false&creatinine_mg_dl=1&creatinine_umol_l=88.4&hemolysis=true&inr=1.1&mcv_fl=85&platelets_10e9_l=15&solid_organ_or_stem_cell_transplant=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/plasmic?active_cancer=false&creatinine_mg_dl=1&creatinine_umol_l=88.4&hemolysis=true&inr=1.1&mcv_fl=85&platelets_10e9_l=15&solid_organ_or_stem_cell_transplant=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
5 h agoPassed402137 ms$0.005
15 h agoPassed402208 ms$0.005
25 h agoPassed402284 ms$0.005
35 h agoPassed402312 ms$0.005
44 h agoPassed402221 ms$0.005
Show 6 older checks
2 days agoPassed402161 ms$0.005
3 days agoPassed402152 ms$0.005
3 days agoPassed402236 ms$0.005
3 days agoPassed402136 ms$0.005
4 days agoPassed402248 ms$0.005
4 days agoPassed402141 ms$0.005