{
  "x402Version": 2,
  "id": 39288,
  "slug": "39288",
  "resource": "https://api.magentlab.com/api/calc/bclc",
  "description": "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.",
  "type": "http",
  "serviceName": "magent",
  "resourceType": "Agent Service",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x836Be278f1739fB4308091cD1852F7971Bc19Ee2",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 600
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "iconUrl": "https://api.magentlab.com/favicon.ico",
        "input": {
          "body": {
            "items": [
              {
                "ecog": 0,
                "extrahepatic": false,
                "largest_cm": 1.5,
                "preserved_liver_function": true,
                "transplant_option": false,
                "tumor_count": 1,
                "vascular_invasion": false
              },
              {
                "ecog": 0,
                "extrahepatic": false,
                "largest_cm": 1.5,
                "preserved_liver_function": true,
                "transplant_option": false,
                "tumor_count": 1,
                "vascular_invasion": false
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "bclc_stage": "0",
                "citation": {
                  "authors": "Reig M, Forner A, Rimola J, Ferrer-Fàbrega J, Burrel M, Garcia-Criado Á, Kelley RK, Galle PR, Mazzaferro V, Salem R, Sangro B, Singal AG, Vogel A, Fuster J, Ayuso C, Bruix J",
                  "doi": "10.1016/j.jhep.2021.11.018",
                  "id": "reig-2022",
                  "pmid": "34801630",
                  "source": "J Hepatol. 2022;76(3):681-693",
                  "title": "BCLC strategy for prognosis prediction and treatment recommendation: The 2022 update"
                },
                "criteria": [
                  {
                    "factor": "ps_gt_2",
                    "met": false
                  },
                  {
                    "factor": "impaired_liver_without_lt",
                    "met": false
                  },
                  {
                    "factor": "preserved_liver_function",
                    "met": true
                  },
                  {
                    "factor": "vascular_invasion",
                    "met": false
                  },
                  {
                    "factor": "extrahepatic",
                    "met": false
                  },
                  {
                    "factor": "cancer_related_symptoms",
                    "met": false
                  },
                  {
                    "factor": "single_leq_2cm",
                    "met": true
                  },
                  {
                    "factor": "early_solitary_or_upto_3",
                    "met": false
                  },
                  {
                    "factor": "multifocal_beyond_a",
                    "met": 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.",
                "ecog": 0,
                "expected_median_survival": ">5 years",
                "extrahepatic": false,
                "formula": "bclc",
                "formula_expression": "bclc_stage D iff ecog > 2 or (not preserved_liver_function and not transplant_option); else C iff preserved_liver_function and ecog <= 2 and (vascular_invasion or extrahepatic or ecog >= 1); else 0 iff ecog == 0 and not vascular_invasion and not extrahepatic and (preserved_liver_function or transplant_option) and tumor_count == 1 and largest_cm <= 2; else A iff same eligibility and ((tumor_count == 1 and largest_cm > 2) or (tumor_count in 2..3 and largest_cm <= 3)); else B iff same eligibility and (tumor_count >= 4 or (tumor_count in 2..3 and largest_cm > 3)); else invalid_bclc_profile (Reig 2022)",
                "largest_cm": 1.5,
                "preserved_liver_function": true,
                "transplant_option": false,
                "tumor_count": 1,
                "vascular_invasion": false
              },
              {
                "bclc_stage": "0",
                "citation": {
                  "authors": "Reig M, Forner A, Rimola J, Ferrer-Fàbrega J, Burrel M, Garcia-Criado Á, Kelley RK, Galle PR, Mazzaferro V, Salem R, Sangro B, Singal AG, Vogel A, Fuster J, Ayuso C, Bruix J",
                  "doi": "10.1016/j.jhep.2021.11.018",
                  "id": "reig-2022",
                  "pmid": "34801630",
                  "source": "J Hepatol. 2022;76(3):681-693",
                  "title": "BCLC strategy for prognosis prediction and treatment recommendation: The 2022 update"
                },
                "criteria": [
                  {
                    "factor": "ps_gt_2",
                    "met": false
                  },
                  {
                    "factor": "impaired_liver_without_lt",
                    "met": false
                  },
                  {
                    "factor": "preserved_liver_function",
                    "met": true
                  },
                  {
                    "factor": "vascular_invasion",
                    "met": false
                  },
                  {
                    "factor": "extrahepatic",
                    "met": false
                  },
                  {
                    "factor": "cancer_related_symptoms",
                    "met": false
                  },
                  {
                    "factor": "single_leq_2cm",
                    "met": true
                  },
                  {
                    "factor": "early_solitary_or_upto_3",
                    "met": false
                  },
                  {
                    "factor": "multifocal_beyond_a",
                    "met": 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.",
                "ecog": 0,
                "expected_median_survival": ">5 years",
                "extrahepatic": false,
                "formula": "bclc",
                "formula_expression": "bclc_stage D iff ecog > 2 or (not preserved_liver_function and not transplant_option); else C iff preserved_liver_function and ecog <= 2 and (vascular_invasion or extrahepatic or ecog >= 1); else 0 iff ecog == 0 and not vascular_invasion and not extrahepatic and (preserved_liver_function or transplant_option) and tumor_count == 1 and largest_cm <= 2; else A iff same eligibility and ((tumor_count == 1 and largest_cm > 2) or (tumor_count in 2..3 and largest_cm <= 3)); else B iff same eligibility and (tumor_count >= 4 or (tumor_count in 2..3 and largest_cm > 3)); else invalid_bclc_profile (Reig 2022)",
                "largest_cm": 1.5,
                "preserved_liver_function": true,
                "transplant_option": false,
                "tumor_count": 1,
                "vascular_invasion": false
              }
            ],
            "path": "/api/calc/bclc"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "ecog": {
                          "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.",
                          "type": "integer"
                        },
                        "extrahepatic": {
                          "description": "Extrahepatic spread as assigned by the caller. true or false. magent does not interpret imaging.",
                          "type": "boolean"
                        },
                        "largest_cm": {
                          "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.",
                          "type": "number"
                        },
                        "preserved_liver_function": {
                          "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 ALBI.",
                          "type": "boolean"
                        },
                        "transplant_option": {
                          "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.",
                          "type": "boolean"
                        },
                        "tumor_count": {
                          "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.",
                          "type": "integer"
                        },
                        "vascular_invasion": {
                          "description": "Vascular (vessel) invasion as assigned by the caller. true or false. magent does not interpret imaging.",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "ecog",
                        "preserved_liver_function",
                        "transplant_option",
                        "vascular_invasion",
                        "extrahepatic",
                        "tumor_count",
                        "largest_cm"
                      ],
                      "type": "object"
                    },
                    "maxItems": 25,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "items"
                ],
                "type": "object"
              },
              "headers": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "method": {
                "const": "POST",
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "bclc",
    "hcc",
    "liver",
    "staging",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T00:21:40.647Z",
  "quality": {
    "calls30d": 5,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-13T00:21:40.51Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "ecog": 0,
                  "extrahepatic": false,
                  "largest_cm": 1.5,
                  "preserved_liver_function": true,
                  "transplant_option": false,
                  "tumor_count": 1,
                  "vascular_invasion": false
                },
                {
                  "ecog": 0,
                  "extrahepatic": false,
                  "largest_cm": 1.5,
                  "preserved_liver_function": true,
                  "transplant_option": false,
                  "tumor_count": 1,
                  "vascular_invasion": false
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "bclc_stage": "0",
                  "citation": {
                    "authors": "Reig M, Forner A, Rimola J, Ferrer-Fàbrega J, Burrel M, Garcia-Criado Á, Kelley RK, Galle PR, Mazzaferro V, Salem R, Sangro B, Singal AG, Vogel A, Fuster J, Ayuso C, Bruix J",
                    "doi": "10.1016/j.jhep.2021.11.018",
                    "id": "reig-2022",
                    "pmid": "34801630",
                    "source": "J Hepatol. 2022;76(3):681-693",
                    "title": "BCLC strategy for prognosis prediction and treatment recommendation: The 2022 update"
                  },
                  "criteria": [
                    {
                      "factor": "ps_gt_2",
                      "met": false
                    },
                    {
                      "factor": "impaired_liver_without_lt",
                      "met": false
                    },
                    {
                      "factor": "preserved_liver_function",
                      "met": true
                    },
                    {
                      "factor": "vascular_invasion",
                      "met": false
                    },
                    {
                      "factor": "extrahepatic",
                      "met": false
                    },
                    {
                      "factor": "cancer_related_symptoms",
                      "met": false
                    },
                    {
                      "factor": "single_leq_2cm",
                      "met": true
                    },
                    {
                      "factor": "early_solitary_or_upto_3",
                      "met": false
                    },
                    {
                      "factor": "multifocal_beyond_a",
                      "met": 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.",
                  "ecog": 0,
                  "expected_median_survival": ">5 years",
                  "extrahepatic": false,
                  "formula": "bclc",
                  "formula_expression": "bclc_stage D iff ecog > 2 or (not preserved_liver_function and not transplant_option); else C iff preserved_liver_function and ecog <= 2 and (vascular_invasion or extrahepatic or ecog >= 1); else 0 iff ecog == 0 and not vascular_invasion and not extrahepatic and (preserved_liver_function or transplant_option) and tumor_count == 1 and largest_cm <= 2; else A iff same eligibility and ((tumor_count == 1 and largest_cm > 2) or (tumor_count in 2..3 and largest_cm <= 3)); else B iff same eligibility and (tumor_count >= 4 or (tumor_count in 2..3 and largest_cm > 3)); else invalid_bclc_profile (Reig 2022)",
                  "largest_cm": 1.5,
                  "preserved_liver_function": true,
                  "transplant_option": false,
                  "tumor_count": 1,
                  "vascular_invasion": false
                },
                {
                  "bclc_stage": "0",
                  "citation": {
                    "authors": "Reig M, Forner A, Rimola J, Ferrer-Fàbrega J, Burrel M, Garcia-Criado Á, Kelley RK, Galle PR, Mazzaferro V, Salem R, Sangro B, Singal AG, Vogel A, Fuster J, Ayuso C, Bruix J",
                    "doi": "10.1016/j.jhep.2021.11.018",
                    "id": "reig-2022",
                    "pmid": "34801630",
                    "source": "J Hepatol. 2022;76(3):681-693",
                    "title": "BCLC strategy for prognosis prediction and treatment recommendation: The 2022 update"
                  },
                  "criteria": [
                    {
                      "factor": "ps_gt_2",
                      "met": false
                    },
                    {
                      "factor": "impaired_liver_without_lt",
                      "met": false
                    },
                    {
                      "factor": "preserved_liver_function",
                      "met": true
                    },
                    {
                      "factor": "vascular_invasion",
                      "met": false
                    },
                    {
                      "factor": "extrahepatic",
                      "met": false
                    },
                    {
                      "factor": "cancer_related_symptoms",
                      "met": false
                    },
                    {
                      "factor": "single_leq_2cm",
                      "met": true
                    },
                    {
                      "factor": "early_solitary_or_upto_3",
                      "met": false
                    },
                    {
                      "factor": "multifocal_beyond_a",
                      "met": 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.",
                  "ecog": 0,
                  "expected_median_survival": ">5 years",
                  "extrahepatic": false,
                  "formula": "bclc",
                  "formula_expression": "bclc_stage D iff ecog > 2 or (not preserved_liver_function and not transplant_option); else C iff preserved_liver_function and ecog <= 2 and (vascular_invasion or extrahepatic or ecog >= 1); else 0 iff ecog == 0 and not vascular_invasion and not extrahepatic and (preserved_liver_function or transplant_option) and tumor_count == 1 and largest_cm <= 2; else A iff same eligibility and ((tumor_count == 1 and largest_cm > 2) or (tumor_count in 2..3 and largest_cm <= 3)); else B iff same eligibility and (tumor_count >= 4 or (tumor_count in 2..3 and largest_cm > 3)); else invalid_bclc_profile (Reig 2022)",
                  "largest_cm": 1.5,
                  "preserved_liver_function": true,
                  "transplant_option": false,
                  "tumor_count": 1,
                  "vascular_invasion": false
                }
              ],
              "path": "/api/calc/bclc"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "ecog": {
                            "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.",
                            "type": "integer"
                          },
                          "extrahepatic": {
                            "description": "Extrahepatic spread as assigned by the caller. true or false. magent does not interpret imaging.",
                            "type": "boolean"
                          },
                          "largest_cm": {
                            "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.",
                            "type": "number"
                          },
                          "preserved_liver_function": {
                            "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 ALBI.",
                            "type": "boolean"
                          },
                          "transplant_option": {
                            "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.",
                            "type": "boolean"
                          },
                          "tumor_count": {
                            "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.",
                            "type": "integer"
                          },
                          "vascular_invasion": {
                            "description": "Vascular (vessel) invasion as assigned by the caller. true or false. magent does not interpret imaging.",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "ecog",
                          "preserved_liver_function",
                          "transplant_option",
                          "vascular_invasion",
                          "extrahepatic",
                          "tumor_count",
                          "largest_cm"
                        ],
                        "type": "object"
                      },
                      "maxItems": 25,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "type": "object"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "method": {
                  "const": "POST",
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.magentlab.com",
    "manifest_name": "api.magentlab.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}