# BARD Score Calculator for NAFLD Advanced Fibrosis

> BARD Score Calculator for NAFLD Advanced Fibrosis 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).

Computes the Harrison 2008 BARD score (0–4) for predicting advanced fibrosis in NAFLD using BMI, AST/ALT ratio, and diabetes status

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/bard
- 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/bard-score-calculator-for-nafld-advanced-fibrosis-cee76669
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KExQ6jr_bX4VapXNDZZjA

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 bard-score-calculator-for-nafld-advanced-fibrosis-cee76669
```

Example prompt: Calculate the BARD score for a patient with a BMI of 31.2 kg/m², AST of 55 U/L, ALT of 42 U/L, and a confirmed diagnosis of diabetes mellitus — I need to know if they're in the low or high risk category for advanced NAFLD fibrosis.

## When to prefer this

Use this endpoint when you need the specific Harrison 2008 BARD score for NAFLD advanced fibrosis risk stratification, distinct from FIB-4, APRI, or the NAFLD Fibrosis Score (NFS). Prefer this when a clinical workflow or guideline explicitly references the BARD score or when comparing non-invasive fibrosis markers in research settings. It is appropriate when BMI, AST, ALT, and diabetes status are already available from the EHR or caller, and no biopsy interpretation or BMI computation is needed.

## Known failure modes

- Missing required query parameters (bmi, ast_u_l, alt_u_l, diabetes) returns a 400 error
- ALT value of 0 causes division-by-zero in AST/ALT ratio — must be >0
- BMI outside range 10–80 may be rejected or produce unexpected results
- AST or ALT outside range 1–10000 may be rejected
- Payment not provided or insufficient USDC results in 402 Payment Required
- Boolean diabetes field passed as string instead of true/false may cause parsing error

## How this service works

Harrison 2008 BARD score for NAFLD advanced fibrosis: BMI ≥28 kg/m² (1), AST/ALT ≥0.8 (2), diabetes mellitus (1); max 4. Low 0–1, high 2–4 (paper 2–4 vs 0–1 split). Not a NASH diagnosis; magent does not interpret a biopsy or compute BMI. Not FIB-4, APRI, or the NAFLD fibrosis score.

## Output

Returns a BARD score integer from 0 to 4 and a risk stratum (low: 0–1, high: 2–4) based on the Harrison 2008 criteria: BMI ≥28 contributes 1 point, AST/ALT ratio ≥0.8 contributes 2 points, and diabetes mellitus contributes 1 point. Does not diagnose NASH, interpret biopsy results, or compute BMI from height and weight.

## 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",
      "ast_u_l",
      "alt_u_l",
      "diabetes"
     ],
     "properties": {
      "bmi": {
       "type": "number",
       "description": "Body-mass index in kg/m^2 (10-80). >=28 scores 1 (Harrison 2008). 27.9 scores 0. Caller-supplied; magent does not compute BMI from height and weight."
      },
      "alt_u_l": {
       "type": "number",
       "description": "Alanine aminotransferase in U/L (1-10000). AST/ALT >= 0.8 scores 2 (Harrison 2008). 0.799 scores 0. ALT must be >0."
      },
      "ast_u_l": {
       "type": "number",
       "description": "Aspartate aminotransferase in U/L (1-10000). Used with ALT for the AAR."
      },
      "diabetes": {
       "type": "boolean",
       "description": "Diabetes mellitus as assigned by the caller (Harrison 2008). true scores 1. magent does not diagnose diabetes."
      }
     }
    }
   },
   "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/bard-score-calculator-for-nafld-advanced-fibrosis-cee76669/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)
