# Berlin ARDS Classification Calculator (magent)

> Berlin ARDS Classification Calculator (magent) 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-14).

Applies the Berlin 2012 definition to classify Acute Respiratory Distress Syndrome (ARDS) as none, mild, moderate, or severe based on caller-supplied clinical flags and PF ratio.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/berlin_ards
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/berlin-ards-classification-calculator-magent-30793dc8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JhSTPw2vyHdNvPJSTbOtU

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 berlin-ards-classification-calculator-magent-30793dc8
```

Example prompt: Classify this patient's ARDS severity using the Berlin 2012 definition: onset was within 1 week, bilateral opacities are present and not fully explained, respiratory failure is not fully explained by heart failure or fluid overload, PEEP is at least 5 cm H2O, and the PF ratio is 155 mmHg.

## When to prefer this

Use this endpoint when you need a fast, deterministic application of the Ranieri 2012 Berlin ARDS definition in a clinical decision support or documentation workflow. It is appropriate when the caller has already interpreted radiology, echocardiography, and clinical history and needs only the formal severity classification computed. Prefer this over manual lookup when integrating ARDS scoring into automated ICU dashboards or EHR pipelines. Do not use if you need the older AECC 1994 definition, the Kigali modification, or the oxygenation index — those are explicitly out of scope.

## Known failure modes

- Missing required query parameters (onset_within_1_week, bilateral_opacities_not_fully_explained, origin_not_fully_hf_or_fluid, peep_ge_5, cpap_ge_5, pf_ratio) return a validation error
- PF ratio outside the accepted range (20–800 mmHg) may be rejected or yield unexpected results
- Misconfigured boolean flags (e.g., treating string 'true' as boolean) may cause schema validation failure
- Payment not provided or invalid x402 credentials result in a 402 Payment Required response
- Caller misattributes CPAP-only as satisfying moderate/severe PEEP requirement — the API correctly requires PEEP ≥5 for those tiers

## How this service works

Berlin Definition of ARDS (Ranieri 2012). berlin_ards iff clinical box (onset within 1 week, bilateral opacities not fully explained, origin not fully HF or fluid) and severity mild, moderate, or severe. Severe: PF<=100 with PEEP>=5. Moderate: 100<PF<=200 with PEEP>=5. Mild: 200<PF<=300 with PEEP or CPAP>=5. Caller assigns flags and pf_ratio. magent does not read radiographs or echo, diagnose ARDS, or set ventilator mode. Not AECC 1994, not Kigali, not the oxygenation index.

## Output

Returns a Berlin ARDS classification result indicating whether the patient meets the clinical box criteria and, if so, the severity tier: mild (PF 200–300 with PEEP/CPAP ≥5), moderate (PF 100–200 with PEEP ≥5), or severe (PF ≤100 with PEEP ≥5), or no ARDS if clinical box criteria are not met.

## 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": [
      "onset_within_1_week",
      "bilateral_opacities_not_fully_explained",
      "origin_not_fully_hf_or_fluid",
      "peep_ge_5",
      "cpap_ge_5",
      "pf_ratio"
     ],
     "properties": {
      "pf_ratio": {
       "type": "number",
       "description": "PaO2/FiO2 ratio in mm Hg (20-800). Caller-supplied; magent does not recompute from PaO2 and FiO2."
      },
      "cpap_ge_5": {
       "type": "boolean",
       "description": "CPAP >= 5 cm H2O as assigned by the caller (counts for mild only; CPAP without PEEP is not moderate or severe). magent does not set ventilator mode."
      },
      "peep_ge_5": {
       "type": "boolean",
       "description": "PEEP >= 5 cm H2O as assigned by the caller (required for moderate and severe; either PEEP or CPAP for mild). magent does not set ventilator mode."
      },
      "onset_within_1_week": {
       "type": "boolean",
       "description": "Onset within 1 week of a known clinical insult or new or worsening respiratory symptoms (Ranieri 2012). true or false as assigned by the caller. magent does not take a history."
      },
      "origin_not_fully_hf_or_fluid": {
       "type": "boolean",
       "description": "Respiratory failure not fully explained by cardiac failure or fluid overload (Ranieri 2012). true or false as assigned by the caller. magent does not read echocardiography."
      },
      "bilateral_opacities_not_fully_explained": {
       "type": "boolean",
       "description": "Bilateral opacities not fully explained by effusions, lobar/lung collapse, or nodules (Ranieri 2012). true or false as assigned by the caller. magent does not read radiographs."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/berlin-ards-classification-calculator-magent-30793dc8/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)
