Calc Save
by magent in Other
Schmidt 2015 SAVE-score from Table 4 integer cells plus constant −6. Age, weight, additive diagnoses, chronic renal failure, acute liver/CNS/renal failure, intubation hours, PIP ≤20, cardiac arrest, diastolic BP ≥40, pulse pressure ≤20, bicarbonate ≤15. Class I–V hospital survival 75/58/42/30/18%. Range −35 to 17. Not a VA-ECMO assignment. Not modified SAVE.
https://api.magentlab.com/api/calc/save- Price
- $0.007
- per call in USDC
- Uptime
- 100%
- last 30 days
- Response time
- 179 ms
- 341 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/save
Each call costs $0.007 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/save
content-type: application/json
{
"items": [
{
"acute_renal_failure": false,
"age": 70,
"bicarbonate_mmol_l": 24,
"chronic_renal_failure": false,
"cns_dysfunction": false,
"congenital_heart_disease": false,
"diastolic_bp_mm_hg": 35,
"intubation_hours": 5,
"liver_failure": false,
"myocarditis": false,
"pip_cmh2o": 25,
"post_heart_or_lung_transplant": false,
"pre_ecmo_cardiac_arrest": false,
"pulse_pressure_mm_hg": 40,
"refractory_vt_vf": false,
"weight_kg": 95
},
{
"acute_renal_failure": false,
"age": 70,
"bicarbonate_mmol_l": 24,
"chronic_renal_failure": false,
"cns_dysfunction": false,
"congenital_heart_disease": false,
"diastolic_bp_mm_hg": 35,
"intubation_hours": 5,
"liver_failure": false,
"myocarditis": false,
"pip_cmh2o": 25,
"post_heart_or_lung_transplant": false,
"pre_ecmo_cardiac_arrest": false,
"pulse_pressure_mm_hg": 40,
"refractory_vt_vf": false,
"weight_kg": 95
}
]
}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, 230 lines
{
"count": 2,
"items": [
{
"citation": {
"authors": "Schmidt M, Burrell A, Roberts L, et al.",
"doi": "10.1093/eurheartj/ehv194",
"id": "schmidt-2015",
"pmid": "26033984",
"source": "Eur Heart J. 2015;36(33):2246-2256",
"title": "Predicting survival after ECMO for refractory cardiogenic shock: the survival after veno-arterial-ECMO (SAVE)-score"
},
"components": [
{
"factor": "myocarditis",
"points": 0,
"present": false
},
{
"factor": "refractory_vt_vf",
"points": 0,
"present": false
},
{
"factor": "post_heart_or_lung_transplant",
"points": 0,
"present": false
},
{
"factor": "congenital_heart_disease",
"points": 0,
"present": false
},
{
"factor": "age",
"points": 0,
"present": false,
"value": 70
},
{
"factor": "weight_kg",
"points": 0,
"present": false,
"value": 95
},
{
"factor": "liver_failure",
"points": 0,
"present": false
},
{
"factor": "cns_dysfunction",
"points": 0,
"present": false
},
{
"factor": "acute_renal_failure",
"points": 0,
"present": false
},
{
"factor": "chronic_renal_failure",
"points": 0,
"present": false
},
{
"factor": "intubation_hours",
"points": 0,
"present": false,
"value": 5
},
{
"factor": "pip_cmh2o",
"points": 0,
"present": false,
"value": 25
},
{
"factor": "pre_ecmo_cardiac_arrest",
"points": 0,
"present": false
},
{
"factor": "diastolic_bp_mm_hg",
"points": 0,
"present": false,
"value": 35
},
{
"factor": "pulse_pressure_mm_hg",
"points": 0,
"present": false,
"value": 40
},
{
"factor": "bicarbonate_mmol_l",
"points": 0,
"present": false,
"value": 24
},
{
"factor": "constant",
"points": -6,
"present": true
}
],
"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": "save",
"formula_expression": "SAVE = constant(−6) + age(18–38 → 7, 39–52 → 4, 53–62 → 3, ≥63 → 0) + weight_kg(≤65 → 1, 66–89 → 2, ≥90 → 0) + myocarditis(3) + refractory_vt_vf(2) + post_heart_or_lung_transplant(3) + congenital_heart_disease(−3) + liver_failure(−3) + cns_dysfunction(−3) + acute_renal_failure(−3) + chronic_renal_failure(−6) + intubation_hours(≤10 → 0, 11–29 → −2, ≥30 → −4) + pip_cmh2o(≤20 → 3) + pre_ecmo_cardiac_arrest(−2) + diastolic_bp_mm_hg(≥40 → 3) + pulse_pressure_mm_hg(≤20 → −2) + bicarbonate_mmol_l(≤15 → −3); diagnoses and acute organ failures may stack (Table 4 select one or more); other diagnoses 0; range −35 to 17; class I >5 → 75%, II 1–5 → 58%, III −4 to 0 → 42%, IV −9 to −5 → 30%, V ≤−10 → 18%",
"hospital_survival_percent": 30,
"max_score": 17,
"min_score": -35,
"save_class": "IV",
"score": -6
},
{
"citation": {
"authors": "Schmidt M, Burrell A, Roberts L, et al.",
"doi": "10.1093/eurheartj/ehv194",
"id": "schmidt-2015",
"pmid": "26033984",
"source": "Eur Heart J. 2015;36(33):2246-2256",
"title": "Predicting survival after ECMO for refractory cardiogenic shock: the survival after veno-arterial-ECMO (SAVE)-score"
},
"components": [
{
"factor": "myocarditis",
"points": 0,
"present": false
},
{
"factor": "refractory_vt_vf",
"points": 0,
"present": false
},
{
"factor": "post_heart_or_lung_transplant",
"points": 0,
"present": false
},
{
"factor": "congenital_heart_disease",
"points": 0,
"present": false
},
{
"factor": "age",
"points": 0,
"present": false,
"value": 70
},
{
"factor": "weight_kg",
"points": 0,
"present": false,
"value": 95
},
{
"factor": "liver_failure",
"points": 0,
"present": false
},
{
"factor": "cns_dysfunction",
"points": 0,
"present": false
},
{
"factor": "acute_renal_failure",
"points": 0,
"present": false
},
{
"factor": "chronic_renal_failure",
"points": 0,
"present": false
},
{
"factor": "intubation_hours",
"points": 0,
"present": false,
"value": 5
},
{
"factor": "pip_cmh2o",
"points": 0,
"present": false,
"value": 25
},
{
"factor": "pre_ecmo_cardiac_arrest",
"points": 0,
"present": false
},
{
"factor": "diastolic_bp_mm_hg",
"points": 0,
"present": false,
"value": 35
},
{
"factor": "pulse_pressure_mm_hg",
"points": 0,
"present": false,
"value": 40
},
{
"factor": "bicarbonate_mmol_l",
"points": 0,
"present": false,
"value": 24
},
{
"factor": "constant",
"points": -6,
"present": true
}
],
"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": "save",
"formula_expression": "SAVE = constant(−6) + age(18–38 → 7, 39–52 → 4, 53–62 → 3, ≥63 → 0) + weight_kg(≤65 → 1, 66–89 → 2, ≥90 → 0) + myocarditis(3) + refractory_vt_vf(2) + post_heart_or_lung_transplant(3) + congenital_heart_disease(−3) + liver_failure(−3) + cns_dysfunction(−3) + acute_renal_failure(−3) + chronic_renal_failure(−6) + intubation_hours(≤10 → 0, 11–29 → −2, ≥30 → −4) + pip_cmh2o(≤20 → 3) + pre_ecmo_cardiac_arrest(−2) + diastolic_bp_mm_hg(≥40 → 3) + pulse_pressure_mm_hg(≤20 → −2) + bicarbonate_mmol_l(≤15 → −3); diagnoses and acute organ failures may stack (Table 4 select one or more); other diagnoses 0; range −35 to 17; class I >5 → 75%, II 1–5 → 58%, III −4 to 0 → 42%, IV −9 to −5 → 30%, V ≤−10 → 18%",
"hospital_survival_percent": 30,
"max_score": 17,
"min_score": -35,
"save_class": "IV",
"score": -6
}
],
"path": "/api/calc/save"
}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.007.
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/save' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"acute_renal_failure":false,"age":70,"bicarbonate_mmol_l":24,"chronic_renal_failure":false,"cns_dysfunction":false,"congenital_heart_disease":false,"diastolic_bp_mm_hg":35,"intubation_hours":5,"liver_failure":false,"myocarditis":false,"pip_cmh2o":25,"post_heart_or_lung_transplant":false,"pre_ecmo_cardiac_arrest":false,"pulse_pressure_mm_hg":40,"refractory_vt_vf":false,"weight_kg":95},{"acute_renal_failure":false,"age":70,"bicarbonate_mmol_l":24,"chronic_renal_failure":false,"cns_dysfunction":false,"congenital_heart_disease":false,"diastolic_bp_mm_hg":35,"intubation_hours":5,"liver_failure":false,"myocarditis":false,"pip_cmh2o":25,"post_heart_or_lung_transplant":false,"pre_ecmo_cardiac_arrest":false,"pulse_pressure_mm_hg":40,"refractory_vt_vf":false,"weight_kg":95}]}'
# 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/save' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"acute_renal_failure":false,"age":70,"bicarbonate_mmol_l":24,"chronic_renal_failure":false,"cns_dysfunction":false,"congenital_heart_disease":false,"diastolic_bp_mm_hg":35,"intubation_hours":5,"liver_failure":false,"myocarditis":false,"pip_cmh2o":25,"post_heart_or_lung_transplant":false,"pre_ecmo_cardiac_arrest":false,"pulse_pressure_mm_hg":40,"refractory_vt_vf":false,"weight_kg":95},{"acute_renal_failure":false,"age":70,"bicarbonate_mmol_l":24,"chronic_renal_failure":false,"cns_dysfunction":false,"congenital_heart_disease":false,"diastolic_bp_mm_hg":35,"intubation_hours":5,"liver_failure":false,"myocarditis":false,"pip_cmh2o":25,"post_heart_or_lung_transplant":false,"pre_ecmo_cardiac_arrest":false,"pulse_pressure_mm_hg":40,"refractory_vt_vf":false,"weight_kg":95}]}' \
| 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.007 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.007" });
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.007 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.magentlab.com%2Fapi%2Fcalc%2Fsave&method=POST
const res = await pay("https://api.magentlab.com/api/calc/save", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"items": [
{
"acute_renal_failure": false,
"age": 70,
"bicarbonate_mmol_l": 24,
"chronic_renal_failure": false,
"cns_dysfunction": false,
"congenital_heart_disease": false,
"diastolic_bp_mm_hg": 35,
"intubation_hours": 5,
"liver_failure": false,
"myocarditis": false,
"pip_cmh2o": 25,
"post_heart_or_lung_transplant": false,
"pre_ecmo_cardiac_arrest": false,
"pulse_pressure_mm_hg": 40,
"refractory_vt_vf": false,
"weight_kg": 95
},
{
"acute_renal_failure": false,
"age": 70,
"bicarbonate_mmol_l": 24,
"chronic_renal_failure": false,
"cns_dysfunction": false,
"congenital_heart_disease": false,
"diastolic_bp_mm_hg": 35,
"intubation_hours": 5,
"liver_failure": false,
"myocarditis": false,
"pip_cmh2o": 25,
"post_heart_or_lung_transplant": false,
"pre_ecmo_cardiac_arrest": false,
"pulse_pressure_mm_hg": 40,
"refractory_vt_vf": false,
"weight_kg": 95
}
]
}),
});
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.007 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.007"})
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/save",
json={
"items": [
{
"acute_renal_failure": False,
"age": 70,
"bicarbonate_mmol_l": 24,
"chronic_renal_failure": False,
"cns_dysfunction": False,
"congenital_heart_disease": False,
"diastolic_bp_mm_hg": 35,
"intubation_hours": 5,
"liver_failure": False,
"myocarditis": False,
"pip_cmh2o": 25,
"post_heart_or_lung_transplant": False,
"pre_ecmo_cardiac_arrest": False,
"pulse_pressure_mm_hg": 40,
"refractory_vt_vf": False,
"weight_kg": 95,
},
{
"acute_renal_failure": False,
"age": 70,
"bicarbonate_mmol_l": 24,
"chronic_renal_failure": False,
"cns_dysfunction": False,
"congenital_heart_disease": False,
"diastolic_bp_mm_hg": 35,
"intubation_hours": 5,
"liver_failure": False,
"myocarditis": False,
"pip_cmh2o": 25,
"post_heart_or_lung_transplant": False,
"pre_ecmo_cardiac_arrest": False,
"pulse_pressure_mm_hg": 40,
"refractory_vt_vf": False,
"weight_kg": 95,
},
],
},
)
print(res.status_code, res.text)Security scan
1 finding
- Charges more than its listed price in payment
Listed at $0.005, charges $0.007
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 3 h ago | Passed | 402 | 182 ms | $0.007 |
| 8 h ago | Passed | 402 | 179 ms | $0.007 |
| 13 h ago | Passed | 402 | 257 ms | $0.007 |
| 17 h ago | Passed | 402 | 177 ms | $0.007 |
| 22 h ago | Passed | 402 | 181 ms | $0.007 |
Show 10 older checks
| 26 h ago | Passed | 402 | 210 ms | $0.007 |
| 30 h ago | Passed | 402 | 281 ms | $0.007 |
| 34 h ago | Passed | 402 | 179 ms | $0.007 |
| 39 h ago | Passed | 402 | 180 ms | $0.007 |
| 43 h ago | Passed | 402 | 190 ms | $0.007 |
| 47 h ago | Passed | 402 | 298 ms | $0.007 |
| 2 days ago | Passed | 402 | 147 ms | $0.007 |
| 2 days ago | Passed | 402 | 341 ms | $0.007 |
| 3 days ago | Passed | 402 | 147 ms | $0.007 |
| 3 days ago | Passed | 402 | 172 ms | $0.007 |
History
| 11 Oct 2026 | Price changed from $0.005 to $0.007 |