# Mazzaferro Up-to-Seven HCC Criterion Calculator

> Mazzaferro Up-to-Seven HCC Criterion 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-14).

Evaluates whether a hepatocellular carcinoma (HCC) patient meets the Mazzaferro 2009 Up-to-Seven criterion by checking if tumor_count + largest_cm ≤ 7 and microvascular invasion is absent.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/up_to_7
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mazzaferro-up-to-seven-hcc-criterion-calculator-4c4cdd97
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_878RDxMHoJg3HCmeBcBc5

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 mazzaferro-up-to-seven-hcc-criterion-calculator-4c4cdd97
```

Example prompt: Check whether a patient with 3 HCC nodules, a largest tumor of 3.5 cm, and no microvascular invasion meets the Mazzaferro 2009 Up-to-Seven criterion, and give me the size_number_sum.

## When to prefer this

Use this endpoint when you need a programmatic, rule-based check of the Mazzaferro 2009 Up-to-Seven criterion given caller-assigned pathology or explant values. Prefer this over general HCC staging tools when you specifically need the Up-to-Seven boolean and size_number_sum — not Milan criteria, Metroticket 2.0, AFP-based criteria, or survival probability estimates.

## Known failure modes

- Missing required query parameters (tumor_count, largest_cm, microvascular_invasion) returns a 400 error
- tumor_count outside integer range 1-20 may be rejected
- largest_cm outside range 0.1-30 may be rejected
- Incorrect type for microvascular_invasion (non-boolean) causes validation failure
- Payment not provided or insufficient USDC results in 402 Payment Required

## How this service works

Mazzaferro 2009 Up-to-seven: meets_up_to_seven is true iff tumor_count plus largest_cm is 7 or less and microvascular_invasion is false. Returns the boolean and size_number_sum, not a 5-year survival percentage. Pathology/explant-style inputs as assigned by the caller; magent does not interpret imaging or histology. Not Milan, not Metroticket 2.0 AFP criteria, not a contour calculator, not a medical device, and not a transplant listing.

## Output

Returns a boolean meets_up_to_seven (true if tumor_count + largest_cm ≤ 7 AND microvascular_invasion is false) and the numeric size_number_sum (tumor_count + largest_cm).

## 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",
      "microvascular_invasion"
     ],
     "properties": {
      "largest_cm": {
       "type": "number",
       "description": "Largest tumor diameter in centimetres (0.1-30) as assigned by the caller. Added to tumor_count as size_number_sum. Equality at 7.0 meets; 7.1 fails. magent does not interpret imaging or histology."
      },
      "tumor_count": {
       "type": "integer",
       "description": "Number of HCC nodules (integer 1-20) as assigned by the caller. Added to largest_cm as size_number_sum. The Up-to-seven ceiling is size_number_sum <= 7. magent does not interpret imaging or histology."
      },
      "microvascular_invasion": {
       "type": "boolean",
       "description": "Microvascular invasion as assigned by the caller (pathology/explant-style). true fails Up-to-seven even when size_number_sum is 7 or less. true or false. magent does not interpret imaging or histology."
      }
     }
    }
   },
   "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/mazzaferro-up-to-seven-hcc-criterion-calculator-4c4cdd97/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)
