# APACHE II Score Calculator

> APACHE 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 integer APACHE II score (0–71) from 12 acute physiology parameters, age, and chronic-health points using the Knaus 1985 methodology

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/apache_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/apache-ii-score-calculator-727a2d68
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_V-EXcX380QLKJX8eC2wh-

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 apache-ii-score-calculator-727a2d68
```

Example prompt: Calculate the APACHE II score for my ICU patient: temperature 38.2°C, MAP 65 mmHg, heart rate 110, respiratory rate 22, FiO2 0.4, arterial pH 7.32, sodium 138, potassium 4.1, creatinine 2.1 mg/dL, hematocrit 32%, WBC 14 k/µL, GCS 13, age 67, chronic health points 2, not elective postop, no acute renal failure — PaO2 is 68 mmHg.

## When to prefer this

Use this endpoint when you need a programmatic, deterministic APACHE II integer score computation conforming to the original Knaus 1985 methodology, including correct oxygenation switching (A-aDO2 vs PaO2 based on FiO2 threshold) and acute renal failure creatinine doubling. Prefer this over general-purpose LLM arithmetic when audit-grade reproducibility of ICU severity scoring is required. Do not use if you need predicted mortality probability — this endpoint returns only the integer score.

## Known failure modes

- Missing required query parameters returns an error — all 16 required fields must be supplied
- Out-of-range values (e.g. age < 16, GCS outside 3–15, FiO2 outside 0.21–1.00) may return a validation error
- Providing aa_gradient when FiO2 < 0.5 or pao2_mm_hg when FiO2 ≥ 0.5 — the unused gas parameter is silently ignored but the required one must be present
- Payment failure (x402) if USDC balance is insufficient or x402 headers are not correctly configured
- Network timeout if the API is temporarily unavailable

## How this service works

Knaus 1985 APACHE II integer: 12 Acute Physiology Score items (worst in 24 hours as assigned by the caller) plus age and chronic-health points, max 71. Oxygenation uses A-aDO2 when FiO2 is at least 0.5 and PaO2 when FiO2 is below 0.5. Creatinine points double in acute renal failure. Does not compute predicted death risk. magent does not measure vitals.

## Output

Returns an integer APACHE II total score (0–71) derived from the sum of the Acute Physiology Score (12 worst-24-hour physiologic variable points), age points, and chronic health points. Oxygenation is scored via A-aDO2 when FiO2 ≥ 0.5 and via PaO2 when FiO2 < 0.5. Creatinine points are doubled when acute renal failure is flagged. Does not include predicted mortality risk percentage.

## 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": [
      "temperature_c",
      "map_mm_hg",
      "heart_rate",
      "respiratory_rate",
      "fio2",
      "arterial_ph",
      "sodium_mmol_l",
      "potassium_mmol_l",
      "creatinine_mg_dl",
      "hematocrit_percent",
      "wbc_k_ul",
      "gcs",
      "age",
      "chronic_health",
      "elective_postop",
      "acute_renal_failure"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years, integer 16-120. ≤44 → 0; 45-54 → 2; 55-64 → 3; 65-74 → 5; ≥75 → 6."
      },
      "gcs": {
       "type": "integer",
       "description": "Glasgow Coma Scale total as assigned by the caller (integer 3-15). APS GCS points = 15 minus gcs. magent does not examine the patient."
      },
      "fio2": {
       "type": "number",
       "description": "Inspired oxygen as a fraction 0.21-1.00, not a percent. If fio2 ≥ 0.5, oxygenation uses aa_gradient. If fio2 < 0.5, oxygenation uses pao2_mm_hg. The unused gas parameter is ignored."
      },
      "wbc_k_ul": {
       "type": "number",
       "description": "White blood count in thousands per mm^3 (0.1-100). ≥40 → 4; 20-39.9 → 2; 15-19.9 → 1; 3-14.9 → 0; 1-2.9 → 2; <1 → 4."
      },
      "map_mm_hg": {
       "type": "number",
       "description": "Mean arterial pressure in mm Hg (20-250). ≥160 → 4; 130-159 → 3; 110-129 → 2; 70-109 → 0; 50-69 → 2; ≤49 → 4. magent does not measure blood pressure."
      },
      "heart_rate": {
       "type": "integer",
       "description": "Heart rate, ventricular response, integer 20-250. ≥180 → 4; 140-179 → 3; 110-139 → 2; 70-109 → 0; 55-69 → 2; 40-54 → 3; ≤39 → 4."
      },
      "pao2_mm_hg": {
       "type": "number",
       "description": "Arterial PaO2 in mm Hg (20-700). Required when fio2 < 0.5. >70 → 0; 61-70 → 1; 55-60 → 3; <55 → 4. Ignored when fio2 ≥ 0.5."
      },
      "aa_gradient": {
       "type": "number",
       "description": "A-aDO2 in mm Hg (0-80
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/apache-ii-score-calculator-727a2d68/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)
