Calc Delta P
by magent in Other
Titulaer 2011 DELTA-P for SCLC association in Lambert-Eaton myasthenic syndrome. One point each, at or within 3 months of LEMS onset: bulbar weakness (dysarthria/dysphagia/chewing/neck weakness); erectile dysfunction if male (always 0 if female); weight loss ≥5%; smoking at onset; age ≥50; Karnofsky <70. Max 6. Bands low 0-1, intermediate 2, high 3-6. Published SCLC percents for scores 0, 1, 3-6; none for score 2. Not a LEMS diagnosis, not SOX1, and not an SCLC screen.
https://api.magentlab.com/api/calc/delta_p- Price
- $0.005
- per call in USDC
- Uptime
- 100%
- last 30 days
- Response time
- 247 ms
- 689 ms slowest 5%
- Last check
- Passed
- 7 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
GET https://api.magentlab.com/api/calc/delta_p
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/delta_p?age=40&bulbar_weakness=false&erectile_dysfunction=false&kps_lt_70=false&sex=female&smoking_at_onset=false&weight_loss_ge_5pct=falseParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
age | integer | Yes | Age at LEMS onset in years (18-120). ≥50 scores 1; 49 does not (Titulaer 2011). |
bulbar_weakness | boolean | Yes | Dysarthria, dysphagia, chewing difficulty, or neck weakness at or within 3 months of LEMS onset (Titulaer 2011 D). true or false. Caller-assigned. 1 point if true. |
erectile_dysfunction | boolean | No | Erectile dysfunction at or within 3 months of LEMS onset (Titulaer 2011 E). Required when sex is male (true scores 1). When female, this item is always 0, including if omitted, false, or true. true or false. |
kps_lt_70 | boolean | Yes | Karnofsky Performance Status 0-60 (KPS <70) at or within 3 months of LEMS onset (Titulaer 2011 P). Caller-assigned flag; magent does not compute Karnofsky. true or false. 1 point if true. |
sex | string | Yes | female or male. Erectile dysfunction scores only when male. Female erectile is always 0 (Titulaer 2011: Female | 0). One of: female, male. |
smoking_at_onset | boolean | Yes | Smoking at LEMS onset (Titulaer 2011 T). true or false. Caller-assigned. 1 point if true. |
weight_loss_ge_5pct | boolean | Yes | Weight loss ≥5% at or within 3 months of LEMS onset (Titulaer 2011 L). true or false. Caller-assigned. 1 point if true. |
Example response
The provider's example. We can't check it without paying.
Example response, 52 lines
{
"age_years": 40,
"citation": {
"authors": "Titulaer MJ, Maddison P, Sont JK, Wirtz PW, Hilton-Jones D, Klooster R, Willcox N, Potman M, Sillevis Smitt PAE, Kuks JBM, Roep BO, Vincent A, van der Maarel SM, van Dijk JG, Lang B, Verschuuren JJGM",
"doi": "10.1200/JCO.2010.32.0440",
"id": "titulaer-2011",
"pmid": "21245427",
"source": "J Clin Oncol. 2011;29(7):902-908",
"title": "Clinical Dutch-English Lambert-Eaton Myasthenic Syndrome (LEMS) Tumor Association Prediction Score Accurately Predicts Small-Cell Lung Cancer in the LEMS"
},
"components": [
{
"factor": "bulbar_weakness",
"points": 0,
"present": false
},
{
"factor": "erectile_dysfunction",
"points": 0,
"present": false
},
{
"factor": "weight_loss_ge_5pct",
"points": 0,
"present": false
},
{
"factor": "smoking_at_onset",
"points": 0,
"present": false
},
{
"factor": "age_ge_50",
"points": 0,
"present": false,
"value": 40
},
{
"factor": "kps_lt_70",
"points": 0,
"present": false
}
],
"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": "delta_p",
"formula_expression": "DELTA-P = bulbar_weakness 1 + (male and erectile_dysfunction) 1 + weight_loss_ge_5pct 1 + smoking_at_onset 1 + (age>=50) 1 + kps_lt_70 1; each at or within 3 months of LEMS onset; female erectile always 0; max 6; bands 0-1 low / 2 intermediate / 3-6 high (Titulaer 2011); SCLC percents 0/2.6/omit/83.9/93.5/96.6/100 for scores 0-6",
"max_score": 6,
"sclc_band": "low",
"sclc_percent": 0,
"score": 0,
"sex": "female"
}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/delta_p?age=40&bulbar_weakness=false&erectile_dysfunction=false&kps_lt_70=false&sex=female&smoking_at_onset=false&weight_loss_ge_5pct=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/delta_p?age=40&bulbar_weakness=false&erectile_dysfunction=false&kps_lt_70=false&sex=female&smoking_at_onset=false&weight_loss_ge_5pct=false' \
| 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%2Fdelta_p
const res = await pay("https://api.magentlab.com/api/calc/delta_p?age=40&bulbar_weakness=false&erectile_dysfunction=false&kps_lt_70=false&sex=female&smoking_at_onset=false&weight_loss_ge_5pct=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/delta_p?age=40&bulbar_weakness=false&erectile_dysfunction=false&kps_lt_70=false&sex=female&smoking_at_onset=false&weight_loss_ge_5pct=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
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 7 h ago | Passed | 402 | 437 ms | $0.005 |
| 18 h ago | Passed | 402 | 268 ms | $0.005 |
| 28 h ago | Passed | 402 | 224 ms | $0.005 |
| 38 h ago | Passed | 402 | 689 ms | $0.005 |
| 47 h ago | Passed | 402 | 251 ms | $0.005 |
Show 6 older checks
| 2 days ago | Passed | 402 | 247 ms | $0.005 |
| 3 days ago | Passed | 402 | 138 ms | $0.005 |
| 3 days ago | Passed | 402 | 484 ms | $0.005 |
| 4 days ago | Passed | 402 | 217 ms | $0.005 |
| 4 days ago | Passed | 402 | 223 ms | $0.005 |
| 4 days ago | Passed | 402 | 132 ms | $0.005 |