# SAPS II Score Calculator

> SAPS II Score Calculator is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Computes the Le Gall 1993 SAPS II score (0–163) from 12 physiology variables, age, admission type, and chronic disease, then converts it to a hospital-mortality probability using the original logit.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/saps_ii
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/saps-ii-score-calculator-82dbd82a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_75a8Wr861Hz01aw0iIiAn

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability saps-ii-score-calculator-82dbd82a
```

Example prompt: Calculate a SAPS II score for a 67-year-old ICU patient admitted as a non-operative medical case, no chronic disease, heart rate 110, systolic BP 95, temperature 38.2°C, GCS 12, urine output 0.8 L/day, WBC 14.5, potassium 3.8, sodium 138, bicarbonate 18, and the patient is not ventilated — what's the score and estimated hospital mortality?

## When to prefer this

Use this endpoint when you need a standards-compliant Le Gall 1993 SAPS II score and associated hospital-mortality probability for an adult ICU patient based on worst values in the first 24 hours. Prefer this over APACHE or SAPS 3 calculators when the clinical protocol specifically calls for SAPS II. Not appropriate for pediatric patients (under 18), for real-time vital-sign monitoring, or when you need APACHE II/III or SAPS 3 scoring.

## Known failure modes

- Missing required query parameters (age, heart_rate, systolic_bp_mm_hg, temperature_c, ventilated, urine_output_l_day, wbc_k_ul, potassium_mmol_l, sodium_mmol_l, bicarbonate_meq_l, gcs, admission_type, chronic_disease) returns an error
- pao2_fio2 required but omitted when ventilated=true causes an error
- Values outside accepted ranges (e.g. age <18, GCS outside 3–15) may return validation errors
- Neither urea_mmol_l nor bun_mg_dl provided may cause missing oxygenation or BUN scoring
- Payment not attached or insufficient USDC causes HTTP 402

## How this service works

Le Gall 1993 Simplified Acute Physiology Score II from 12 physiology variables (worst values in the first 24 hours as assigned by the caller), age, type of admission, and one chronic disease (AIDS, metastatic cancer, or hematologic malignancy). Max 163. Converts the integer to hospital-mortality probability with the paper's logit. PaO2/FiO2 is scored only if ventilated or CPAP. Not SAPS 3. Not APACHE. magent does not measure vitals.

## Output

Returns the SAPS II integer score (0–163, summed from the Le Gall 1993 point table) and the corresponding hospital-mortality probability derived from the paper's logistic regression logit. Does not measure or collect any vitals itself — all inputs are caller-supplied worst values from the first 24 ICU hours.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "age",
      "heart_rate",
      "systolic_bp_mm_hg",
      "temperature_c",
      "ventilated",
      "urine_output_l_day",
      "wbc_k_ul",
      "potassium_mmol_l",
      "sodium_mmol_l",
      "bicarbonate_meq_l",
      "gcs",
      "admission_type",
      "chronic_disease"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years, integer 18-120 (Le Gall 1993 excluded patients younger than 18). <40 → 0; 40-59 → 7; 60-69 → 12; 70-74 → 15; 75-79 → 16; ≥80 → 18."
      },
      "gcs": {
       "type": "integer",
       "description": "Glasgow Coma Scale total as assigned by the caller (integer 3-15). <6 → 26; 6-8 → 13; 9-10 → 7; 11-13 → 5; 14-15 → 0. magent does not examine the patient."
      },
      "wbc_k_ul": {
       "type": "number",
       "description": "White blood count in thousands per mm^3 (0-100). <1.0 → 12; 1.0-19.9 → 0; ≥20.0 → 3."
      },
      "bun_mg_dl": {
       "type": "number",
       "description": "Blood urea nitrogen in mg/dL (1-250). Alternate to urea_mmol_l (Le Gall 1993 US column). Ignored when urea_mmol_l is present. <28 → 0; 28-83 → 6; ≥84 → 10. magent does not convert BUN to urea."
      },
      "pao2_fio2": {
       "type": "number",
       "description": "PaO2/FiO2 ratio in mm Hg (10-800). Required when ventilated is true. <100 → 11; 100-199 → 9; ≥200 → 6. Ignored when ventilated is false. magent does not compute the ratio from PaO2 and FiO2."
      },
      "heart_rate": {
       "type": "integer",
       "description": "Heart rate in beats/min, integer 20-250, worst in 24h as assigned by the caller. <40 → 11; 40-69 → 2; 70-119 → 0; 120-159 → 4; ≥160 → 7. magent does not measure pulse."
      },
      "ventilated": {
       "type": "boolean",
       "description": "true if the caller assigns mechanical ventilation or CPAP in the first 24h (Le Gall 1993 PaO2/FiO2 row). false → 0 oxygenation points and 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/saps-ii-score-calculator-82dbd82a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.magentlab.com](https://www.zero.xyz/host/api.magentlab.com/llms.txt)
