# Magent CPIS Calculator (Pugin 1991)

> Magent CPIS Calculator (Pugin 1991) is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-12).

Computes the Clinical Pulmonary Infection Score (CPIS, max 12) using Pugin 1991 criteria from six clinical parameters to aid VAP assessment.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/cpis?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/magent-cpis-calculator-pugin-1991-0717c30c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_R9q5LBm2FsdFCy2yd241y

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 magent-cpis-calculator-pugin-1991-0717c30c
```

Example prompt: Calculate the Pugin 1991 CPIS for my ICU patient: temperature 39.2°C, WBC 13.5 k/µL, band forms ≥50% present, purulent tracheal secretions, PaO2/FiO2 ratio of 210 mmHg, no ARDS, localized chest radiograph infiltrate, and tracheal culture shows pathogen with matching Gram stain.

## When to prefer this

Use this endpoint when you need the original Pugin 1991 CPIS calculation for a mechanically ventilated adult patient using standardized 0–12 scoring. Prefer this over Singh modified CPIS when the unmodified Pugin derivation is required for clinical documentation or research alignment. All six domains (temperature, WBC/bands, secretions, oxygenation, radiology, culture) must be caller-supplied; this endpoint does not interpret images or Gram stains.

## Known failure modes

- Missing required query parameters (temperature_c, wbc_k_ul, bands_ge_50, tracheal_secretions, pf_ratio, ards, chest_radiograph, culture) returns 400 validation error
- temperature_c outside 30.0–45.0 range or pf_ratio outside 20–800 range returns validation error
- Invalid enum value for tracheal_secretions, chest_radiograph, or culture returns 400
- Payment not provided or insufficient (x402 protocol) returns 402 Payment Required
- Network timeout if upstream service is unavailable

## How this service works

Deterministic published-formula arithmetic plus ICD-10-CM, RxNorm, and LOINC. Pay in USDC on Base via x402.

## Output

Returns the total CPIS integer score (0–12) computed per Pugin 1991 criteria, along with per-domain sub-scores for temperature, leukocytes/bands, tracheal secretions, oxygenation, chest radiograph, and culture. A total score >6 correlates with increased probability of VAP per the 1991 derivation. Does not provide a VAP diagnosis and is not the Singh modified CPIS.

## 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",
      "wbc_k_ul",
      "bands_ge_50",
      "tracheal_secretions",
      "pf_ratio",
      "ards",
      "chest_radiograph",
      "culture"
     ],
     "properties": {
      "ards": {
       "type": "boolean",
       "description": "Caller-assigned ARDS. true scores 0 for oxygenation even when pf_ratio ≤240. true or false."
      },
      "culture": {
       "enum": [
        "none",
        "pathogen",
        "pathogen_and_gram"
       ],
       "type": "string",
       "description": "Caller-assigned tracheal-aspirate culture. none scores 0; pathogen (moderate/heavy pathogenic growth) scores 1; pathogen_and_gram (same pathogen on Gram stain) scores 2. magent does not read Gram stains."
      },
      "pf_ratio": {
       "type": "number",
       "description": "PaO2/FiO2 in mm Hg (20-800). >240 or ards=true scores 0; ≤240 and ards=false scores 2 (Pugin 1991)."
      },
      "wbc_k_ul": {
       "type": "number",
       "description": "WBC in 10^3/mm^3 (same as 10^3/µL or 10^9/L). Range 0.01-500. 4.0-11.0 scores 0; <4.0 or >11.0 scores 1. Abnormal WBC plus bands_ge_50 scores 2 for this domain."
      },
      "bands_ge_50": {
       "type": "boolean",
       "description": "Caller-assigned ≥50% band forms (Pugin 1991). true adds 1 only when WBC is already <4.0 or >11.0. true or false."
      },
      "temperature_c": {
       "type": "number",
       "description": "Temperature in °C (30.0-45.0). 36.5-38.4 scores 0; 38.5-38.9 scores 1; ≥39.0 or ≤36.0 scores 2 (Pugin 1991)."
      },
      "chest_radiograph": {
       "enum": [
        "none",
        "diffuse",
        "localized"
       ],
       "type": "string",
       "description": "Caller-assigned chest radiograph. none scores 0; diffuse scores 1; localized scores 2. magent does not read the radiograph."
      },
      "tracheal_secretions": {
       "enum": [
        "none",
        "nonpurulent",
        "p
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/cpis",
  "count": 2,
  "items": [
   {
    "ards": false,
    "score": 0,
    "culture": "none",
    "formula": "cpis",
    "citation": {
     "id": "pugin-1991",
     "doi": "10.1164/ajrccm/143.5_Pt_1.1121",
     "pmid": "2024824",
     "title": "Diagnosis of ventilator-associated pneumonia by bacteriologic analysis of bronchoscopic and nonbronchoscopic \"blind\" bronchoalveolar lavage fluid",
     "source": "Am Rev Respir Dis. 1991;143(5 Pt 1):1121-1129",
     "authors": "Pugin J, Auckenthaler R, Mili N, Janssens JP, Lew PD, Suter PM"
    },
    "pf_ratio": 300,
    "wbc_k_ul": 8,
    "cpis_band": "le_6",
    "max_score": 12,
    "components": [
     {
      "value": 37,
      "factor": "temperature_c",
      "points": 0,
      "present": false
     },
     {
      "value": {
       "wbc_k_ul": 8,
       "bands_ge_50": false
      },
      "factor": "leukocytes",
      "points": 0,
      "present": false
     },
     {
      "value": "none",
      "factor": "tracheal_secretions",
      "points": 0,
      "present": false
     },
     {
      "value": {
       "ards": false,
       "pf_ratio": 300
      },
      "factor": "oxygenation",
      "points": 0,
      "present": false
     },
     {
      "value": "none",
      "factor": "chest_radiograph",
      "points": 0,
      "present": false
     },
     {
      "value": "none",
      "factor": "culture",
      "points": 0,
      "present": false
     }
    ],
    "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.",
    "bands_ge_50": false,
    "temperature_c": 37,
    "chest_radiograph": "none",
    "formula_expression": "CPIS = temperature(36.5-38.4→0, 38.5-38.9→1, ≥39 or ≤36→2) + leukocytes(4.0-11.0→0, <4.0 or >11.0→1, +1 if abnormal and bands_ge_50) + tracheal_secretions(none→0, nonpurulent→1, purulent→2) + oxygenation(pf_ratio>240 or ards→0, pf_ratio≤240 and not ards→2) + chest_radiograph(none→0, diffuse→1, localized→2) + culture(none→0, pathogen→1, pathogen_and_gram→2); Pugin 1991; max 12; CPIS>6 suggests pulmonary infection in that derivation",
    "tracheal_secretions": "none"
   },
   {
    "ards": false,
    "score": 0,
    "culture": "none",
    "formula": "cpis",
    "citation": {
     "id": "pugin-1991",
     "doi": "10.1164/ajrccm/143.5_Pt_1.1121",
     "pmid": "2024824",
     "title": "Diag
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-cpis-calculator-pugin-1991-0717c30c/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)
