# Gupta 2011 Postoperative Respiratory Failure Risk Calculator

> Gupta 2011 Postoperative Respiratory Failure 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 Gupta 2011 Chest logistic probability of postoperative respiratory failure (mechanical ventilation >48h or unplanned intubation within 30 days) from ASA class, functional status, sepsis status, emergency status, and surgery type.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/gupta_prf
- 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-2011-postoperative-respiratory-failure-risk-calculator-e2b88ed0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5KS5OdRjF1TUl0lrQ4Wop

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-2011-postoperative-respiratory-failure-risk-calculator-e2b88ed0
```

Example prompt: Using the Gupta 2011 Chest model, what's the estimated postoperative respiratory failure probability for a patient who is ASA class 3, independent functional status, no preoperative sepsis, having an elective intestinal surgery (not an emergency)?

## When to prefer this

Use this endpoint when you need the specific Gupta 2011 Chest logistic regression probability for postoperative respiratory failure using the published five-variable model (ASA class, functional status, sepsis, emergency, surgery type). Prefer this over ARISCAT or other respiratory risk tools when the clinical context specifically calls for the Gupta 2011 model, when inputs are already classified per Gupta 2011 categories, or when you need a validated logit output for downstream computation. Not a substitute for clinical judgment or a medical device.

## Known failure modes

- Missing required query parameters (functional_status, asa_class, sepsis, emergency, surgery) returns a 4xx error
- Invalid enum value for sepsis, surgery, or functional_status returns a validation error
- ASA class integer outside 1-5 may return an error or unexpected result
- Payment not included or insufficient USDC via x402 protocol returns 402 Payment Required
- No interpretation cutoff provided — model outputs probability only, no low/high risk classification

## How this service works

Gupta 2011 Chest logistic probability of postoperative respiratory failure (mechanical ventilation >48 h after surgery or unplanned intubation within 30 days) from ASA class, functional status, preoperative sepsis, emergency case, and surgery type (hernia reference). Returns logit and estimated_probability_percent. Not a medical device, not a diagnosis, not a ventilator order, and not ARISCAT. Gupta 2011 publishes no low/high cutoff.

## Output

Returns a JSON object with two fields: 'logit' (the raw log-odds from the Gupta 2011 Chest logistic regression model) and 'estimated_probability_percent' (the corresponding probability of postoperative respiratory failure — defined as mechanical ventilation >48h after surgery or unplanned intubation within 30 days — expressed as a 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": [
      "functional_status",
      "asa_class",
      "sepsis",
      "emergency",
      "surgery"
     ],
     "properties": {
      "sepsis": {
       "enum": [
        "none",
        "sirs",
        "sepsis",
        "septic_shock"
       ],
       "type": "string",
       "description": "Gupta 2011 Chest preoperative sepsis category as assigned by the caller: none (-0.7840), sirs (reference, 0), sepsis (+0.2752), or septic_shock (+0.9035). magent does not diagnose sepsis."
      },
      "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 2011 Chest 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/parathyroid (neck). magent does not classify a CPT code."
      },
      "asa_class": {
       "type": "integer",
       "description": "ASA physical status 1-5 (Gupta 2011 Chest logistic table; class 5 is the reference). class 1 -3.5265, class 2 -2.0008, class 3 -0.6201, class 4 +0.2441, class 5 adds 0. Caller-assigned integer."
      },
      "emergency": {
       "type": "boolean",
       "description": "Gupta 2011 Chest emergency case as assigned by the caller: true (reference, 0) or false (elective, -0.5739)."
      },
      "functional_status": {
       "enum": [
        "independent",
        "partially_dependent",
   
… (truncated)
```

## More

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