# Gupta 2013 Postoperative Pneumonia Risk Calculator

> Gupta 2013 Postoperative Pneumonia Risk 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).

Calculates the Gupta 2013 (Mayo Clin Proc) logistic probability of postoperative pneumonia from age, COPD, ASA class, functional status, preoperative sepsis, smoking, and surgery type

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/gupta_pneumonia
- 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/gupta-2013-postoperative-pneumonia-risk-calculator-7a910320
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fMOnaFimOTBFlzGtO8X1u

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 gupta-2013-postoperative-pneumonia-risk-calculator-7a910320
```

Example prompt: What is the Gupta 2013 postoperative pneumonia probability for a 67-year-old patient with COPD, ASA class 3, independent functional status, preoperative SIRS, who smoked in the last year and is scheduled for thoracic surgery?

## When to prefer this

Use this endpoint when you need the validated Gupta 2013 Mayo Clinic Proceedings logistic regression estimate specifically — not a generic pneumonia risk heuristic. Prefer it over manual calculation to avoid arithmetic error in the logistic model coefficients. It is appropriate for perioperative decision-support workflows where a published, peer-reviewed probability estimate is required. It does not use race as a predictor and does not define actionable cutoffs, consistent with the source publication.

## Known failure modes

- Missing required query parameters (age, copd, functional_status, asa_class, sepsis, smoking, surgery) returns a validation error
- Age outside the 18-120 range may be rejected
- Invalid enum values for surgery, sepsis, or functional_status return an error
- Payment not provided or invalid x402 payment results in 402 response
- Network timeout or server error returns 5xx

## How this service works

Gupta 2013 Mayo Clin Proc logistic probability of postoperative pneumonia from age, COPD, ASA class, functional status, preoperative sepsis, smoking in the last year, and surgery type (hernia reference). Returns logit and estimated_probability_percent. Not a medical device, not a diagnosis, not an antibiotic order, and not a ventilator order. Gupta 2013 publishes no low/high cutoff and does not use race.

## Output

Returns a JSON object containing the logit (log-odds value from the Gupta 2013 logistic regression model) and estimated_probability_percent (the probability of postoperative pneumonia expressed as a percentage), with no low/high cutoff defined by the original publication.

## 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",
      "copd",
      "functional_status",
      "asa_class",
      "sepsis",
      "smoking",
      "surgery"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (18-120). Gupta 2013 Mayo Clin Proc: +0.0144 per year."
      },
      "copd": {
       "type": "boolean",
       "description": "Gupta 2013 COPD causing functional disability or hospitalization, or FEV1 <75%, as assigned by the caller: true (reference, 0) or false (-0.4553). magent does not diagnose COPD."
      },
      "sepsis": {
       "enum": [
        "none",
        "sirs",
        "sepsis",
        "septic_shock"
       ],
       "type": "string",
       "description": "Gupta 2013 Mayo Clin Proc preoperative sepsis category as assigned by the caller: none (-0.7641), sirs (reference, 0), sepsis (-0.0842), or septic_shock (+0.1048). magent does not diagnose sepsis."
      },
      "smoking": {
       "type": "boolean",
       "description": "Gupta 2013 smoking within the last year as assigned by the caller: true (reference, 0) or false (-0.4306)."
      },
      "surgery": {
       "enum": [
        "hernia",
        "anorectal",
        "aortic",
        "bariatric",
        "brain",
        "breast",
        "cardiac",
        "ent",
        "foregut_hpb",
        "gbaas",
        "intestinal",
        "neck",
        "obstetric_gynecologic",
        "orthopedic",
        "other_abdomen",
        "peripheral_vascular",
        "skin",
        "spine",
        "thoracic",
        "vein",
        "urology"
       ],
       "type": "string",
       "description": "Gupta 2013 Mayo Clin Proc procedure category as assigned by the caller. hernia (ventral, inguinal, or femoral) is the reference (0). gbaas is gallbladder, appendix, adrenal, or spleen. thoracic is non-esophageal thoracic. orthopedic is orthopedic or non-vascular extremity. ent excludes thyroid/parathyroi
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gupta-2013-postoperative-pneumonia-risk-calculator-7a910320/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)
