{
  "x402Version": 2,
  "id": 39567,
  "slug": "39567",
  "resource": "https://api.magentlab.com/api/calc/lille",
  "description": "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.",
  "type": "http",
  "serviceName": "magent",
  "resourceType": "Agent Service",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x836Be278f1739fB4308091cD1852F7971Bc19Ee2",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 600
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "iconUrl": "https://api.magentlab.com/favicon.ico",
        "input": {
          "body": {
            "items": [
              {
                "age": 50,
                "albumin_g_dl": 3.5,
                "albumin_g_l": 35,
                "bilirubin_day0_mg_dl": 11.7,
                "bilirubin_day0_umol_l": 200,
                "bilirubin_day7_mg_dl": 8.8,
                "bilirubin_day7_umol_l": 150,
                "creatinine_mg_dl": 1,
                "creatinine_umol_l": 88,
                "formula": "pt",
                "inr": 2,
                "pt_sec": 18
              },
              {
                "age": 50,
                "albumin_g_dl": 3.5,
                "albumin_g_l": 35,
                "bilirubin_day0_mg_dl": 11.7,
                "bilirubin_day0_umol_l": 200,
                "bilirubin_day7_mg_dl": 8.8,
                "bilirubin_day7_umol_l": 150,
                "creatinine_mg_dl": 1,
                "creatinine_umol_l": 88,
                "formula": "pt",
                "inr": 2,
                "pt_sec": 18
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "age_years": 50,
                "albumin_g_l": 35,
                "bilirubin_day0_umol_l": 200,
                "bilirubin_day7_umol_l": 150,
                "citation": {
                  "authors": "Louvet A, Naveau S, Abdelnour M, et al.",
                  "doi": "10.1002/hep.21607",
                  "id": "louvet-2007",
                  "pmid": "17518367",
                  "source": "Hepatology. 2007;45(6):1348-1354",
                  "title": "The Lille model: a new tool for therapeutic strategy in patients with severe alcoholic hepatitis treated with steroids"
                },
                "creatinine_mg_dl": 1,
                "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.",
                "evolution_bilirubin_umol_l": 50,
                "formula": "pt",
                "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))",
                "lille_score": 0.0668,
                "pt_sec": 18,
                "r": 2.6372,
                "renal_insufficiency": false,
                "response": "responder"
              },
              {
                "age_years": 50,
                "albumin_g_l": 35,
                "bilirubin_day0_umol_l": 200,
                "bilirubin_day7_umol_l": 150,
                "citation": {
                  "authors": "Louvet A, Naveau S, Abdelnour M, et al.",
                  "doi": "10.1002/hep.21607",
                  "id": "louvet-2007",
                  "pmid": "17518367",
                  "source": "Hepatology. 2007;45(6):1348-1354",
                  "title": "The Lille model: a new tool for therapeutic strategy in patients with severe alcoholic hepatitis treated with steroids"
                },
                "creatinine_mg_dl": 1,
                "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.",
                "evolution_bilirubin_umol_l": 50,
                "formula": "pt",
                "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))",
                "lille_score": 0.0668,
                "pt_sec": 18,
                "r": 2.6372,
                "renal_insufficiency": false,
                "response": "responder"
              }
            ],
            "path": "/api/calc/lille"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "age": {
                          "description": "Age in years (18-120).",
                          "type": "integer"
                        },
                        "albumin_g_dl": {
                          "description": "Day-0 albumin in g/dL (1-6). Converted as g/L = g/dL × 10.",
                          "type": "number"
                        },
                        "albumin_g_l": {
                          "description": "Day-0 albumin in g/L (10-60). Provide this or albumin_g_dl, not both. Louvet 2007 uses g/L.",
                          "type": "number"
                        },
                        "bilirubin_day0_mg_dl": {
                          "description": "Day-0 total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1.",
                          "type": "number"
                        },
                        "bilirubin_day0_umol_l": {
                          "description": "Day-0 total bilirubin in µmol/L (2-684). Provide this or bilirubin_day0_mg_dl.",
                          "type": "number"
                        },
                        "bilirubin_day7_mg_dl": {
                          "description": "Day-7 total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1.",
                          "type": "number"
                        },
                        "bilirubin_day7_umol_l": {
                          "description": "Day-7 total bilirubin in µmol/L (2-684). Provide this or bilirubin_day7_mg_dl.",
                          "type": "number"
                        },
                        "creatinine_mg_dl": {
                          "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).",
                          "type": "number"
                        },
                        "creatinine_umol_l": {
                          "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).",
                          "type": "number"
                        },
                        "formula": {
                          "description": "pt (prothrombin time in seconds) or inr. Required; magent does not swap PT and INR.",
                          "enum": [
                            "pt",
                            "inr"
                          ],
                          "type": "string"
                        },
                        "inr": {
                          "description": "INR (0.8-10). Required when formula=inr. Ignored when formula=pt.",
                          "type": "number"
                        },
                        "pt_sec": {
                          "description": "Prothrombin time in seconds (8-120). Required when formula=pt. Ignored when formula=inr.",
                          "type": "number"
                        }
                      },
                      "required": [
                        "formula",
                        "age"
                      ],
                      "type": "object"
                    },
                    "maxItems": 25,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "items"
                ],
                "type": "object"
              },
              "headers": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "method": {
                "const": "POST",
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "lille",
    "liver",
    "alcoholic-hepatitis",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-12T13:53:04.857Z",
  "quality": {
    "calls30d": 3,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-10-12T13:53:04.728Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "age": 50,
                  "albumin_g_dl": 3.5,
                  "albumin_g_l": 35,
                  "bilirubin_day0_mg_dl": 11.7,
                  "bilirubin_day0_umol_l": 200,
                  "bilirubin_day7_mg_dl": 8.8,
                  "bilirubin_day7_umol_l": 150,
                  "creatinine_mg_dl": 1,
                  "creatinine_umol_l": 88,
                  "formula": "pt",
                  "inr": 2,
                  "pt_sec": 18
                },
                {
                  "age": 50,
                  "albumin_g_dl": 3.5,
                  "albumin_g_l": 35,
                  "bilirubin_day0_mg_dl": 11.7,
                  "bilirubin_day0_umol_l": 200,
                  "bilirubin_day7_mg_dl": 8.8,
                  "bilirubin_day7_umol_l": 150,
                  "creatinine_mg_dl": 1,
                  "creatinine_umol_l": 88,
                  "formula": "pt",
                  "inr": 2,
                  "pt_sec": 18
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "age_years": 50,
                  "albumin_g_l": 35,
                  "bilirubin_day0_umol_l": 200,
                  "bilirubin_day7_umol_l": 150,
                  "citation": {
                    "authors": "Louvet A, Naveau S, Abdelnour M, et al.",
                    "doi": "10.1002/hep.21607",
                    "id": "louvet-2007",
                    "pmid": "17518367",
                    "source": "Hepatology. 2007;45(6):1348-1354",
                    "title": "The Lille model: a new tool for therapeutic strategy in patients with severe alcoholic hepatitis treated with steroids"
                  },
                  "creatinine_mg_dl": 1,
                  "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.",
                  "evolution_bilirubin_umol_l": 50,
                  "formula": "pt",
                  "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))",
                  "lille_score": 0.0668,
                  "pt_sec": 18,
                  "r": 2.6372,
                  "renal_insufficiency": false,
                  "response": "responder"
                },
                {
                  "age_years": 50,
                  "albumin_g_l": 35,
                  "bilirubin_day0_umol_l": 200,
                  "bilirubin_day7_umol_l": 150,
                  "citation": {
                    "authors": "Louvet A, Naveau S, Abdelnour M, et al.",
                    "doi": "10.1002/hep.21607",
                    "id": "louvet-2007",
                    "pmid": "17518367",
                    "source": "Hepatology. 2007;45(6):1348-1354",
                    "title": "The Lille model: a new tool for therapeutic strategy in patients with severe alcoholic hepatitis treated with steroids"
                  },
                  "creatinine_mg_dl": 1,
                  "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.",
                  "evolution_bilirubin_umol_l": 50,
                  "formula": "pt",
                  "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))",
                  "lille_score": 0.0668,
                  "pt_sec": 18,
                  "r": 2.6372,
                  "renal_insufficiency": false,
                  "response": "responder"
                }
              ],
              "path": "/api/calc/lille"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "age": {
                            "description": "Age in years (18-120).",
                            "type": "integer"
                          },
                          "albumin_g_dl": {
                            "description": "Day-0 albumin in g/dL (1-6). Converted as g/L = g/dL × 10.",
                            "type": "number"
                          },
                          "albumin_g_l": {
                            "description": "Day-0 albumin in g/L (10-60). Provide this or albumin_g_dl, not both. Louvet 2007 uses g/L.",
                            "type": "number"
                          },
                          "bilirubin_day0_mg_dl": {
                            "description": "Day-0 total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1.",
                            "type": "number"
                          },
                          "bilirubin_day0_umol_l": {
                            "description": "Day-0 total bilirubin in µmol/L (2-684). Provide this or bilirubin_day0_mg_dl.",
                            "type": "number"
                          },
                          "bilirubin_day7_mg_dl": {
                            "description": "Day-7 total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1.",
                            "type": "number"
                          },
                          "bilirubin_day7_umol_l": {
                            "description": "Day-7 total bilirubin in µmol/L (2-684). Provide this or bilirubin_day7_mg_dl.",
                            "type": "number"
                          },
                          "creatinine_mg_dl": {
                            "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).",
                            "type": "number"
                          },
                          "creatinine_umol_l": {
                            "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).",
                            "type": "number"
                          },
                          "formula": {
                            "description": "pt (prothrombin time in seconds) or inr. Required; magent does not swap PT and INR.",
                            "enum": [
                              "pt",
                              "inr"
                            ],
                            "type": "string"
                          },
                          "inr": {
                            "description": "INR (0.8-10). Required when formula=inr. Ignored when formula=pt.",
                            "type": "number"
                          },
                          "pt_sec": {
                            "description": "Prothrombin time in seconds (8-120). Required when formula=pt. Ignored when formula=inr.",
                            "type": "number"
                          }
                        },
                        "required": [
                          "formula",
                          "age"
                        ],
                        "type": "object"
                      },
                      "maxItems": 25,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "type": "object"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "method": {
                  "const": "POST",
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.magentlab.com",
    "manifest_name": "api.magentlab.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}