# Magent Fatty Liver Index (FLI) Calculator

> Magent Fatty Liver Index (FLI) 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-10-12).

Computes the Bedogni 2006 Fatty Liver Index (FLI) from BMI, waist circumference, GGT, and triglycerides, returning a 0–100 score with steatosis band classification.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/fli?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/magent-fatty-liver-index-fli-calculator-fcf2c336
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vMn9EPURQsXwtXM_ZTRdD

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-fatty-liver-index-fli-calculator-fcf2c336
```

Example prompt: Calculate the Fatty Liver Index for a patient with a BMI of 28.5 kg/m², waist circumference of 95 cm, GGT of 45 U/L, and triglycerides of 180 mg/dL — and tell me whether the score rules out, is indeterminate for, or rules in hepatic steatosis.

## When to prefer this

Choose this endpoint when you need a deterministic, reproducible implementation of the Bedogni 2006 FLI formula for autonomous agents — especially when triglycerides may be in mmol/L (automatic unit conversion included) or when you need the full citation and formula expression embedded in the response. Prefer it over manual formula implementations to avoid transcription errors, and over general-purpose LLM reasoning when auditability and formula fidelity matter. Not suitable as a replacement for imaging or biopsy-based liver assessment.

## Known failure modes

- Missing required parameter (bmi_kg_m2, waist_cm, or ggt_u_l) returns a validation error
- Providing both triglycerides_mg_dl and triglycerides_mmol_l simultaneously causes a conflict error
- Out-of-range values (e.g. BMI outside 10–80, waist outside 40–200, GGT outside 1–2000) may be rejected
- If neither triglycerides field is provided, the request fails due to missing required lab input
- Payment failure via x402 protocol results in 402 response before any computation

## How this service works

Deterministic published-formula arithmetic plus ICD-10-CM, RxNorm, and LOINC. Pay in USDC on Base via x402.

## Output

Returns a JSON object containing the FLI score (0–100), the intermediate logistic value L, the bedogni_band classification ('rule_out' for FLI<30, 'indeterminate' for 30–59, 'rule_in' for FLI≥60), the formula expression, input echo of all parameters, and the full Bedogni 2006 citation (DOI, PMID, authors, journal). Also includes a disclaimer that this is not a medical device and a licensed clinician remains responsible for patient care.

## 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": [
      "bmi_kg_m2",
      "waist_cm",
      "ggt_u_l"
     ],
     "properties": {
      "ggt_u_l": {
       "type": "number",
       "description": "Gamma-glutamyltransferase in U/L (1-2000)."
      },
      "waist_cm": {
       "type": "number",
       "description": "Waist circumference in cm (40-200)."
      },
      "bmi_kg_m2": {
       "type": "number",
       "description": "Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI."
      },
      "triglycerides_mg_dl": {
       "type": "number",
       "description": "Triglycerides in mg/dL (10-2000). Italian lab units in Bedogni 2006. Provide this or triglycerides_mmol_l, not both."
      },
      "triglycerides_mmol_l": {
       "type": "number",
       "description": "Triglycerides in mmol/L (0.11-22.6). Converted as mg/dL = mmol/L * 88.57. Provide this or triglycerides_mg_dl, not both."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/fli",
  "count": 2,
  "items": [
   {
    "l": -2.65,
    "fli": 6.6,
    "formula": "fli",
    "ggt_u_l": 20,
    "citation": {
     "id": "bedogni-2006",
     "doi": "10.1186/1471-230X-6-33",
     "pmid": "17081293",
     "title": "The Fatty Liver Index: a simple and accurate predictor of hepatic steatosis in the general population",
     "source": "BMC Gastroenterol. 2006;6:33",
     "authors": "Bedogni G, Bellentani S, Miglioli L, Masutti F, Passalacqua M, Castiglione A, Tiribelli C"
    },
    "waist_cm": 70,
    "bmi_kg_m2": 22,
    "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.",
    "bedogni_band": "rule_out",
    "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",
    "triglycerides_mg_dl": 80
   },
   {
    "l": -2.65,
    "fli": 6.6,
    "formula": "fli",
    "ggt_u_l": 20,
    "citation": {
     "id": "bedogni-2006",
     "doi": "10.1186/1471-230X-6-33",
     "pmid": "17081293",
     "title": "The Fatty Liver Index: a simple and accurate predictor of hepatic steatosis in the general population",
     "source": "BMC Gastroenterol. 2006;6:33",
     "authors": "Bedogni G, Bellentani S, Miglioli L, Masutti F, Passalacqua M, Castiglione A, Tiribelli C"
    },
    "waist_cm": 70,
    "bmi_kg_m2": 22,
    "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.",
    "bedogni_band": "rule_out",
    "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",
    "triglycerides_mg_dl": 80
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-fatty-liver-index-fli-calculator-fcf2c336/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)
