MAGENT

Liver · LIVE

Fatty liver index

Compute the Bedogni 2006 fatty liver index from caller-supplied BMI, waist circumference, triglycerides, and GGT as a predictor of hepatic steatosis in the general population.

LIVE $0.005 USDC GET /api/calc/fli

Markdown: /docs/fli.md · Canonical: https://magentlab.com/docs/fli

Not a medical device. Not a diagnosis, dose, or listing recommendation.

What it computes

Compute the Bedogni 2006 fatty liver index from caller-supplied BMI, waist circumference, triglycerides, and GGT as a predictor of hepatic steatosis in the general population.

When to use

When an agent needs published Bedogni 2006 FLI arithmetic and must not invent an imaging diagnosis, hepatic steatosis index cutoffs, or NAFLD fibrosis score bands.

When not to use

  • Not a medical device. Not a steatosis diagnosis and not a substitute for imaging.
  • BMI is caller-supplied. magent does not compute BMI from height and weight in this tool.
  • Bedogni 2006 FLI only. Not the hepatic steatosis index, not the NAFLD fibrosis score, not FIB-4, and not APRI.

Formula

L = 0.953 * loge(triglycerides_mg_dl) + 0.139 * bmi_kg_m2 + 0.718 * loge(ggt_u_l) + 0.053 * waist_cm - 15.745; FLI = (e^L / (1 + e^L)) * 100

Citation

Title
The Fatty Liver Index: a simple and accurate predictor of hepatic steatosis in the general population
Authors
Bedogni G, Bellentani S, Miglioli L, Masutti F, Passalacqua M, Castiglione A, Tiribelli C
Source
BMC Gastroenterol. 2006;6:33
DOI
10.1186/1471-230X-6-33

Worked example

BMI 22, waist 70 cm, triglycerides 80 mg/dL, GGT 20 U/L

Given: bmi_kg_m2=22ggt_u_l=20triglycerides_mg_dl=80waist_cm=70

  1. L = 0.953 * loge(80) + 0.139 * 22 + 0.718 * loge(20) + 0.053 * 70 - 15.745 = -2.65
  2. FLI = (e^L / (1 + e^L)) * 100 = 6.6
  3. FLI < 30 → bedogni_band rule_out

Also searched as

  • fatty liver index
  • FLI Bedogni
  • Bedogni 2006 FLI
  • hepatic steatosis FLI
  • fatty liver index BMI waist GGT
  • FLI triglycerides GGT
  • Bedogni fatty liver

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/fli?bmi_kg_m2=22&waist_cm=70&triglycerides_mg_dl=80&ggt_u_l=20

Full URL: https://api.magentlab.com/api/calc/fli?bmi_kg_m2=22&waist_cm=70&triglycerides_mg_dl=80&ggt_u_l=20

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/fli?bmi_kg_m2=22&waist_cm=70&triglycerides_mg_dl=80&ggt_u_l=20"

Parameters

Name Type Required Description
bmi_kg_m2 number required Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI.
waist_cm number required Waist circumference in cm (40-200).
ggt_u_l number required Gamma-glutamyltransferase in U/L (1-2000).
triglycerides_mg_dl number optional Triglycerides in mg/dL (10-2000). Italian lab units in Bedogni 2006. Provide this or triglycerides_mmol_l, not both.
triglycerides_mmol_l number optional Triglycerides in mmol/L (0.11-22.6). Converted as mg/dL = mmol/L * 88.57. Provide this or triglycerides_mg_dl, not both.

Bulk (POST)

POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement.

POST /api/calc/fli Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 PREVIEW

  • 1 to 25 items. Each item uses the same keys as the GET query parameters.
  • POST of 1 item costs the same as GET. Lists longer than 25: chunk into multiple POSTs. Extra items still execute; do not pad dummy rows.
  • The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
  • HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
  • Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
  • x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.

Example request (fixture)

