# Tavaglione 2023 Fibrotic NASH Index (FNI) Calculator

> Tavaglione 2023 Fibrotic NASH Index (FNI) 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-13).

Calculates the Tavaglione 2023 Fibrotic NASH Index (FNI) from AST, HbA1c, and HDL cholesterol to rule in or rule out fibrotic NASH without a liver biopsy.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/fni
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tavaglione-2023-fibrotic-nash-index-fni-calculator-6ea124f3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2dQFcW87XJ0Fev4mSddqq

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 tavaglione-2023-fibrotic-nash-index-fni-calculator-6ea124f3
```

Example prompt: A patient has an AST of 52 U/L, HbA1c of 7.8%, and HDL of 38 mg/dL — can you calculate their Tavaglione 2023 Fibrotic NASH Index (FNI) score and tell me whether they rule in, rule out, or fall in the indeterminate zone?

## When to prefer this

Use this endpoint when you need a validated, formula-based non-invasive risk score specifically for fibrotic NASH (not general NAFLD fibrosis or liver fibrosis broadly). It is distinct from FIB-4, APRI, NAFLD Fibrosis Score, SAFE score, and BARD score — choose it when the clinical question is specifically whether a patient has fibrotic NASH per the Tavaglione 2023 publication. It requires only three routine blood values (AST, HbA1c, HDL) and accepts HDL in either mg/dL or mmol/L.

## Known failure modes

- Missing required parameters (ast_u_l or a1c_percent) returns a 400 error
- Providing both hdl_mg_dl and hdl_mmol_l simultaneously causes a validation error
- Out-of-range values (e.g. AST outside 1–10000 U/L, HbA1c outside 4–15%) may return an error or undefined result
- HDL or AST of zero would cause a logarithm domain error
- Payment failure (insufficient USDC balance) returns 402 Payment Required

## How this service works

Tavaglione 2023 fibrotic NASH index (FNI) from AST, HbA1c, and HDL cholesterol. FNI = e^x/(1+e^x) with x = -10.33 + 2.54*ln(AST) + 3.86*ln(HbA1c) - 1.66*ln(HDL mg/dL). HDL may be mg/dL or mmol/L (×38.67). Rule-out ≤0.10; indeterminate between 0.10 and 0.33; rule-in ≥0.33. Not a biopsy, not FIB-4, not the NAFLD fibrosis score, not SAFE, and not BARD.

## Output

Returns a continuous FNI probability score between 0 and 1 derived from the logistic formula (e^x / (1+e^x)) with x = -10.33 + 2.54·ln(AST) + 3.86·ln(HbA1c) − 1.66·ln(HDL mg/dL). Scores ≤0.10 indicate rule-out, 0.10–0.33 are indeterminate, and ≥0.33 indicate rule-in for fibrotic NASH.

## 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": [
      "ast_u_l",
      "a1c_percent"
     ],
     "properties": {
      "ast_u_l": {
       "type": "number",
       "description": "Aspartate aminotransferase in U/L (1-10000)."
      },
      "hdl_mg_dl": {
       "type": "number",
       "description": "HDL cholesterol in mg/dL (5-150). Provide this or hdl_mmol_l, not both. Used in the natural-log term."
      },
      "hdl_mmol_l": {
       "type": "number",
       "description": "HDL cholesterol in mmol/L (0.1-3.9). Converted as mg/dL = mmol/L * 38.67. Provide this or hdl_mg_dl, not both."
      },
      "a1c_percent": {
       "type": "number",
       "description": "HbA1c in percent (4-15). magent does not convert from eAG."
      }
     }
    }
   },
   "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/tavaglione-2023-fibrotic-nash-index-fni-calculator-6ea124f3/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)
