{
  "x402Version": 2,
  "id": 38962,
  "slug": "38962",
  "resource": "https://api.magentlab.com/api/calc/pesi",
  "description": "PESI (Pulmonary Embolism Severity Index) from Aujesky 2005: age in years plus male sex (+10), cancer (+30), heart failure (+10), chronic lung disease (+10), heart rate >=110 (+20), SBP <100 mm Hg (+30), respiratory rate >=30 (+20), temperature <36 C (+20), altered mental status (+60), and SpO2 <90% (+20). Classes I (<=65) through V (>125). Only for already diagnosed PE. Not a diagnosis, not an outpatient protocol, not sPESI, and not the 17-variable laboratory model.",
  "type": "http",
  "serviceName": "magent",
  "resourceType": "Agent Service",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x836Be278f1739fB4308091cD1852F7971Bc19Ee2",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 600
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "iconUrl": "https://api.magentlab.com/favicon.ico",
        "input": {
          "body": {
            "items": [
              {
                "age": 50,
                "altered_mentation": false,
                "cancer": false,
                "chronic_lung_disease": false,
                "heart_failure": false,
                "heart_rate_bpm": 80,
                "respiratory_rate": 16,
                "sex": "female",
                "spo2_percent": 96,
                "systolic_mm_hg": 120,
                "temperature_c": 37
              },
              {
                "age": 50,
                "altered_mentation": false,
                "cancer": false,
                "chronic_lung_disease": false,
                "heart_failure": false,
                "heart_rate_bpm": 80,
                "respiratory_rate": 16,
                "sex": "female",
                "spo2_percent": 96,
                "systolic_mm_hg": 120,
                "temperature_c": 37
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "age_years": 50,
                "citation": {
                  "authors": "Aujesky D, Obrosky DS, Stone RA, et al.",
                  "doi": "10.1164/rccm.200506-862OC",
                  "id": "aujesky-2005",
                  "source": "Am J Respir Crit Care Med. 2005;172(8):1041-1046",
                  "title": "Derivation and validation of a prognostic model for pulmonary embolism"
                },
                "components": [
                  {
                    "factor": "age",
                    "points": 50,
                    "present": true,
                    "value": 50
                  },
                  {
                    "factor": "male_sex",
                    "points": 0,
                    "present": false,
                    "value": "female"
                  },
                  {
                    "factor": "cancer",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "heart_failure",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "chronic_lung_disease",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "heart_rate_ge_110",
                    "points": 0,
                    "present": false,
                    "value": 80
                  },
                  {
                    "factor": "systolic_mm_hg_lt_100",
                    "points": 0,
                    "present": false,
                    "value": 120
                  },
                  {
                    "factor": "respiratory_rate_ge_30",
                    "points": 0,
                    "present": false,
                    "value": 16
                  },
                  {
                    "factor": "temperature_lt_36",
                    "points": 0,
                    "present": false,
                    "value": 37
                  },
                  {
                    "factor": "altered_mentation",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "spo2_lt_90",
                    "points": 0,
                    "present": false,
                    "value": 96
                  }
                ],
                "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.",
                "formula": "pesi",
                "formula_expression": "PESI = age_in_years + 10*male + 30*cancer + 10*heart_failure + 10*chronic_lung_disease + 20*(HR>=110) + 30*(SBP<100) + 20*(RR>=30) + 20*(temp<36) + 60*altered_mentation + 20*(SpO2<90); classes I <=65, II 66-85, III 86-105, IV 106-125, V >125",
                "pesi_class": "I",
                "score": 50
              },
              {
                "age_years": 50,
                "citation": {
                  "authors": "Aujesky D, Obrosky DS, Stone RA, et al.",
                  "doi": "10.1164/rccm.200506-862OC",
                  "id": "aujesky-2005",
                  "source": "Am J Respir Crit Care Med. 2005;172(8):1041-1046",
                  "title": "Derivation and validation of a prognostic model for pulmonary embolism"
                },
                "components": [
                  {
                    "factor": "age",
                    "points": 50,
                    "present": true,
                    "value": 50
                  },
                  {
                    "factor": "male_sex",
                    "points": 0,
                    "present": false,
                    "value": "female"
                  },
                  {
                    "factor": "cancer",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "heart_failure",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "chronic_lung_disease",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "heart_rate_ge_110",
                    "points": 0,
                    "present": false,
                    "value": 80
                  },
                  {
                    "factor": "systolic_mm_hg_lt_100",
                    "points": 0,
                    "present": false,
                    "value": 120
                  },
                  {
                    "factor": "respiratory_rate_ge_30",
                    "points": 0,
                    "present": false,
                    "value": 16
                  },
                  {
                    "factor": "temperature_lt_36",
                    "points": 0,
                    "present": false,
                    "value": 37
                  },
                  {
                    "factor": "altered_mentation",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "spo2_lt_90",
                    "points": 0,
                    "present": false,
                    "value": 96
                  }
                ],
                "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.",
                "formula": "pesi",
                "formula_expression": "PESI = age_in_years + 10*male + 30*cancer + 10*heart_failure + 10*chronic_lung_disease + 20*(HR>=110) + 30*(SBP<100) + 20*(RR>=30) + 20*(temp<36) + 60*altered_mentation + 20*(SpO2<90); classes I <=65, II 66-85, III 86-105, IV 106-125, V >125",
                "pesi_class": "I",
                "score": 50
              }
            ],
            "path": "/api/calc/pesi"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "age": {
                          "description": "Age in years (18-120). Adds 1 point per year (the age integer itself).",
                          "type": "integer"
                        },
                        "altered_mentation": {
                          "description": "Altered mental status as assigned by the caller. true or false. +60 if true.",
                          "type": "boolean"
                        },
                        "cancer": {
                          "description": "Cancer as assigned by the caller. true or false. +30 if true.",
                          "type": "boolean"
                        },
                        "chronic_lung_disease": {
                          "description": "Chronic lung disease as assigned by the caller (separate from heart failure). true or false. +10 if true.",
                          "type": "boolean"
                        },
                        "heart_failure": {
                          "description": "Heart failure as assigned by the caller (separate from chronic lung disease). true or false. +10 if true.",
                          "type": "boolean"
                        },
                        "heart_rate_bpm": {
                          "description": "Heart rate in beats per minute (integer 30-220). Scores +20 when ≥110; 109 does not score.",
                          "type": "integer"
                        },
                        "respiratory_rate": {
                          "description": "Respiratory rate in breaths/min (integer 4-80). Scores +20 when ≥30; 29 does not score.",
                          "type": "integer"
                        },
                        "sex": {
                          "description": "Sex (female or male). Male scores +10.",
                          "type": "string"
                        },
                        "spo2_percent": {
                          "description": "Arterial oxygen saturation percent (50-100). Scores +20 when <90; 90 does not score.",
                          "type": "number"
                        },
                        "systolic_mm_hg": {
                          "description": "Systolic blood pressure in mm Hg (50-250). Scores +30 when <100; 100 does not score.",
                          "type": "number"
                        },
                        "temperature_c": {
                          "description": "Temperature in °C (30-45). Scores +20 when <36; 36.0 does not score.",
                          "type": "number"
                        }
                      },
                      "required": [
                        "age",
                        "sex",
                        "cancer",
                        "heart_failure",
                        "chronic_lung_disease",
                        "heart_rate_bpm",
                        "systolic_mm_hg",
                        "respiratory_rate",
                        "temperature_c",
                        "altered_mentation",
                        "spo2_percent"
                      ],
                      "type": "object"
                    },
                    "maxItems": 25,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "items"
                ],
                "type": "object"
              },
              "headers": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "method": {
                "const": "POST",
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "pesi",
    "pe",
    "vte",
    "severity",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T11:06:35.356Z",
  "quality": {
    "calls30d": 5,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-13T11:06:35.237Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "age": 50,
                  "altered_mentation": false,
                  "cancer": false,
                  "chronic_lung_disease": false,
                  "heart_failure": false,
                  "heart_rate_bpm": 80,
                  "respiratory_rate": 16,
                  "sex": "female",
                  "spo2_percent": 96,
                  "systolic_mm_hg": 120,
                  "temperature_c": 37
                },
                {
                  "age": 50,
                  "altered_mentation": false,
                  "cancer": false,
                  "chronic_lung_disease": false,
                  "heart_failure": false,
                  "heart_rate_bpm": 80,
                  "respiratory_rate": 16,
                  "sex": "female",
                  "spo2_percent": 96,
                  "systolic_mm_hg": 120,
                  "temperature_c": 37
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "age_years": 50,
                  "citation": {
                    "authors": "Aujesky D, Obrosky DS, Stone RA, et al.",
                    "doi": "10.1164/rccm.200506-862OC",
                    "id": "aujesky-2005",
                    "source": "Am J Respir Crit Care Med. 2005;172(8):1041-1046",
                    "title": "Derivation and validation of a prognostic model for pulmonary embolism"
                  },
                  "components": [
                    {
                      "factor": "age",
                      "points": 50,
                      "present": true,
                      "value": 50
                    },
                    {
                      "factor": "male_sex",
                      "points": 0,
                      "present": false,
                      "value": "female"
                    },
                    {
                      "factor": "cancer",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "heart_failure",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "chronic_lung_disease",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "heart_rate_ge_110",
                      "points": 0,
                      "present": false,
                      "value": 80
                    },
                    {
                      "factor": "systolic_mm_hg_lt_100",
                      "points": 0,
                      "present": false,
                      "value": 120
                    },
                    {
                      "factor": "respiratory_rate_ge_30",
                      "points": 0,
                      "present": false,
                      "value": 16
                    },
                    {
                      "factor": "temperature_lt_36",
                      "points": 0,
                      "present": false,
                      "value": 37
                    },
                    {
                      "factor": "altered_mentation",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "spo2_lt_90",
                      "points": 0,
                      "present": false,
                      "value": 96
                    }
                  ],
                  "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.",
                  "formula": "pesi",
                  "formula_expression": "PESI = age_in_years + 10*male + 30*cancer + 10*heart_failure + 10*chronic_lung_disease + 20*(HR>=110) + 30*(SBP<100) + 20*(RR>=30) + 20*(temp<36) + 60*altered_mentation + 20*(SpO2<90); classes I <=65, II 66-85, III 86-105, IV 106-125, V >125",
                  "pesi_class": "I",
                  "score": 50
                },
                {
                  "age_years": 50,
                  "citation": {
                    "authors": "Aujesky D, Obrosky DS, Stone RA, et al.",
                    "doi": "10.1164/rccm.200506-862OC",
                    "id": "aujesky-2005",
                    "source": "Am J Respir Crit Care Med. 2005;172(8):1041-1046",
                    "title": "Derivation and validation of a prognostic model for pulmonary embolism"
                  },
                  "components": [
                    {
                      "factor": "age",
                      "points": 50,
                      "present": true,
                      "value": 50
                    },
                    {
                      "factor": "male_sex",
                      "points": 0,
                      "present": false,
                      "value": "female"
                    },
                    {
                      "factor": "cancer",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "heart_failure",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "chronic_lung_disease",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "heart_rate_ge_110",
                      "points": 0,
                      "present": false,
                      "value": 80
                    },
                    {
                      "factor": "systolic_mm_hg_lt_100",
                      "points": 0,
                      "present": false,
                      "value": 120
                    },
                    {
                      "factor": "respiratory_rate_ge_30",
                      "points": 0,
                      "present": false,
                      "value": 16
                    },
                    {
                      "factor": "temperature_lt_36",
                      "points": 0,
                      "present": false,
                      "value": 37
                    },
                    {
                      "factor": "altered_mentation",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "spo2_lt_90",
                      "points": 0,
                      "present": false,
                      "value": 96
                    }
                  ],
                  "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.",
                  "formula": "pesi",
                  "formula_expression": "PESI = age_in_years + 10*male + 30*cancer + 10*heart_failure + 10*chronic_lung_disease + 20*(HR>=110) + 30*(SBP<100) + 20*(RR>=30) + 20*(temp<36) + 60*altered_mentation + 20*(SpO2<90); classes I <=65, II 66-85, III 86-105, IV 106-125, V >125",
                  "pesi_class": "I",
                  "score": 50
                }
              ],
              "path": "/api/calc/pesi"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "age": {
                            "description": "Age in years (18-120). Adds 1 point per year (the age integer itself).",
                            "type": "integer"
                          },
                          "altered_mentation": {
                            "description": "Altered mental status as assigned by the caller. true or false. +60 if true.",
                            "type": "boolean"
                          },
                          "cancer": {
                            "description": "Cancer as assigned by the caller. true or false. +30 if true.",
                            "type": "boolean"
                          },
                          "chronic_lung_disease": {
                            "description": "Chronic lung disease as assigned by the caller (separate from heart failure). true or false. +10 if true.",
                            "type": "boolean"
                          },
                          "heart_failure": {
                            "description": "Heart failure as assigned by the caller (separate from chronic lung disease). true or false. +10 if true.",
                            "type": "boolean"
                          },
                          "heart_rate_bpm": {
                            "description": "Heart rate in beats per minute (integer 30-220). Scores +20 when ≥110; 109 does not score.",
                            "type": "integer"
                          },
                          "respiratory_rate": {
                            "description": "Respiratory rate in breaths/min (integer 4-80). Scores +20 when ≥30; 29 does not score.",
                            "type": "integer"
                          },
                          "sex": {
                            "description": "Sex (female or male). Male scores +10.",
                            "type": "string"
                          },
                          "spo2_percent": {
                            "description": "Arterial oxygen saturation percent (50-100). Scores +20 when <90; 90 does not score.",
                            "type": "number"
                          },
                          "systolic_mm_hg": {
                            "description": "Systolic blood pressure in mm Hg (50-250). Scores +30 when <100; 100 does not score.",
                            "type": "number"
                          },
                          "temperature_c": {
                            "description": "Temperature in °C (30-45). Scores +20 when <36; 36.0 does not score.",
                            "type": "number"
                          }
                        },
                        "required": [
                          "age",
                          "sex",
                          "cancer",
                          "heart_failure",
                          "chronic_lung_disease",
                          "heart_rate_bpm",
                          "systolic_mm_hg",
                          "respiratory_rate",
                          "temperature_c",
                          "altered_mentation",
                          "spo2_percent"
                        ],
                        "type": "object"
                      },
                      "maxItems": 25,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "type": "object"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "method": {
                  "const": "POST",
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.magentlab.com",
    "manifest_name": "api.magentlab.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}