{"uid":"cap_LMnQDmlSq-kHqjH6cF__j","slug":"magent-asco-2018-immune-related-hepatitis-irae-grader-f1af75c5","name":"magent ASCO 2018 Immune-Related Hepatitis (irAE) Grader","description":"ASCO 2018 (Brahmer) immune-related hepatitis grade from caller AST, ALT, and total bilirubin as folds of laboratory ULN (mg/dL only). Lab grade is the max of transaminase and bilirubin Table 2.2 bands; decompensated liver upgrades to grade 4; symptomatic compensated liver dysfunction upgrades to grade 3. ICI action: continue (0-1), hold (2), or permanently discontinue (3-4). Not a medical device, not a diagnosis, not DILI/RUCAM, not R factor, not a steroid dose; magent does not assay enzymes.","url":"https://api.magentlab.com/api/calc/irae_hepatitis","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":["ast_u_l","ast_uln_u_l","alt_u_l","alt_uln_u_l","bilirubin_mg_dl","bilirubin_uln_mg_dl","decompensated_liver","symptomatic_liver_dysfunction"],"properties":{"alt_u_l":{"type":"number","description":"Alanine aminotransferase in U/L (1-10000). Used with alt_uln_u_l for the ALT fold. magent does not assay enzymes."},"ast_u_l":{"type":"number","description":"Aspartate aminotransferase in U/L (1-10000). Used with ast_uln_u_l for the AST fold. magent does not assay enzymes."},"alt_uln_u_l":{"type":"number","description":"Laboratory ALT upper limit of normal in U/L (5-200). Required; magent does not assume 40."},"ast_uln_u_l":{"type":"number","description":"Laboratory AST upper limit of normal in U/L (5-200). Required; magent does not assume 40."},"bilirubin_mg_dl":{"type":"number","description":"Total bilirubin in mg/dL (0.1-40). µmol/L is not accepted. magent does not assay bilirubin."},"bilirubin_uln_mg_dl":{"type":"number","description":"Laboratory total-bilirubin upper limit of normal in mg/dL (0.1-5). Required; magent does not assume 1.0."},"decompensated_liver":{"type":"boolean","description":"Decompensated liver (ascites, encephalopathy, coagulopathy, or coma) as assigned by the caller (Brahmer 2018). true or false. When true, grade is max(lab_grade, 4). magent does not examine the patient."},"symptomatic_liver_dysfunction":{"type":"boolean","description":"Symptomatic compensated hepatitis / liver dysfunction as assigned by the caller (Brahmer 2018). true or false. When true and decompensated_liver is false, grade is max(lab_grade, 3). magent does not examine the patient."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"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_pb5i998wwu9y5tHFodXAq","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":"Grades immune-related hepatitis severity per ASCO 2018 Brahmer guidelines from AST, ALT, and total bilirubin values, and returns the ICI management action (continue, hold, or permanently discontinue).","exampleAgentPrompt":"Grade my patient's immune-related hepatitis using ASCO 2018 Brahmer criteria: AST is 180 U/L with a lab ULN of 40, ALT is 210 U/L with a lab ULN of 40, total bilirubin is 1.8 mg/dL with a ULN of 1.2 mg/dL — the patient has no decompensated liver disease and no symptomatic liver dysfunction.","exampleUseCases":[{"title":"ICI hold decision during immunotherapy","prompt":"My melanoma patient on pembrolizumab has an AST of 250 U/L (ULN 40), ALT of 310 U/L (ULN 40), bilirubin 2.1 mg/dL (ULN 1.2) — no decompensation, no symptoms. What's the ASCO 2018 irAE hepatitis grade and should we hold the drug?"},{"title":"Decompensated liver upgrade check","prompt":"Can you grade the immune-related hepatitis for a patient with AST 95 U/L (ULN 40), ALT 110 U/L (ULN 40), bilirubin 1.5 mg/dL (ULN 1.0), who has ascites indicating decompensated liver disease? No symptomatic dysfunction otherwise."},{"title":"Borderline transaminase elevation triage","prompt":"Patient on nivolumab has mild transaminase bumps — AST 55 U/L (ULN 35), ALT 60 U/L (ULN 35), bilirubin 0.9 mg/dL (ULN 1.2), no decompensation, no symptoms. Run the Brahmer 2018 hepatitis grade for me so I know if we can continue therapy."}],"resultDescription":"Returns the computed irAE hepatitis grade (0–4) per ASCO 2018 Brahmer Table 2.2, including the underlying lab grade derived from max transaminase and bilirubin fold-over-ULN, any clinical upgrades applied (decompensated → grade 4; symptomatic → grade 3), and the recommended ICI management action: continue (grade 0–1), hold (grade 2), or permanently discontinue (grade 3–4).","failureModes":["Missing required query parameters (ast_u_l, ast_uln_u_l, alt_u_l, alt_uln_u_l, bilirubin_mg_dl, bilirubin_uln_mg_dl, decompensated_liver, symptomatic_liver_dysfunction) return a validation error","Bilirubin supplied in µmol/L instead of mg/dL will produce incorrect grading — only mg/dL is accepted","AST or ALT values outside the 1–10000 U/L range rejected as out-of-bounds","ULN values outside the 5–200 U/L (transaminases) or 0.1–5 mg/dL (bilirubin) range rejected","Payment failure (x402) if USDC payment is not properly attached","Boolean fields (decompensated_liver, symptomatic_liver_dysfunction) sent as strings may cause schema rejection"],"whenToPreferThis":"Use this endpoint when you need a guideline-specific ASCO 2018 Brahmer irAE hepatitis grade computed from actual lab fold-over-ULN values — not a generic CTCAE liver toxicity grade, not DILI/RUCAM, and not an R-factor calculation. Prefer this over manual lookup when building oncology clinical decision support agents that must recommend ICI continuation, hold, or permanent discontinuation based on hepatotoxicity severity. It correctly handles lab-specific ULNs (does not assume 40 U/L or 1.0 mg/dL), applies clinical upgrades for decompensation and symptomatic dysfunction, and returns a machine-readable action string.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:53:17.797Z","isFirstParty":false}