# magent EuroSCORE II Calculator

> magent EuroSCORE II 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).

Computes Nashef 2012 EuroSCORE II logistic in-hospital mortality probability for adult cardiac surgery patients

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/euroscore_ii
- 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/magent-euroscore-ii-calculator-53bd72cd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Nh7CjDsJVIAwXEpLOs2rR

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-euroscore-ii-calculator-53bd72cd
```

Example prompt: Calculate the EuroSCORE II in-hospital mortality probability for a 72-year-old female patient with NYHA class 3 heart failure, creatinine clearance between 51 and 85, elective isolated CABG, moderate LV function, no active endocarditis, no dialysis, no recent MI, no critical preoperative state, no extracardiac arteriopathy, no poor mobility, no previous cardiac surgery, no chronic lung disease, no insulin-dependent diabetes, no CCS class 4 angina, no thoracic aorta involvement, and no pulmonary hypertension.

## When to prefer this

Use this endpoint when you need a fast, server-side computation of the Nashef 2012 logistic EuroSCORE II — specifically the logit and probability — without implementing the coefficient table yourself. Prefer it over manual calculation to avoid arithmetic errors. Note it is not the additive EuroSCORE I, does not classify into low/intermediate/high tiers, and does not derive creatinine clearance from serum creatinine (the caller must pre-assign the renal band).

## Known failure modes

- Missing required query parameters return a 400 or validation error
- Out-of-range age values (below 18 or above 120) may produce an error or unexpected encoding
- Invalid enum values for sex, renal, urgency, nyha, or weight_of_procedure return a validation error
- Network or payment failure (x402 protocol) prevents computation
- Caller-assigned creatinine band mismatch: magent does not run Cockcroft-Gault so incorrect band assignment leads to silently wrong probability

## How this service works

Nashef 2012 EuroSCORE II Table 6 logistic in-hospital mortality after adult cardiac surgery. Age Xi is 1 if age <= 60, else age - 59. Renal function is a caller-assigned creatinine-clearance band or dialysis; magent does not run Cockcroft-Gault. Returns logit and estimated_probability_percent from the unrounded logit. Not additive EuroSCORE I, not a medical device, and Nashef 2012 publishes no low/intermediate/high percent cuts.

## Output

Returns a JSON object containing the raw logit (sum of Nashef 2012 Table 6 coefficients plus intercept) and the estimated_probability_percent derived from the unrounded logit via the logistic function, representing predicted in-hospital mortality after adult cardiac surgery.

## 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",
      "sex",
      "renal",
      "nyha",
      "lv_function",
      "urgency",
      "weight_of_procedure",
      "pulmonary_hypertension",
      "extracardiac_arteriopathy",
      "poor_mobility",
      "previous_cardiac_surgery",
      "chronic_lung_disease",
      "active_endocarditis",
      "critical_preoperative_state",
      "insulin_dependent_diabetes",
      "ccs_class_4",
      "recent_mi",
      "thoracic_aorta"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (18-120). Nashef 2012 Table 6: Xi = 1 if age <= 60; Xi = age - 59 if older (age 61 → 2). Coefficient 0.0285181 on the encoded step, not on raw years."
      },
      "sex": {
       "enum": [
        "male",
        "female"
       ],
       "type": "string",
       "description": "Sex as assigned by the caller. male is the reference (0). female adds 0.2196434 (Nashef 2012 Table 6)."
      },
      "nyha": {
       "type": "integer",
       "description": "NYHA class 1-4 as assigned by the caller (Nashef 2012 Table 6). class 1 is the reference (0); class 2 +0.1070545; class 3 +0.2958358; class 4 +0.5597929."
      },
      "renal": {
       "enum": [
        "cc_gt_85",
        "cc_51_85",
        "cc_le_50",
        "dialysis"
       ],
       "type": "string",
       "description": "Nashef 2012 renal-function band as assigned by the caller: cc_gt_85 (reference, 0), cc_51_85 (+0.303553), cc_le_50 (+0.8592256), or dialysis (+0.6421508). magent does not run Cockcroft-Gault and does not parse a creatinine number."
      },
      "urgency": {
       "enum": [
        "elective",
        "urgent",
        "emergency",
        "salvage"
       ],
       "type": "string",
       "description": "Nashef 2012 urgency as assigned by the caller: elective (reference, 0), urgent (+0.3174673), emergency (+0.7039121), or salvage (+1.362947)."
      },
      "recent_mi": {
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-euroscore-ii-calculator-53bd72cd/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)
