# Milan Criteria Calculator for HCC (Mazzaferro 1996)

> Milan Criteria Calculator for HCC (Mazzaferro 1996) 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-13).

Evaluates whether a hepatocellular carcinoma patient meets the 1996 Milan criteria for liver transplantation eligibility based on tumor count, largest tumor diameter, vascular invasion, and extrahepatic disease.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/milan
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/milan-criteria-calculator-for-hcc-mazzaferro-1996-fda68c07
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MT6Ublgm0ptP0hvrea_1W

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 milan-criteria-calculator-for-hcc-mazzaferro-1996-fda68c07
```

Example prompt: Does this HCC patient meet the 1996 Milan criteria? They have 2 tumor nodules, the largest is 2.8 cm, no vascular invasion detected preoperatively, and no extrahepatic or lymph-node disease.

## When to prefer this

Use this endpoint when you need a fast, deterministic computation of the 1996 Mazzaferro Milan criteria specifically — not UCSF criteria, not ABIC, not other HCC scoring systems. Ideal when the caller has already interpreted imaging and assigned tumor count and size values, and needs the eligibility boolean for transplant workflow automation or clinical documentation support.

## Known failure modes

- Missing required query parameters (tumor_count, largest_cm, vascular_invasion, extrahepatic) results in a 400 error
- tumor_count outside integer range 1-20 may be rejected
- largest_cm outside numeric range 0.1-30 may be rejected
- Passing non-boolean values for vascular_invasion or extrahepatic causes validation failure
- Payment failure or missing x402 header results in 402 Payment Required

## How this service works

Mazzaferro 1996 Milan criteria for small HCC in cirrhosis: meets_milan is true iff there is no preoperative vascular invasion, no extrahepatic or lymph-node disease, and either one tumor 5 cm or less or two to three nodules each 3 cm or less. Four or more nodules fail. tumor_count and largest_cm are caller-assigned; magent does not interpret imaging. Not a medical device, not a transplant listing, and not UCSF criteria.

## Output

Returns a meets_milan boolean indicating whether the patient satisfies all four Milan criteria: tumor count 1-3, largest tumor diameter within allowed thresholds (≤5 cm for single, ≤3 cm for 2-3 nodules), no preoperative vascular invasion, and no extrahepatic or lymph-node disease. Four or more nodules automatically fail.

## 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": [
      "tumor_count",
      "largest_cm",
      "vascular_invasion",
      "extrahepatic"
     ],
     "properties": {
      "largest_cm": {
       "type": "number",
       "description": "Largest tumor diameter in centimetres (0.1-30). Single tumor meets at 5.0 cm and fails at 5.1. Two or three nodules meet at 3.0 cm and fail at 3.1. magent does not interpret imaging."
      },
      "tumor_count": {
       "type": "integer",
       "description": "Number of HCC nodules (integer 1-20) as assigned by the caller. A single tumor may be up to 5 cm; two or three nodules must each be 3 cm or less. Four or more nodules fail Milan. magent does not interpret imaging."
      },
      "extrahepatic": {
       "type": "boolean",
       "description": "Evident or suspected extrahepatic or lymph-node disease as assigned by the caller. true fails Milan (Mazzaferro 1996 excluded extrahepatic disease). true or false. magent does not interpret imaging."
      },
      "vascular_invasion": {
       "type": "boolean",
       "description": "Preoperative vascular (vessel) invasion as assigned by the caller. true fails Milan (Mazzaferro 1996 excluded preoperative vessel invasion). true or false. magent does not interpret imaging."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/milan-criteria-calculator-for-hcc-mazzaferro-1996-fda68c07/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)
