# magent BCLC Stage Calculator (Reig 2022)

> magent BCLC Stage Calculator (Reig 2022) 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 Barcelona Clinic Liver Cancer (BCLC) stage (0/A/B/C/D) and expected median survival from caller-supplied HCC clinical parameters per Reig 2022 criteria.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/bclc
- 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/magent-bclc-stage-calculator-reig-2022-d25f3227
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OdXQ_pn1AImyAeAbCEdRN

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 magent-bclc-stage-calculator-reig-2022-d25f3227
```

Example prompt: What BCLC stage and expected median survival does Reig 2022 give for a patient with ECOG 1, preserved liver function, transplant eligible, no vascular invasion, no extrahepatic disease, 2 HCC nodules with the largest being 2.8 cm?

## When to prefer this

Use this endpoint when an AI agent needs to apply Reig 2022 BCLC staging arithmetic to pre-assembled clinical parameters for hepatocellular carcinoma. Choose this over manual lookup when staging needs to be computed programmatically in an oncology workflow or clinical decision support pipeline. Not appropriate as a substitute for physician assessment, transplant listing, Child-Pugh calculation, or imaging interpretation.

## Known failure modes

- Missing required query parameters (ecog, preserved_liver_function, transplant_option, vascular_invasion, extrahepatic, tumor_count, largest_cm) returns a validation error
- ECOG value outside 0-4 range rejected
- largest_cm outside 0.1-30 range rejected
- tumor_count outside 1-20 range rejected
- Non-boolean values for flag fields return errors
- Payment failure (x402) blocks the call if USDC payment is not provided

## How this service works

Reig 2022 BCLC stage 0/A/B/C/D from caller-assigned cancer-related ECOG, preserved liver function, transplant option, vascular invasion, extrahepatic disease, tumor count, and largest diameter. Returns stage and expected median survival only. Not a treatment recommendation. magent does not assign ECOG, compute Child-Pugh, or interpret imaging. Not a medical device. Not Milan or UCSF listing.

## Output

Returns the computed BCLC stage (0, A, B, C, or D) and the associated expected median survival figure per Reig 2022 criteria. Does not provide treatment recommendations, Milan/UCSF transplant listing eligibility, Child-Pugh computation, or ECOG assignment.

## 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": [
      "ecog",
      "preserved_liver_function",
      "transplant_option",
      "vascular_invasion",
      "extrahepatic",
      "tumor_count",
      "largest_cm"
     ],
     "properties": {
      "ecog": {
       "type": "integer",
       "description": "Cancer-related ECOG performance status 0-4 as assigned by the caller (Reig 2022: do not count baseline comorbidity PS). Integer 0-4. magent does not assign ECOG."
      },
      "largest_cm": {
       "type": "number",
       "description": "Largest tumor diameter in centimetres (0.1-30). Stage 0 meets at 2.0 cm and is A at 2.1 when solitary. Two or three nodules meet A at 3.0 cm and are B 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. Stage 0 is a single tumor <=2 cm; stage A allows a solitary tumor of any size or 2-3 nodules none >3 cm; four or more nodules are stage B when otherwise 0/A/B-eligible. magent does not interpret imaging."
      },
      "extrahepatic": {
       "type": "boolean",
       "description": "Extrahepatic spread as assigned by the caller. true or false. magent does not interpret imaging."
      },
      "transplant_option": {
       "type": "boolean",
       "description": "Option of liver transplantation when liver function is not preserved, as assigned by the caller (Reig 2022). true or false. magent does not list for transplant."
      },
      "vascular_invasion": {
       "type": "boolean",
       "description": "Vascular (vessel) invasion as assigned by the caller. true or false. magent does not interpret imaging."
      },
      "preserved_liver_function": {
       "type": "boolean",
       "description": "Preserved liver function as assigned by the caller (Reig 2022 abandoned Child-Pugh class for this assignment). true or false. magent does not compute Child-Pugh or AL
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-bclc-stage-calculator-reig-2022-d25f3227/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)
