# UKELD Calculator (Barber 2011)

> UKELD Calculator (Barber 2011) 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 UK End-Stage Liver Disease (UKELD) score from INR, creatinine, bilirubin, and sodium in native SI units, and returns whether the patient meets the UK transplant listing threshold.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/ukeld
- 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/ukeld-calculator-barber-2011-c2e31bfe
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ke_n4iL94-_IwxWmdyNkW

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 ukeld-calculator-barber-2011-c2e31bfe
```

Example prompt: Calculate the UKELD score for a patient with INR 2.3, creatinine 210 µmol/L, bilirubin 88 µmol/L, and sodium 130 mmol/L — and tell me whether they meet the UK elective transplant listing threshold.

## When to prefer this

Use this endpoint when you need the UKELD score specifically — the UK-specific liver disease severity score used for elective transplant listing decisions in the United Kingdom — as distinct from MELD or MELD-Na which are used in the US. Prefer this when lab values are available in native SI units (µmol/L, mmol/L) to avoid manual unit conversion, or supply mg/dL values directly since the API converts them automatically. Not appropriate for US-based MELD/UNOS allocation decisions.

## Known failure modes

- Missing required parameters (INR or sodium_mmol_l not provided) returns a 400 error
- Both bilirubin_umol_l and bilirubin_mg_dl provided simultaneously — only one should be supplied
- Both creatinine_umol_l and creatinine_mg_dl provided simultaneously — only one should be supplied
- Values outside expected physiological ranges (e.g. sodium outside 110–160 mmol/L) may be rejected or produce clinically implausible scores
- Payment not included or insufficient USDC balance returns a 402 Payment Required error

## How this service works

Barber 2011 United Kingdom end-stage liver disease (UKELD) from INR, creatinine, bilirubin, and sodium in native SI units. UKELD = 5.395*ln(INR) + 1.485*ln(creatinine_umol_l) + 3.13*ln(bilirubin_umol_l) - 81.565*ln(sodium_mmol_l) + 435, nearest integer. below_listing if <49; listing_threshold if ≥49 (UK elective-list 9% 1-year mortality cut). Not a transplant listing or allocation order. Not MELD or MELD-Na.

## Output

Returns an integer UKELD score computed using the Barber 2011 formula (5.395×ln(INR) + 1.485×ln(creatinine_µmol/L) + 3.13×ln(bilirubin_µmol/L) − 81.565×ln(sodium_mmol/L) + 435, rounded to nearest integer) and a classification string: 'below_listing' if score <49, or 'listing_threshold' if score ≥49, corresponding to the UK elective transplant listing 9% one-year mortality cut-off.

## 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": [
      "inr",
      "sodium_mmol_l"
     ],
     "properties": {
      "inr": {
       "type": "number",
       "description": "International normalized ratio (0.8-10). Barber 2011 does not floor INR at 1."
      },
      "sodium_mmol_l": {
       "type": "number",
       "description": "Serum sodium in mmol/L (110-160). Barber 2011 does not clamp sodium to 125–137."
      },
      "bilirubin_mg_dl": {
       "type": "number",
       "description": "Total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1. Provide this or bilirubin_umol_l, not both."
      },
      "bilirubin_umol_l": {
       "type": "number",
       "description": "Total bilirubin in µmol/L (2-684). Provide this or bilirubin_mg_dl, not both. Barber 2011 uses µmol/L; no MELD floor."
      },
      "creatinine_mg_dl": {
       "type": "number",
       "description": "Serum creatinine in mg/dL (0.1-20). Converted as µmol/L = mg/dL × 88.42. Provide this or creatinine_umol_l, not both."
      },
      "creatinine_umol_l": {
       "type": "number",
       "description": "Serum creatinine in µmol/L (9-1768). Provide this or creatinine_mg_dl, not both. Barber 2011 uses µmol/L; no MELD floor."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/ukeld",
  "count": 2,
  "items": [
   {
    "inr": 1.2,
    "ukeld": 54,
    "formula": "ukeld",
    "citation": {
     "id": "barber-2011",
     "doi": "10.1097/TP.0b013e318225db4d",
     "pmid": "21775931",
     "title": "Elective liver transplant list mortality: development of a United Kingdom end-stage liver disease score",
     "source": "Transplantation. 2011;92(4):469-476",
     "authors": "Barber K, Madden S, Allen J, Collett D, Neuberger J, Gimson A; United Kingdom Liver Transplant Selection and Allocation Working Party"
    },
    "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.",
    "ukeld_band": "listing_threshold",
    "sodium_mmol_l": 135,
    "bilirubin_umol_l": 40,
    "creatinine_umol_l": 90,
    "formula_expression": "UKELD = 5.395 * ln(INR) + 1.485 * ln(creatinine_umol_l) + 3.13 * ln(bilirubin_umol_l) - 81.565 * ln(sodium_mmol_l) + 435"
   },
   {
    "inr": 1.2,
    "ukeld": 54,
    "formula": "ukeld",
    "citation": {
     "id": "barber-2011",
     "doi": "10.1097/TP.0b013e318225db4d",
     "pmid": "21775931",
     "title": "Elective liver transplant list mortality: development of a United Kingdom end-stage liver disease score",
     "source": "Transplantation. 2011;92(4):469-476",
     "authors": "Barber K, Madden S, Allen J, Collett D, Neuberger J, Gimson A; United Kingdom Liver Transplant Selection and Allocation Working Party"
    },
    "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.",
    "ukeld_band": "listing_threshold",
    "sodium_mmol_l": 135,
    "bilirubin_umol_l": 40,
    "creatinine_umol_l": 90,
    "formula_expression": "UKELD = 5.395 * ln(INR) + 1.485 * ln(creatinine_umol_l) + 3.13 * ln(bilirubin_umol_l) - 81.565 * ln(sodium_mmol_l) + 435"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ukeld-calculator-barber-2011-c2e31bfe/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)
