Calc Saps 3
by magent in Documents & files
Moreno 2005 SAPS 3 admission score from caller-assigned ICU-hour boxes (age, comorbidities, stay, location, vasoactive drugs, admission circumstances, and ten physiology items) plus the published 16-point offset. Converts the integer to hospital-mortality percent with the Part 2 global logit. Not SAPS II. Not APACHE. magent does not measure vitals.
https://api.magentlab.com/api/calc/saps_3- Price
- $0.007
- per call in USDC
- Uptime
- 91.4%
- last 30 days
- Response time
- 372 ms
- 654 ms slowest 5%
- Last check
- Failed
- 5 h ago, next any minute now
Reliability
Latest check failed 5 h ago: Timed out
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://api.magentlab.com/api/calc/saps_3
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/saps_3
content-type: application/json
{
"items": [
{
"acute_abdomen": false,
"age": 35,
"aids": false,
"anaphylactic_or_mixed_shock": false,
"arterial_ph": 7.4,
"bilirubin_mg_dl": 0.8,
"bilirubin_umol_l": 14,
"cancer_therapy": false,
"chronic_hf_nyha_iv": false,
"cirrhosis": false,
"coma_stupor_agitation": false,
"creatinine_mg_dl": 1,
"creatinine_umol_l": 88,
"focal_neurologic_deficit": false,
"gcs": 15,
"heart_rate": 80,
"hematologic_cancer": false,
"hypovolemic_shock": false,
"icu_admission": "planned",
"intracranial_mass_effect": false,
"leukocytes_g_l": 8,
"liver_failure": false,
"location": "operating_room",
"los_days": 1,
"mechanical_ventilation": false,
"metastatic_cancer": false,
"nosocomial_infection": false,
"pao2_fio2": 250,
"pao2_mm_hg": 90,
"platelets_g_l": 250,
"respiratory_infection": false,
"rhythm_disturbances": false,
"seizures": false,
"septic_shock": false,
"severe_pancreatitis": false,
"surgery_site": "all_others",
"surgical_status": "scheduled_surgery",
"systolic_bp_mm_hg": 120,
"temperature_c": 37,
"vasoactive_drugs": false
},
{
"acute_abdomen": false,
"age": 35,
"aids": false,
"anaphylactic_or_mixed_shock": false,
"arterial_ph": 7.4,
"bilirubin_mg_dl": 0.8,
"bilirubin_umol_l": 14,
"cancer_therapy": false,
"chronic_hf_nyha_iv": false,
"cirrhosis": false,
"coma_stupor_agitation": false,
"creatinine_mg_dl": 1,
"creatinine_umol_l": 88,
"focal_neurologic_deficit": false,
"gcs": 15,
"heart_rate": 80,
"hematologic_cancer": false,
"hypovolemic_shock": false,
"icu_admission": "planned",
"intracranial_mass_effect": false,
"leukocytes_g_l": 8,
"liver_failure": false,
"location": "operating_room",
"los_days": 1,
"mechanical_ventilation": false,
"metastatic_cancer": false,
"nosocomial_infection": false,
"pao2_fio2": 250,
"pao2_mm_hg": 90,
"platelets_g_l": 250,
"respiratory_infection": false,
"rhythm_disturbances": false,
"seizures": false,
"septic_shock": false,
"severe_pancreatitis": false,
"surgery_site": "all_others",
"surgical_status": "scheduled_surgery",
"systolic_bp_mm_hg": 120,
"temperature_c": 37,
"vasoactive_drugs": false
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
items | array of object | Yes |
Example response
The provider's example. We can't check it without paying. Shortened for display.
Example response, 301 lines
{
"count": 2,
"items": [
{
"citation": {
"authors": "Moreno RP, Metnitz PGH, Almeida E, et al; SAPS 3 Investigators",
"doi": "10.1007/s00134-005-2763-5",
"id": "moreno-2005",
"pmid": "16132893",
"source": "Intensive Care Med. 2005;31(10):1345-1355",
"title": "SAPS 3—From evaluation of the patient to evaluation of the intensive care unit. Part 2: Development of a prognostic model for hospital mortality at ICU admission"
},
"components": [
{
"factor": "admission_offset",
"points": 16,
"present": true,
"value": 16
},
{
"factor": "age",
"points": 0,
"present": false,
"value": 35
},
{
"factor": "los_days",
"points": 0,
"present": false,
"value": 1
},
{
"factor": "location",
"points": 0,
"present": false,
"value": "operating_room"
},
{
"aids": false,
"cancer_therapy": false,
"chronic_hf_nyha_iv": false,
"cirrhosis": false,
"factor": "comorbidities",
"hematologic_cancer": false,
"metastatic_cancer": false,
"points": 0,
"present": false
},
{
"factor": "vasoactive_drugs",
"points": 0,
"present": false,
"value": false
},
{
"factor": "icu_admission",
"points": 0,
"present": false,
"value": "planned"
},
{
"acute_abdomen": false,
"anaphylactic_or_mixed_shock": false,
"coma_stupor_agitation": false,
"factor": "reasons_for_admission",
"focal_neurologic_deficit": false,
"hypovolemic_shock": false,
"intracranial_mass_effect": false,
"liver_failure": false,
"points": 0,
"present": false,
"rhythm_disturbances": false,
"seizures": false,
"septic_shock": false,
"severe_pancreatitis": false
},
{
"factor": "surgical_status",
"points": 0,
"present": false,
"value": "scheduled_surgery"
},
{
"factor": "surgery_site",
"points": 0,
"present": false,
"value": "all_others"
},
{
"factor": "infection",
"nosocomial_infection": false,
"points": 0,
"present": false,
"respiratory_infection": false
},
{
"factor": "gcs",
"points": 0,
"present": false,
"value": 15
},
{
"branch": "bilirubin_mg_dl",
"factor": "bilirubin",
"points": 0,
"present": false,
"value": 0.8
},
{
"factor": "temperature_c",
"points": 0,
"present": false,
"value": 37
},
{
"branch": "creatinine_mg_dl",
"factor": "creatinine",
"points": 0,
"present": false,
"value": 1
},
{
"factor": "heart_rate",
"points": 0,
"present": false,
"value": 80
},
{
"factor": "leukocytes_g_l",
"points": 0,
"present": false,
"value": 8
},
{
"factor": "arterial_ph",
"points": 0,
"present": false,
"value": 7.4
},
{
"factor": "platelets_g_l",
"points": 0,
"present": false,
"value": 250
},
{
"factor": "systolic_bp_mm_hg",
"points": 0,
"present": false,
"value": 120
}
],
"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.",
"estimated_probability_percent": 0.17,
"formula": "saps_3",
"formula_expression": "SAPS 3 = 16 (admission offset) + Box I + Box II + Box III (Moreno 2005 Part 2 scoresheet). Box I: age (<40 → 0, 40-59 → 5, 60-69 → 9, 70-74 → 13, 75-79 → 15, ≥80 → 18); los_days (<14 → 0, 14-27 → 6, ≥28 → 7); location (operating_room → 0, emergency_room → 5, other_icu → 7, other → 8); comorbidities additive (cancer_therapy → 3, metastatic_cancer → 11, hematologic_cancer → 6, chronic_hf_nyha_iv → 6, cirrhosis → 8, aids → 8); vasoactive_drugs → 3. Box II: unplanned ICU admission → 3; reasons additive (rhythm_disturbances → -5, hypovolemic_shock → 3, septic_shock → 5, anaphylactic_or_mixed_shock → 5, liver_failure → 6, severe_pancreatitis → 9, acute_abdomen → 3, intracranial_mass_effect → 10, focal_neurologic_deficit → 7, seizures → -4, coma_stupor_agitation → 4; if rhythm and seizures both, only -4; hypovolemic_shock plus acute_abdomen scores both); surgical_status (scheduled_surgery → 0, emergency_surgery → 6, no_surgery → 5); surgery_site (transplantation → -11, trauma_isolated or tra…",
"logit": -6.3619,
"max_score": 217,
"score": 16
},
{
"citation": {
"authors": "Moreno RP, Metnitz PGH, Almeida E, et al; SAPS 3 Investigators",
"doi": "10.1007/s00134-005-2763-5",
"id": "moreno-2005",
"pmid": "16132893",
"source": "Intensive Care Med. 2005;31(10):1345-1355",
"title": "SAPS 3—From evaluation of the patient to evaluation of the intensive care unit. Part 2: Development of a prognostic model for hospital mortality at ICU admission"
},
"components": [
{
"factor": "admission_offset",
"points": 16,
"present": true,
"value": 16
},
{
"factor": "age",
"points": 0,
"present": false,
"value": 35
},
{
"factor": "los_days",
"points": 0,
"present": false,
"value": 1
},
{
"factor": "location",
"points": 0,
"present": false,
"value": "operating_room"
},
{
"aids": false,
"cancer_therapy": false,
"chronic_hf_nyha_iv": false,
"cirrhosis": false,
"factor": "comorbidities",
"hematologic_cancer": false,
"metastatic_cancer": false,
"points": 0,
"present": false
},
{
"factor": "vasoactive_drugs",
"points": 0,
"present": false,
"value": false
},
{
"factor": "icu_admission",
"points": 0,
"present": false,
"value": "planned"
},
{
"acute_abdomen": false,
"anaphylactic_or_mixed_shock": false,
"coma_stupor_agitation": false,
"factor": "reasons_for_admission",
"focal_neurologic_deficit": false,
"hypovolemic_shock": false,
"intracranial_mass_effect": false,
"liver_failure": false,
"points": 0,
"present": false,
"rhythm_disturbances": false,
"seizures": false,
"septic_shock": false,
"severe_pancreatitis": false
},
{
"factor": "surgical_status",
"points": 0,
"present": false,
"value": "scheduled_surgery"
},
{
"factor": "surgery_site",
"points": 0,
"present": false,
"value": "all_others"
},
{
"factor": "infection",
"nosocomial_infection": false,
"points": 0,
"present": false,
"respiratory_infection": false
},
{
"factor": "gcs",
"points": 0,
"present": false,
"value": 15
},
{
"branch": "bilirubin_mg_dl",
"factor": "bilirubin",
"points": 0,
"present": false,
"value": 0.8
},
{
"factor": "temperature_c",
"points": 0,
"present": false,
"value": 37
},
{
"branch": "creatinine_mg_dl",
"factor": "creatinine",
"points": 0,
"present": false,
"value": 1
},
{
"factor": "heart_rate",
"points": 0,
"present": false,
"value": 80
},
{
"factor": "leukocytes_g_l",
"points": 0,
"present": false,
"value": 8
},
{
"factor": "arterial_ph",
"points": 0,
"present": false,
"value": 7.4
},
{
"factor": "platelets_g_l",
"points": 0,
"present": 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.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/saps_3' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"acute_abdomen":false,"age":35,"aids":false,"anaphylactic_or_mixed_shock":false,"arterial_ph":7.4,"bilirubin_mg_dl":0.8,"bilirubin_umol_l":14,"cancer_therapy":false,"chronic_hf_nyha_iv":false,"cirrhosis":false,"coma_stupor_agitation":false,"creatinine_mg_dl":1,"creatinine_umol_l":88,"focal_neurologic_deficit":false,"gcs":15,"heart_rate":80,"hematologic_cancer":false,"hypovolemic_shock":false,"icu_admission":"planned","intracranial_mass_effect":false,"leukocytes_g_l":8,"liver_failure":false,"location":"operating_room","los_days":1,"mechanical_ventilation":false,"metastatic_cancer":false,"nosocomial_infection":false,"pao2_fio2":250,"pao2_mm_hg":90,"platelets_g_l":250,"respiratory_infection":false,"rhythm_disturbances":false,"seizures":false,"septic_shock":false,"severe_pancreatitis":false,"surgery_site":"all_others","surgical_status":"scheduled_surgery","systolic_bp_mm_hg":120,"temperature_c":37,"vasoactive_drugs":false},{"acute_abdomen":false,"age":35,"aids":false,"anaphylactic_or_mixed_shock":false,"arterial_ph":7.4,"bilirubin_mg_dl":0.8,"bilirubin_umol_l":14,"cancer_therapy":false,"chronic_hf_nyha_iv":false,"cirrhosis":false,"coma_stupor_agitation":false,"creatinine_mg_dl":1,"creatinine_umol_l":88,"focal_neurologic_deficit":false,"gcs":15,"heart_rate":80,"hematologic_cancer":false,"hypovolemic_shock":false,"icu_admission":"planned","intracranial_mass_effect":false,"leukocytes_g_l":8,"liver_failure":false,"location":"operating_room","los_days":1,"mechanical_ventilation":false,"metastatic_cancer":false,"nosocomial_infection":false,"pao2_fio2":250,"pao2_mm_hg":90,"platelets_g_l":250,"respiratory_infection":false,"rhythm_disturbances":false,"seizures":false,"septic_shock":false,"severe_pancreatitis":false,"surgery_site":"all_others","surgical_status":"scheduled_surgery","systolic_bp_mm_hg":120,"temperature_c":37,"vasoactive_drugs":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 - -X POST 'https://api.magentlab.com/api/calc/saps_3' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"acute_abdomen":false,"age":35,"aids":false,"anaphylactic_or_mixed_shock":false,"arterial_ph":7.4,"bilirubin_mg_dl":0.8,"bilirubin_umol_l":14,"cancer_therapy":false,"chronic_hf_nyha_iv":false,"cirrhosis":false,"coma_stupor_agitation":false,"creatinine_mg_dl":1,"creatinine_umol_l":88,"focal_neurologic_deficit":false,"gcs":15,"heart_rate":80,"hematologic_cancer":false,"hypovolemic_shock":false,"icu_admission":"planned","intracranial_mass_effect":false,"leukocytes_g_l":8,"liver_failure":false,"location":"operating_room","los_days":1,"mechanical_ventilation":false,"metastatic_cancer":false,"nosocomial_infection":false,"pao2_fio2":250,"pao2_mm_hg":90,"platelets_g_l":250,"respiratory_infection":false,"rhythm_disturbances":false,"seizures":false,"septic_shock":false,"severe_pancreatitis":false,"surgery_site":"all_others","surgical_status":"scheduled_surgery","systolic_bp_mm_hg":120,"temperature_c":37,"vasoactive_drugs":false},{"acute_abdomen":false,"age":35,"aids":false,"anaphylactic_or_mixed_shock":false,"arterial_ph":7.4,"bilirubin_mg_dl":0.8,"bilirubin_umol_l":14,"cancer_therapy":false,"chronic_hf_nyha_iv":false,"cirrhosis":false,"coma_stupor_agitation":false,"creatinine_mg_dl":1,"creatinine_umol_l":88,"focal_neurologic_deficit":false,"gcs":15,"heart_rate":80,"hematologic_cancer":false,"hypovolemic_shock":false,"icu_admission":"planned","intracranial_mass_effect":false,"leukocytes_g_l":8,"liver_failure":false,"location":"operating_room","los_days":1,"mechanical_ventilation":false,"metastatic_cancer":false,"nosocomial_infection":false,"pao2_fio2":250,"pao2_mm_hg":90,"platelets_g_l":250,"respiratory_infection":false,"rhythm_disturbances":false,"seizures":false,"septic_shock":false,"severe_pancreatitis":false,"surgery_site":"all_others","surgical_status":"scheduled_surgery","systolic_bp_mm_hg":120,"temperature_c":37,"vasoactive_drugs":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.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%2Fsaps_3&method=POST
const res = await pay("https://api.magentlab.com/api/calc/saps_3", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"items": [
{
"acute_abdomen": false,
"age": 35,
"aids": false,
"anaphylactic_or_mixed_shock": false,
"arterial_ph": 7.4,
"bilirubin_mg_dl": 0.8,
"bilirubin_umol_l": 14,
"cancer_therapy": false,
"chronic_hf_nyha_iv": false,
"cirrhosis": false,
"coma_stupor_agitation": false,
"creatinine_mg_dl": 1,
"creatinine_umol_l": 88,
"focal_neurologic_deficit": false,
"gcs": 15,
"heart_rate": 80,
"hematologic_cancer": false,
"hypovolemic_shock": false,
"icu_admission": "planned",
"intracranial_mass_effect": false,
"leukocytes_g_l": 8,
"liver_failure": false,
"location": "operating_room",
"los_days": 1,
"mechanical_ventilation": false,
"metastatic_cancer": false,
"nosocomial_infection": false,
"pao2_fio2": 250,
"pao2_mm_hg": 90,
"platelets_g_l": 250,
"respiratory_infection": false,
"rhythm_disturbances": false,
"seizures": false,
"septic_shock": false,
"severe_pancreatitis": false,
"surgery_site": "all_others",
"surgical_status": "scheduled_surgery",
"systolic_bp_mm_hg": 120,
"temperature_c": 37,
"vasoactive_drugs": false
},
{
"acute_abdomen": false,
"age": 35,
"aids": false,
"anaphylactic_or_mixed_shock": false,
"arterial_ph": 7.4,
"bilirubin_mg_dl": 0.8,
"bilirubin_umol_l": 14,
"cancer_therapy": false,
"chronic_hf_nyha_iv": false,
"cirrhosis": false,
"coma_stupor_agitation": false,
"creatinine_mg_dl": 1,
"creatinine_umol_l": 88,
"focal_neurologic_deficit": false,
"gcs": 15,
"heart_rate": 80,
"hematologic_cancer": false,
"hypovolemic_shock": false,
"icu_admission": "planned",
"intracranial_mass_effect": false,
"leukocytes_g_l": 8,
"liver_failure": false,
"location": "operating_room",
"los_days": 1,
"mechanical_ventilation": false,
"metastatic_cancer": false,
"nosocomial_infection": false,
"pao2_fio2": 250,
"pao2_mm_hg": 90,
"platelets_g_l": 250,
"respiratory_infection": false,
"rhythm_disturbances": false,
"seizures": false,
"septic_shock": false,
"severe_pancreatitis": false,
"surgery_site": "all_others",
"surgical_status": "scheduled_surgery",
"systolic_bp_mm_hg": 120,
"temperature_c": 37,
"vasoactive_drugs": 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.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/saps_3",
json={
"items": [
{
"acute_abdomen": False,
"age": 35,
"aids": False,
"anaphylactic_or_mixed_shock": False,
"arterial_ph": 7.4,
"bilirubin_mg_dl": 0.8,
"bilirubin_umol_l": 14,
"cancer_therapy": False,
"chronic_hf_nyha_iv": False,
"cirrhosis": False,
"coma_stupor_agitation": False,
"creatinine_mg_dl": 1,
"creatinine_umol_l": 88,
"focal_neurologic_deficit": False,
"gcs": 15,
"heart_rate": 80,
"hematologic_cancer": False,
"hypovolemic_shock": False,
"icu_admission": "planned",
"intracranial_mass_effect": False,
"leukocytes_g_l": 8,
"liver_failure": False,
"location": "operating_room",
"los_days": 1,
"mechanical_ventilation": False,
"metastatic_cancer": False,
"nosocomial_infection": False,
"pao2_fio2": 250,
"pao2_mm_hg": 90,
"platelets_g_l": 250,
"respiratory_infection": False,
"rhythm_disturbances": False,
"seizures": False,
"septic_shock": False,
"severe_pancreatitis": False,
"surgery_site": "all_others",
"surgical_status": "scheduled_surgery",
"systolic_bp_mm_hg": 120,
"temperature_c": 37,
"vasoactive_drugs": False,
},
{
"acute_abdomen": False,
"age": 35,
"aids": False,
"anaphylactic_or_mixed_shock": False,
"arterial_ph": 7.4,
"bilirubin_mg_dl": 0.8,
"bilirubin_umol_l": 14,
"cancer_therapy": False,
"chronic_hf_nyha_iv": False,
"cirrhosis": False,
"coma_stupor_agitation": False,
"creatinine_mg_dl": 1,
"creatinine_umol_l": 88,
"focal_neurologic_deficit": False,
"gcs": 15,
"heart_rate": 80,
"hematologic_cancer": False,
"hypovolemic_shock": False,
"icu_admission": "planned",
"intracranial_mass_effect": False,
"leukocytes_g_l": 8,
"liver_failure": False,
"location": "operating_room",
"los_days": 1,
"mechanical_ventilation": False,
"metastatic_cancer": False,
"nosocomial_infection": False,
"pao2_fio2": 250,
"pao2_mm_hg": 90,
"platelets_g_l": 250,
"respiratory_infection": False,
"rhythm_disturbances": False,
"seizures": False,
"septic_shock": False,
"severe_pancreatitis": False,
"surgery_site": "all_others",
"surgical_status": "scheduled_surgery",
"systolic_bp_mm_hg": 120,
"temperature_c": 37,
"vasoactive_drugs": False,
},
],
},
)
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 |
|---|---|---|---|---|
| 5 h ago | Timed out | - | - | - |
| 10 h ago | Timed out | - | - | - |
| 15 h ago | Timed out | - | - | - |
| 20 h ago | Passed | 402 | 346 ms | $0.007 |
| 25 h ago | Passed | 402 | 188 ms | $0.007 |
Show 10 older checks
| 30 h ago | Passed | 402 | 451 ms | $0.007 |
| 34 h ago | Passed | 402 | 350 ms | $0.007 |
| 39 h ago | Passed | 402 | 360 ms | $0.007 |
| 43 h ago | Passed | 402 | 502 ms | $0.007 |
| 2 days ago | Passed | 402 | 474 ms | $0.007 |
| 2 days ago | Passed | 402 | 616 ms | $0.007 |
| 2 days ago | Passed | 402 | 517 ms | $0.007 |
| 3 days ago | Passed | 402 | 164 ms | $0.007 |
| 3 days ago | Passed | 402 | 333 ms | $0.007 |
| 3 days ago | Passed | 402 | 540 ms | $0.007 |
History
| 11 Oct 2026 | Price changed from $0.005 to $0.007 |