{
  "items": [
    {
      "bmi_kg_m2": "22",
      "ggt_u_l": "20",
      "triglycerides_mg_dl": "80",
      "waist_cm": "70"
    },
    {
      "bmi_kg_m2": "22",
      "ggt_u_l": "20",
      "triglycerides_mg_dl": "80",
      "waist_cm": "70"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/fli",
  "items": [
    {
      "l": -2.65,
      "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.",
      "citation": {
        "authors": "Bedogni G, Bellentani S, Miglioli L, Masutti F, Passalacqua M, Castiglione A, Tiribelli C",
        "doi": "10.1186/1471-230X-6-33",
        "id": "bedogni-2006",
        "pmid": "17081293",
        "source": "BMC Gastroenterol. 2006;6:33",
        "title": "The Fatty Liver Index: a simple and accurate predictor of hepatic steatosis in the general population"
      },
      "formula": "fli",
      "formula_expression": "L = 0.953 * loge(triglycerides_mg_dl) + 0.139 * bmi_kg_m2 + 0.718 * loge(ggt_u_l) + 0.053 * waist_cm - 15.745; FLI = (e^L / (1 + e^L)) * 100",
      "bmi_kg_m2": 22.0,
      "bedogni_band": "rule_out",
      "fli": 6.6,
      "ggt_u_l": 20.0,
      "triglycerides_mg_dl": 80.0,
      "waist_cm": 70.0
    },
    {
      "l": -2.65,
      "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.",
      "citation": {
        "authors": "Bedogni G, Bellentani S, Miglioli L, Masutti F, Passalacqua M, Castiglione A, Tiribelli C",
        "doi": "10.1186/1471-230X-6-33",
        "id": "bedogni-2006",
        "pmid": "17081293",
        "source": "BMC Gastroenterol. 2006;6:33",
        "title": "The Fatty Liver Index: a simple and accurate predictor of hepatic steatosis in the general population"
      },
      "formula": "fli",
      "formula_expression": "L = 0.953 * loge(triglycerides_mg_dl) + 0.139 * bmi_kg_m2 + 0.718 * loge(ggt_u_l) + 0.053 * waist_cm - 15.745; FLI = (e^L / (1 + e^L)) * 100",
      "bmi_kg_m2": 22.0,
      "bedogni_band": "rule_out",
      "fli": 6.6,
      "ggt_u_l": 20.0,
      "triglycerides_mg_dl": 80.0,
      "waist_cm": 70.0
    }
  ]
}

Response

Field Type Description
formula string fli
formula_expression string Exact Bedogni 2006 expression (natural log, triglycerides in mg/dL)
bmi_kg_m2 number Caller-supplied BMI in kg/m^2
waist_cm number Waist circumference in cm
ggt_u_l number GGT in U/L
triglycerides_mg_dl number Triglycerides used in mg/dL (after mmol/L conversion when supplied)
l number Linear predictor L, 4 decimals
fli number Fatty liver index, 1 decimal
bedogni_band string Published Bedogni 2006 operating points: rule_out (FLI < 30), indeterminate (30 <= FLI < 60), rule_in (FLI >= 60). Not a diagnosis.
citation object Bedogni BMC Gastroenterol 2006 citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "l": -2.65,
  "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.",
  "citation": {
    "authors": "Bedogni G, Bellentani S, Miglioli L, Masutti F, Passalacqua M, Castiglione A, Tiribelli C",
    "doi": "10.1186/1471-230X-6-33",
    "id": "bedogni-2006",
    "pmid": "17081293",
    "source": "BMC Gastroenterol. 2006;6:33",
    "title": "The Fatty Liver Index: a simple and accurate predictor of hepatic steatosis in the general population"
  },
  "formula": "fli",
  "formula_expression": "L = 0.953 * loge(triglycerides_mg_dl) + 0.139 * bmi_kg_m2 + 0.718 * loge(ggt_u_l) + 0.053 * waist_cm - 15.745; FLI = (e^L / (1 + e^L)) * 100",
  "bmi_kg_m2": 22.0,
  "bedogni_band": "rule_out",
  "fli": 6.6,
  "ggt_u_l": 20.0,
  "triglycerides_mg_dl": 80.0,
  "waist_cm": 70.0
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_bmi_kg_m2 bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.
400 invalid_waist_cm waist_cm must be a number from 40 to 200 (Bedogni 2006 FLI). Returned before settlement; you are not charged.
400 invalid_ggt ggt_u_l must be a number from 1 to 2000 (Bedogni 2006 FLI). Returned before settlement; you are not charged.
400 invalid_fli_triglyceride triglycerides_mg_dl (10-2000) or triglycerides_mmol_l (0.11-22.6) is required, not both (Bedogni 2006 FLI; mg/dL = mmol/L * 88.57). Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • NAFLD fibrosis score — Compute the Angulo 2007 NAFLD fibrosis score from age, BMI, IFG/diabetes, AST, ALT, platelets, and albumin.

Payment

Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /docs/mcp.

Guarantees

  • HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged.
  • exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
  • HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
  • Execution is timeout-bounded and concurrency-capped.
  • Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.