# Child-Pugh Cirrhosis Severity Score Calculator

> Child-Pugh Cirrhosis Severity Score 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-10-10).

Calculates the Child-Pugh (Child-Turcotte-Pugh) score and class (A/B/C) for cirrhosis severity from bilirubin, albumin, INR, encephalopathy grade, and ascites.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/child_pugh?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/child-pugh-cirrhosis-severity-score-calculator-7b8c34a9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NHQsLbmCKpvD6T51eiy-Y

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 child-pugh-cirrhosis-severity-score-calculator-7b8c34a9
```

Example prompt: Calculate the Child-Pugh score for a cirrhosis patient with a bilirubin of 2.5 mg/dL, albumin of 3.0 g/dL, INR of 1.9, grade 1-2 encephalopathy, and slight ascites.

## When to prefer this

Use this endpoint when you need a fast, deterministic, evidence-based Child-Pugh score computed from explicit lab values and clinician-assigned clinical parameters. Prefer this over manual calculation to avoid arithmetic errors, or when building clinical decision support tools, hepatology dashboards, or automated chart review pipelines. This is not a transplant listing protocol and requires that encephalopathy and ascites grades be assigned by the calling clinician.

## Known failure modes

- Missing required parameters (INR, encephalopathy, or ascites) returns a 400 error
- Bilirubin or albumin values outside valid physiological ranges may return an error or unexpected scoring
- Providing both bilirubin_mg_dl and bilirubin_umol_l may cause ambiguity — use only one
- Invalid encephalopathy or ascites enum values (e.g. typos) cause validation failure
- Payment not included or insufficient (x402) results in 402 Payment Required

## How this service works

Deterministic published-formula arithmetic plus ICD-10-CM, RxNorm, and LOINC. Pay in USDC on Base via x402.

## Output

Returns a numeric Child-Pugh total score (5–15), Child-Pugh class (A, B, or C), individual sub-scores for each of the five parameters, and a citation to the published scoring criteria.

## 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",
      "encephalopathy",
      "ascites"
     ],
     "properties": {
      "inr": {
       "type": "number",
       "description": "INR (0.8-10). Contemporary substitute for Pugh PT-prolongation seconds. <1.70 scores 1; 1.70-2.30 scores 2; >2.30 scores 3."
      },
      "ascites": {
       "enum": [
        "none",
        "slight",
        "moderate"
       ],
       "type": "string",
       "description": "Caller-assigned ascites. none scores 1; slight scores 2; moderate scores 3. magent does not examine the patient."
      },
      "albumin_g_l": {
       "type": "number",
       "description": "Albumin in g/L. Converted as g/dL = g/L / 10."
      },
      "albumin_g_dl": {
       "type": "number",
       "description": "Albumin in g/dL (1-6). Provide this or albumin_g_l. >3.5 scores 1; 2.8-3.5 scores 2; <2.8 scores 3."
      },
      "encephalopathy": {
       "enum": [
        "none",
        "grade_1_2",
        "grade_3_4"
       ],
       "type": "string",
       "description": "Caller-assigned encephalopathy grade. none scores 1; grade_1_2 scores 2; grade_3_4 scores 3. magent does not examine the patient."
      },
      "bilirubin_mg_dl": {
       "type": "number",
       "description": "Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l. <2.0 scores 1; 2.0-3.0 scores 2; >3.0 scores 3."
      },
      "bilirubin_umol_l": {
       "type": "number",
       "description": "Total bilirubin in µmol/L. Converted as mg/dL = µmol/L / 17.1."
      }
     }
    }
   },
   "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/child_pugh",
  "count": 2,
  "items": [
   {
    "inr": 1.2,
    "score": 5,
    "ascites": "none",
    "formula": "child_pugh",
    "citation": {
     "id": "pugh-1973",
     "doi": "10.1002/bjs.1800600817",
     "title": "Transection of the oesophagus for bleeding oesophageal varices",
     "source": "Br J Surg. 1973;60(8):646-649",
     "authors": "Pugh RNH, Murray-Lyon IM, Dawson JL, Pietroni MC, Williams R"
    },
    "max_score": 15,
    "components": [
     {
      "value": 1,
      "factor": "bilirubin",
      "points": 1,
      "present": false
     },
     {
      "value": 4,
      "factor": "albumin",
      "points": 1,
      "present": false
     },
     {
      "value": 1.2,
      "factor": "inr",
      "points": 1,
      "present": false
     },
     {
      "value": "none",
      "factor": "encephalopathy",
      "points": 1,
      "present": false
     },
     {
      "value": "none",
      "factor": "ascites",
      "points": 1,
      "present": false
     }
    ],
    "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.",
    "albumin_g_dl": 4,
    "encephalopathy": "none",
    "bilirubin_mg_dl": 1,
    "child_pugh_class": "A",
    "formula_expression": "Child-Pugh = bilirubin + albumin + INR + encephalopathy + ascites; each 1-3; class A 5-6, B 7-9, C 10-15; max 15"
   },
   {
    "inr": 1.2,
    "score": 5,
    "ascites": "none",
    "formula": "child_pugh",
    "citation": {
     "id": "pugh-1973",
     "doi": "10.1002/bjs.1800600817",
     "title": "Transection of the oesophagus for bleeding oesophageal varices",
     "source": "Br J Surg. 1973;60(8):646-649",
     "authors": "Pugh RNH, Murray-Lyon IM, Dawson JL, Pietroni MC, Williams R"
    },
    "max_score": 15,
    "components": [
     {
      "value": 1,
      "factor": "bilirubin",
      "points": 1,
      "present": false
     },
     {
      "value": 4,
      "factor": "albumin",
      "points": 1,
      "present": false
     },
     {
      "value": 1.2,
      "factor": "inr",
      "points": 1,
      "present": false
     },
     {
      "value": "none",
      "factor": "encephalopathy",
      "points": 1,
      "present": false
     },
     {
      "value": "none",
      "factor": "ascites",
      "points": 1,
      "present": false
     }
    ],
    "disclaimer": "Not a medica
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/child-pugh-cirrhosis-severity-score-calculator-7b8c34a9/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)
