# ALBI Grade Calculator (Johnson 2015)

> ALBI Grade Calculator (Johnson 2015) 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 the albumin-bilirubin (ALBI) score and grade (1–3) from serum total bilirubin and albumin using the Johnson 2015 formula.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/albi
- 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/albi-grade-calculator-johnson-2015-0f8c3c94
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PMCJAZIsrv4zydK95-dD1

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 albi-grade-calculator-johnson-2015-0f8c3c94
```

Example prompt: Calculate the ALBI score and grade for a patient with albumin 38 g/L and total bilirubin 25 µmol/L using the Johnson 2015 formula.

## When to prefer this

Use this endpoint when you need the exact Johnson 2015 ALBI grade (1, 2, or 3) for hepatocellular carcinoma or liver disease assessment and have serum albumin and total bilirubin values available. Prefer this over Child-Pugh when a simpler, objective two-variable score is needed. Do not use for mALBI, PALBI, EZ-ALBI, Child-Pugh, or survival estimation.

## Known failure modes

- Missing both albumin parameters returns an error
- Missing both bilirubin parameters returns an error
- Providing both albumin_g_l and albumin_g_dl simultaneously is rejected
- Providing both bilirubin_umol_l and bilirubin_mg_dl simultaneously is rejected
- Out-of-range values (e.g. albumin outside 10–60 g/L) may return validation errors
- Payment failure (402) if x402 USDC payment header is missing or insufficient

## How this service works

Johnson 2015 albumin-bilirubin (ALBI) grade from total bilirubin and albumin. xb = 0.66*log10(bilirubin umol/L) + albumin_g_l*(-0.085). Grade 1 if xb <= -2.60, grade 2 if xb <= -1.39, else 3. Returns albi_score (4 decimals) and albi_grade. Not a listing protocol, Child-Pugh, survival estimate, mALBI, PALBI, or EZ-ALBI.

## Output

Returns a JSON object with `albi_score` (numeric, rounded to 4 decimal places) and `albi_grade` (integer 1, 2, or 3), where grade 1 indicates best preserved liver function (xb ≤ −2.60), grade 2 moderate impairment (xb ≤ −1.39), and grade 3 severe impairment.

## 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": [],
     "properties": {
      "albumin_g_l": {
       "type": "number",
       "description": "Albumin in g/L (10-60). Provide this or albumin_g_dl, not both. Johnson 2015 uses g/L."
      },
      "albumin_g_dl": {
       "type": "number",
       "description": "Albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both."
      },
      "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. Johnson 2015 uses µmol/L in log10."
      }
     }
    }
   },
   "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/albi",
  "count": 2,
  "items": [
   {
    "formula": "albi",
    "citation": {
     "id": "johnson-2015",
     "doi": "10.1200/JCO.2014.57.9151",
     "pmid": "25512453",
     "title": "Assessment of liver function in patients with hepatocellular carcinoma: a new evidence-based approach-the ALBI grade",
     "source": "J Clin Oncol. 2015;33(6):550-558",
     "authors": "Johnson PJ, Berhane S, Kagebayashi C, et al."
    },
    "albi_grade": 1,
    "albi_score": -2.74,
    "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_l": 40,
    "bilirubin_umol_l": 10,
    "formula_expression": "albi_score = (log10(bilirubin_umol_l) * 0.66) + (albumin_g_l * -0.085)"
   },
   {
    "formula": "albi",
    "citation": {
     "id": "johnson-2015",
     "doi": "10.1200/JCO.2014.57.9151",
     "pmid": "25512453",
     "title": "Assessment of liver function in patients with hepatocellular carcinoma: a new evidence-based approach-the ALBI grade",
     "source": "J Clin Oncol. 2015;33(6):550-558",
     "authors": "Johnson PJ, Berhane S, Kagebayashi C, et al."
    },
    "albi_grade": 1,
    "albi_score": -2.74,
    "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_l": 40,
    "bilirubin_umol_l": 10,
    "formula_expression": "albi_score = (log10(bilirubin_umol_l) * 0.66) + (albumin_g_l * -0.085)"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/albi-grade-calculator-johnson-2015-0f8c3c94/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)
