Calc Cp Aki
by magent in Other
Gupta 2024 Figure 2 simple CP-AKI score after first IV cisplatin: age, hypertension, diabetes, current or former smoking, hemoglobin g/L, WBC, albumin g/L, magnesium mmol/L, and cisplatin dose mg. Max 22.5. Low / moderate / high / very_high. Not a diagnosis or chemo order. magent does not assay labs or dose cisplatin.
https://api.magentlab.com/api/calc/cp_aki- Price
- $0.005
- per call in USDC
- Uptime
- 100%
- last 30 days
- Response time
- 282 ms
- 472 ms slowest 5%
- Last check
- Passed
- 3 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://api.magentlab.com/api/calc/cp_aki
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/cp_aki
content-type: application/json
{
"items": [
{
"age": 40,
"albumin_g_dl": 4.2,
"albumin_g_l": 42,
"cisplatin_dose_mg": 50,
"current_or_former_smoker": false,
"diabetes": false,
"hemoglobin_g_dl": 13,
"hemoglobin_g_l": 130,
"hypertension": false,
"magnesium_mmol_l": 0.9,
"wbc_k_ul": 8,
"wbc_ul": 8000
},
{
"age": 40,
"albumin_g_dl": 4.2,
"albumin_g_l": 42,
"cisplatin_dose_mg": 50,
"current_or_former_smoker": false,
"diabetes": false,
"hemoglobin_g_dl": 13,
"hemoglobin_g_l": 130,
"hypertension": false,
"magnesium_mmol_l": 0.9,
"wbc_k_ul": 8,
"wbc_ul": 8000
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
items | array of object | Yes |
Example response
The provider's example. We can't check it without paying.
Example response, 156 lines
{
"count": 2,
"items": [
{
"age": 40,
"albumin_g_l": 42,
"cisplatin_dose_mg": 50,
"citation": {
"authors": "Gupta S, et al.",
"doi": "10.1136/bmj-2023-077169",
"id": "gupta-2024",
"pmid": "38538012",
"source": "BMJ. 2024;384:e077169",
"title": "Derivation and external validation of a simple risk score for predicting severe acute kidney injury after intravenous cisplatin: cohort study"
},
"components": [
{
"factor": "age",
"points": 0,
"present": false,
"value": 40
},
{
"factor": "hypertension",
"points": 0,
"present": false
},
{
"factor": "diabetes",
"points": 0,
"present": false
},
{
"factor": "current_or_former_smoker",
"points": 0,
"present": false
},
{
"factor": "hemoglobin",
"points": 0,
"present": false,
"value": 130
},
{
"factor": "wbc",
"points": 0,
"present": false,
"value": 8
},
{
"factor": "albumin",
"points": 0,
"present": false,
"value": 42
},
{
"factor": "magnesium",
"points": 0,
"present": false,
"value": 0.9
},
{
"factor": "cisplatin_dose",
"points": 0,
"present": false,
"value": 50
}
],
"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": "cp_aki",
"formula_expression": "CP-AKI simple = age (≤45 0; 46-60 2.5; 61-70 3.5; >70 4.5) + hypertension 1 + diabetes 1 + current_or_former_smoker 1 + hemoglobin_g_l (≥120 0; 110-119 1; <110 1.5) + wbc_10e9_l (≤12.0 0; >12.0 1.5) + albumin_g_l (>38 0; 33-38 1; <33 1.5) + magnesium_mmol_l (≥0.82 0; <0.82 1) + cisplatin_dose_mg (≤50 0; 51-75 2; 76-100 2.5; 101-125 3; 126-150 5; 151-200 7.5; >200 9.5); Gupta 2024 Figure 2 odds-ratio points; max 22.5; no creatinine; no platelets; low 0-5.5 / moderate 6-9.5 / high 10-15.5 / very_high ≥16",
"hemoglobin_g_l": 130,
"magnesium_mmol_l": 0.9,
"max_score": 22.5,
"risk_group": "low",
"score": 0,
"wbc_10e9_l": 8
},
{
"age": 40,
"albumin_g_l": 42,
"cisplatin_dose_mg": 50,
"citation": {
"authors": "Gupta S, et al.",
"doi": "10.1136/bmj-2023-077169",
"id": "gupta-2024",
"pmid": "38538012",
"source": "BMJ. 2024;384:e077169",
"title": "Derivation and external validation of a simple risk score for predicting severe acute kidney injury after intravenous cisplatin: cohort study"
},
"components": [
{
"factor": "age",
"points": 0,
"present": false,
"value": 40
},
{
"factor": "hypertension",
"points": 0,
"present": false
},
{
"factor": "diabetes",
"points": 0,
"present": false
},
{
"factor": "current_or_former_smoker",
"points": 0,
"present": false
},
{
"factor": "hemoglobin",
"points": 0,
"present": false,
"value": 130
},
{
"factor": "wbc",
"points": 0,
"present": false,
"value": 8
},
{
"factor": "albumin",
"points": 0,
"present": false,
"value": 42
},
{
"factor": "magnesium",
"points": 0,
"present": false,
"value": 0.9
},
{
"factor": "cisplatin_dose",
"points": 0,
"present": false,
"value": 50
}
],
"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": "cp_aki",
"formula_expression": "CP-AKI simple = age (≤45 0; 46-60 2.5; 61-70 3.5; >70 4.5) + hypertension 1 + diabetes 1 + current_or_former_smoker 1 + hemoglobin_g_l (≥120 0; 110-119 1; <110 1.5) + wbc_10e9_l (≤12.0 0; >12.0 1.5) + albumin_g_l (>38 0; 33-38 1; <33 1.5) + magnesium_mmol_l (≥0.82 0; <0.82 1) + cisplatin_dose_mg (≤50 0; 51-75 2; 76-100 2.5; 101-125 3; 126-150 5; 151-200 7.5; >200 9.5); Gupta 2024 Figure 2 odds-ratio points; max 22.5; no creatinine; no platelets; low 0-5.5 / moderate 6-9.5 / high 10-15.5 / very_high ≥16",
"hemoglobin_g_l": 130,
"magnesium_mmol_l": 0.9,
"max_score": 22.5,
"risk_group": "low",
"score": 0,
"wbc_10e9_l": 8
}
],
"path": "/api/calc/cp_aki"
}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/cp_aki' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"age":40,"albumin_g_dl":4.2,"albumin_g_l":42,"cisplatin_dose_mg":50,"current_or_former_smoker":false,"diabetes":false,"hemoglobin_g_dl":13,"hemoglobin_g_l":130,"hypertension":false,"magnesium_mmol_l":0.9,"wbc_k_ul":8,"wbc_ul":8000},{"age":40,"albumin_g_dl":4.2,"albumin_g_l":42,"cisplatin_dose_mg":50,"current_or_former_smoker":false,"diabetes":false,"hemoglobin_g_dl":13,"hemoglobin_g_l":130,"hypertension":false,"magnesium_mmol_l":0.9,"wbc_k_ul":8,"wbc_ul":8000}]}'
# 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/cp_aki' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"age":40,"albumin_g_dl":4.2,"albumin_g_l":42,"cisplatin_dose_mg":50,"current_or_former_smoker":false,"diabetes":false,"hemoglobin_g_dl":13,"hemoglobin_g_l":130,"hypertension":false,"magnesium_mmol_l":0.9,"wbc_k_ul":8,"wbc_ul":8000},{"age":40,"albumin_g_dl":4.2,"albumin_g_l":42,"cisplatin_dose_mg":50,"current_or_former_smoker":false,"diabetes":false,"hemoglobin_g_dl":13,"hemoglobin_g_l":130,"hypertension":false,"magnesium_mmol_l":0.9,"wbc_k_ul":8,"wbc_ul":8000}]}' \
| 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%2Fcp_aki&method=POST
const res = await pay("https://api.magentlab.com/api/calc/cp_aki", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"items": [
{
"age": 40,
"albumin_g_dl": 4.2,
"albumin_g_l": 42,
"cisplatin_dose_mg": 50,
"current_or_former_smoker": false,
"diabetes": false,
"hemoglobin_g_dl": 13,
"hemoglobin_g_l": 130,
"hypertension": false,
"magnesium_mmol_l": 0.9,
"wbc_k_ul": 8,
"wbc_ul": 8000
},
{
"age": 40,
"albumin_g_dl": 4.2,
"albumin_g_l": 42,
"cisplatin_dose_mg": 50,
"current_or_former_smoker": false,
"diabetes": false,
"hemoglobin_g_dl": 13,
"hemoglobin_g_l": 130,
"hypertension": false,
"magnesium_mmol_l": 0.9,
"wbc_k_ul": 8,
"wbc_ul": 8000
}
]
}),
});
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/cp_aki",
json={
"items": [
{
"age": 40,
"albumin_g_dl": 4.2,
"albumin_g_l": 42,
"cisplatin_dose_mg": 50,
"current_or_former_smoker": False,
"diabetes": False,
"hemoglobin_g_dl": 13,
"hemoglobin_g_l": 130,
"hypertension": False,
"magnesium_mmol_l": 0.9,
"wbc_k_ul": 8,
"wbc_ul": 8000,
},
{
"age": 40,
"albumin_g_dl": 4.2,
"albumin_g_l": 42,
"cisplatin_dose_mg": 50,
"current_or_former_smoker": False,
"diabetes": False,
"hemoglobin_g_dl": 13,
"hemoglobin_g_l": 130,
"hypertension": False,
"magnesium_mmol_l": 0.9,
"wbc_k_ul": 8,
"wbc_ul": 8000,
},
],
},
)
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 |
|---|---|---|---|---|
| 3 h ago | Passed | 402 | 321 ms | $0.005 |
| 7 h ago | Passed | 402 | 144 ms | $0.005 |
| 12 h ago | Passed | 402 | 271 ms | $0.005 |
| 16 h ago | Passed | 402 | 472 ms | $0.005 |
| 20 h ago | Passed | 402 | 384 ms | $0.005 |
Show 10 older checks
| 25 h ago | Passed | 402 | 332 ms | $0.005 |
| 29 h ago | Passed | 402 | 408 ms | $0.005 |
| 33 h ago | Passed | 402 | 258 ms | $0.005 |
| 37 h ago | Passed | 402 | 318 ms | $0.005 |
| 42 h ago | Passed | 402 | 297 ms | $0.005 |
| 46 h ago | Passed | 402 | 272 ms | $0.005 |
| 2 days ago | Passed | 402 | 282 ms | $0.005 |
| 2 days ago | Passed | 402 | 332 ms | $0.005 |
| 2 days ago | Passed | 402 | 306 ms | $0.005 |
| 3 days ago | Passed | 402 | 153 ms | $0.005 |