{"uid":"cap_E1OVNQYpeFQMYfS69KfWM","slug":"fib-4-fibrosis-index-calculator-753fb585","name":"FIB-4 Fibrosis Index Calculator","description":"FIB-4 fibrosis index from age, AST, ALT, and platelets. Use for MASH/NASH prior-auth arithmetic. Deterministic published index with citation; not a diagnosis.","url":"https://api.magentlab.com/api/calc/fib4","method":"GET","headers":{},"bodySchema":{"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":["age","ast_u_l","alt_u_l","platelets_10e9_l"],"properties":{"age":{"type":"integer","description":"Age in years (18-120)."},"alt_u_l":{"type":"number","description":"Alanine aminotransferase in U/L (1-10000)."},"ast_u_l":{"type":"number","description":"Aspartate aminotransferase in U/L (1-10000)."},"platelets_10e9_l":{"type":"number","description":"Platelet count in 10^9/L (1-2000)."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"path":"/api/calc/fib4","count":2,"items":[{"fib4":3.95,"alt_u_l":40,"ast_u_l":100,"formula":"fib4","citation":{"id":"sterling-2006","doi":"10.1002/hep.21172","title":"Development of a simple noninvasive index to predict significant fibrosis in patients with HIV/HCV coinfection","source":"Hepatology. 2006;43(6):1317-1325","authors":"Sterling RK, Lissen E, Clumeck N, et al."},"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.","sterling_band":"high","platelets_10e9_l":200,"formula_expression":"FIB-4 = (age_years * AST_U_L) / (platelets_10e9_L * sqrt(ALT_U_L))"},{"fib4":3.95,"alt_u_l":40,"ast_u_l":100,"formula":"fib4","citation":{"id":"sterling-2006","doi":"10.1002/hep.21172","title":"Development of a simple noninvasive index to predict significant fibrosis in patients with HIV/HCV coinfection","source":"Hepatology. 2006;43(6):1317-1325","authors":"Sterling RK, Lissen E, Clumeck N, et al."},"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.","sterling_band":"high","platelets_10e9_l":200,"formula_expression":"FIB-4 = (age_years * AST_U_L) / (platelets_10e9_L * sqrt(ALT_U_L))"}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_UpKy1K_qRsLwEbdhvauNe","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the FIB-4 liver fibrosis index from age, AST, ALT, and platelet count for MASH/NASH prior-authorization workflows","exampleAgentPrompt":"Calculate the FIB-4 fibrosis index for a 54-year-old patient with an AST of 72 U/L, ALT of 58 U/L, and a platelet count of 145 × 10⁹/L so I can include it in a MASH prior-auth submission.","exampleUseCases":[{"title":"MASH prior-auth documentation","prompt":"I need the FIB-4 score for a prior authorization request — the patient is 61 years old, AST is 88 U/L, ALT is 64 U/L, and platelets are 130 × 10⁹/L."},{"title":"Liver fibrosis risk stratification","prompt":"Can you compute the FIB-4 index for my 47-year-old patient whose labs show AST 45 U/L, ALT 52 U/L, and platelet count 210 × 10⁹/L? I want to see if they're low or high risk for significant fibrosis."},{"title":"Serial monitoring of fibrosis index","prompt":"Run the FIB-4 calculation for a 58-year-old with today's labs: AST 110 U/L, ALT 78 U/L, platelets 98 × 10⁹/L — I'm tracking whether fibrosis is progressing compared to last quarter."}],"resultDescription":"Returns the computed FIB-4 index value (a continuous numeric score) derived from the published Sterling et al. formula: (age × AST) / (platelets × √ALT). The response includes the numeric score, interpretive thresholds (e.g., <1.30 = low risk, >2.67 = high risk), and a citation to the originating publication. No diagnosis is made; the result is deterministic arithmetic based on the four input lab values.","failureModes":["Missing required query parameters (age, ast_u_l, alt_u_l, platelets_10e9_l) returns a 400 validation error","Out-of-range values (e.g., age < 18 or > 120, platelets < 1 or > 2000, AST/ALT < 1 or > 10000) return validation errors","Division-by-zero edge case if platelets or ALT is zero (guarded by minimum value constraints)","Payment failure via x402 protocol returns 402 Payment Required before computation","Network timeout if the API is unreachable"],"whenToPreferThis":"Use this endpoint when you need a deterministic, citable FIB-4 score for MASH/NASH prior-authorization paperwork or clinical decision support and want a zero-configuration arithmetic API rather than a full EHR integration or ML-based fibrosis model. Ideal when you already have the four required lab values (age, AST, ALT, platelets) and need a reproducible, auditable result with a published reference. Prefer this over manual spreadsheet calculation when building automated prior-auth workflows or population health pipelines that require consistent fibrosis staging.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:15:45.997Z","isFirstParty":false}