# Lille Score Calculator (Louvet 2007)

> Lille Score Calculator (Louvet 2007) 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-15).

Computes the Lille score (0–1) for alcoholic hepatitis steroid response using age, albumin, bilirubin at day 0 and day 7, creatinine, and PT seconds or INR, with the published 0.45 cutoff.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/lille
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lille-score-calculator-louvet-2007-34798bd3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pUuBF-7LF6VR5TukyDhdS

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 lille-score-calculator-louvet-2007-34798bd3
```

Example prompt: Calculate the Lille score using the INR formula for a 52-year-old patient with albumin 28 g/L, day-0 bilirubin 180 µmol/L, day-7 bilirubin 120 µmol/L, creatinine 110 µmol/L, and INR 2.1 — and tell me whether they're above the 0.45 non-responder cutoff.

## When to prefer this

Use this endpoint when you need a deterministic, published Lille model score for alcoholic hepatitis steroid response evaluation, specifically when you have day-0 and day-7 bilirubin values and want the exact Louvet 2007 arithmetic applied with a clear 0.45 cutoff classification. Prefer it over manual calculation to avoid unit conversion errors (g/dL vs g/L, mg/dL vs µmol/L) and PT/INR swapping mistakes.

## Known failure modes

- Missing required 'formula' parameter returns an error — the endpoint will not infer PT vs INR
- Providing both pt_sec and inr simultaneously when formula=inr causes the PT value to be ignored, not swapped
- Out-of-range lab values (e.g. age <18, albumin outside 10–60 g/L) may return a validation error
- Providing both albumin_g_l and albumin_g_dl or both creatinine units simultaneously causes a conflict error
- Missing day-7 bilirubin (required for the Lille formula) results in a calculation error

## How this service works

Lille model (Louvet 2007) from age, albumin, bilirubin at day 0 and day 7, creatinine, and PT seconds or INR. formula=pt or formula=inr is required; magent does not swap them. Score 0-1 with the published 0.45 cutoff. Deterministic published arithmetic with citation; not a medical device or a steroid order.

## Output

Returns a numeric Lille score between 0 and 1, indicating steroid response likelihood in alcoholic hepatitis; scores ≥0.45 indicate non-response per the published Louvet 2007 cutoff. May also include a renal insufficiency flag and intermediate calculation values.

## 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": [
      "formula",
      "age"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (18-120)."
      },
      "inr": {
       "type": "number",
       "description": "INR (0.8-10). Required when formula=inr. Ignored when formula=pt."
      },
      "pt_sec": {
       "type": "number",
       "description": "Prothrombin time in seconds (8-120). Required when formula=pt. Ignored when formula=inr."
      },
      "formula": {
       "enum": [
        "pt",
        "inr"
       ],
       "type": "string",
       "description": "pt (prothrombin time in seconds) or inr. Required; magent does not swap PT and INR."
      },
      "albumin_g_l": {
       "type": "number",
       "description": "Day-0 albumin in g/L (10-60). Provide this or albumin_g_dl, not both. Louvet 2007 uses g/L."
      },
      "albumin_g_dl": {
       "type": "number",
       "description": "Day-0 albumin in g/dL (1-6). Converted as g/L = g/dL × 10."
      },
      "creatinine_mg_dl": {
       "type": "number",
       "description": "Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. Renal insufficiency is 1 when > 1.3 mg/dL if this unit is used (Louvet 2007)."
      },
      "creatinine_umol_l": {
       "type": "number",
       "description": "Serum creatinine in µmol/L (9-1768). Provide this or creatinine_mg_dl. Renal insufficiency is 1 when > 115 µmol/L if this unit is used (Louvet 2007)."
      },
      "bilirubin_day0_mg_dl": {
       "type": "number",
       "description": "Day-0 total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1."
      },
      "bilirubin_day7_mg_dl": {
       "type": "number",
       "description": "Day-7 total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1."
      },
      "bilirubin_day0_umol_l": {
       "type": "number",
       "description": "Day-0 total bilirubin in µmol/L (2-684). Provide t
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/lille",
  "count": 2,
  "items": [
   {
    "r": 2.6372,
    "pt_sec": 18,
    "formula": "pt",
    "citation": {
     "id": "louvet-2007",
     "doi": "10.1002/hep.21607",
     "pmid": "17518367",
     "title": "The Lille model: a new tool for therapeutic strategy in patients with severe alcoholic hepatitis treated with steroids",
     "source": "Hepatology. 2007;45(6):1348-1354",
     "authors": "Louvet A, Naveau S, Abdelnour M, et al."
    },
    "response": "responder",
    "age_years": 50,
    "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.",
    "albumin_g_l": 35,
    "lille_score": 0.0668,
    "creatinine_mg_dl": 1,
    "formula_expression": "R = 3.19 - 0.101*age + 0.147*albumin_g_l + 0.0165*evolution_bilirubin_umol_l - 0.206*renal_insufficiency - 0.0065*bilirubin_day0_umol_l - 0.0096*pt_sec; lille_score = exp(-R)/(1+exp(-R))",
    "renal_insufficiency": false,
    "bilirubin_day0_umol_l": 200,
    "bilirubin_day7_umol_l": 150,
    "evolution_bilirubin_umol_l": 50
   },
   {
    "r": 2.6372,
    "pt_sec": 18,
    "formula": "pt",
    "citation": {
     "id": "louvet-2007",
     "doi": "10.1002/hep.21607",
     "pmid": "17518367",
     "title": "The Lille model: a new tool for therapeutic strategy in patients with severe alcoholic hepatitis treated with steroids",
     "source": "Hepatology. 2007;45(6):1348-1354",
     "authors": "Louvet A, Naveau S, Abdelnour M, et al."
    },
    "response": "responder",
    "age_years": 50,
    "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.",
    "albumin_g_l": 35,
    "lille_score": 0.0668,
    "creatinine_mg_dl": 1,
    "formula_expression": "R = 3.19 - 0.101*age + 0.147*albumin_g_l + 0.0165*evolution_bilirubin_umol_l - 0.206*renal_insufficiency - 0.0065*bilirubin_day0_umol_l - 0.0096*pt_sec; lille_score = exp(-R)/(1+exp(-R))",
    "renal_insufficiency": false,
    "bilirubin_day0_umol_l": 200,
    "bilirubin_day7_umol_l": 150,
    "evolution_bilirubin_umol_l": 50
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lille-score-calculator-louvet-2007-34798bd3/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)
