Kidney · LIVE
irAE nephritis
Apply Brahmer 2018 ASCO Table 6.1 immune-related nephritis bands (creatinine fold and delta versus baseline, plus caller-assigned hospitalization, dialysis, and life-threatening flags) and return grade 0–4 plus ICI action.
Markdown: /docs/irae-nephritis.md · Canonical: https://magentlab.com/docs/irae-nephritis
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Apply Brahmer 2018 ASCO Table 6.1 immune-related nephritis bands (creatinine fold and delta versus baseline, plus caller-assigned hospitalization, dialysis, and life-threatening flags) and return grade 0–4 plus ICI action.
When to use
When an agent has caller current and baseline creatinine (mg/dL) during immune checkpoint inhibitor therapy and needs the published ASCO 2018 nephritis grade and continue / consider hold / hold / permanently discontinue band, not a KDIGO or AKIN stage and not a diagnosis.
When not to use
- Not a medical device. Not a diagnosis. magent does not assay creatinine.
- Creatinine is mg/dL only.
- Not KDIGO and not AKIN staging as a separate instrument.
- Not a steroid dose or immunosuppression schedule. icpi_action is the published continue / consider hold / hold / permanently discontinue band only.
- Hospitalization indicated, dialysis indicated, and life-threatening consequences are caller-assigned (Brahmer 2018 Table 6.1).
Formula
irae_nephritis first-match worst-wins (Brahmer 2018 Table 6.1): fold = creatinine_mg_dl / baseline_creatinine_mg_dl; delta = creatinine_mg_dl - baseline_creatinine_mg_dl. Grade 4 if dialysis_indicated or life_threatening; else grade 3 if fold > 3 or creatinine_mg_dl >= 4.0 or hospitalization_indicated; else grade 2 if fold > 2; else grade 1 if fold >= 1.5 or delta >= 0.3; else grade 0. icpi_action: 0 continue, 1 consider_hold, 2 hold, 3-4 permanently_discontinue. mg/dL only. Not KDIGO/AKIN. magent does not assay creatinine. Not a diagnosis. Not a steroid dose
Citation
- Authors
- Brahmer JR, Lacchetti C, Schneider BJ, Atkins MB, Brassil KJ, Caterino JM, Chau I, Ernstoff MS, Gardner JM, Ginex P, Hallmeyer S, Holter Chakrabarty J, Leighl NB, Mammen JS, McDermott DF, Naing A, Nastoupil LJ, Phillips T, Porter LD, Puzanov I, Reichner CA, Santomasso BD, Seigel C, Spira A, Suarez-Almazor ME, Wang Y, Weber JS, Wolchok JD, Thompson JA
- Source
- J Clin Oncol. 2018;36(17):1714-1768
Worked example
Creatinine 1.6 mg/dL, baseline 1.0 mg/dL, flags false
Given:
baseline_creatinine_mg_dl=1.0creatinine_mg_dl=1.6dialysis_indicated=falsehospitalization_indicated=falselife_threatening=false
- fold = 1.6 / 1.0 = 1.6; delta = 1.6 - 1.0 = 0.6 mg/dL
- dialysis_indicated false and life_threatening false → not grade 4
- fold 1.6 is not > 3, creatinine 1.6 is not >= 4.0, hospitalization_indicated false → not grade 3
- fold 1.6 is not > 2 → not grade 2
- fold 1.6 >= 1.5 → grade 1; icpi_action consider_hold
Also searched as
- immune-related nephritis
- ICI nephritis
- ASCO irAE nephritis
- checkpoint inhibitor nephritis
- Brahmer 2018 nephritis
- immune checkpoint kidney toxicity
- CTCAE nephritis
- irAE kidney grade
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
Full URL: https://api.magentlab.com/api/calc/irae_nephritis?creatinine_mg_dl=1.6&baseline_creatinine_mg_dl=1.0&hospitalization_indicated=false&dialysis_indicated=false&life_threatening=false
Call
Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params
return HTTP 400 before any quote or charge.
curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/irae_nephritis?creatinine_mg_dl=1.6&baseline_creatinine_mg_dl=1.0&hospitalization_indicated=false&dialysis_indicated=false&life_threatening=false"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
creatinine_mg_dl |
number | required | Current serum creatinine in mg/dL (0.1-20). Used with baseline_creatinine_mg_dl for fold and delta (Brahmer 2018 Table 6.1). magent does not assay creatinine. |
baseline_creatinine_mg_dl |
number | required | Baseline serum creatinine in mg/dL (0.1-20). µmol/L is not accepted. magent does not assay creatinine. |
hospitalization_indicated |
boolean | required | Hospitalization indicated as assigned by the caller (Brahmer 2018 Table 6.1 grade 3). true or false. When true and neither dialysis_indicated nor life_threatening is true, grade is 3. magent does not admit the patient. |
dialysis_indicated |
boolean | required | Dialysis indicated as assigned by the caller (Brahmer 2018 Table 6.1 grade 4). true or false. When true, grade is 4 regardless of fold. magent does not start dialysis. |
life_threatening |
boolean | required | Life-threatening consequences as assigned by the caller (Brahmer 2018 Table 6.1 grade 4). true or false. When true, grade is 4 regardless of fold. magent does not examine the patient. |
Bulk (POST)
POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement.
- 1 to 25 items. Each item uses the same keys as the GET query parameters.
- POST of 1 item costs the same as GET. Lists longer than 25: chunk into multiple POSTs. Extra items still execute; do not pad dummy rows.
- The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
- HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
- Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
- x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.
Example request (fixture)
{
"items": [
{
"baseline_creatinine_mg_dl": "1.0",
"creatinine_mg_dl": "1.6",
"dialysis_indicated": "false",
"hospitalization_indicated": "false",
"life_threatening": "false"
},
{
"baseline_creatinine_mg_dl": "1.0",
"creatinine_mg_dl": "1.6",
"dialysis_indicated": "false",
"hospitalization_indicated": "false",
"life_threatening": "false"
}
]
}
Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.
Example 200 (fixture)
{
"count": 2,
"path": "/api/calc/irae_nephritis",
"items": [
{
"fold": 1.6,
"delta": 0.6,
"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.",
"citation": {
"authors": "Brahmer JR, Lacchetti C, Schneider BJ, Atkins MB, Brassil KJ, Caterino JM, Chau I, Ernstoff MS, Gardner JM, Ginex P, Hallmeyer S, Holter Chakrabarty J, Leighl NB, Mammen JS, McDermott DF, Naing A, Nastoupil LJ, Phillips T, Porter LD, Puzanov I, Reichner CA, Santomasso BD, Seigel C, Spira A, Suarez-Almazor ME, Wang Y, Weber JS, Wolchok JD, Thompson JA",
"doi": "10.1200/JCO.2017.77.6385",
"id": "brahmer-2018",
"pmid": "29442540",
"source": "J Clin Oncol. 2018;36(17):1714-1768",
"title": "Management of Immune-Related Adverse Events in Patients Treated With Immune Checkpoint Inhibitor Therapy: American Society of Clinical Oncology Clinical Practice Guideline"
},
"formula": "irae_nephritis",
"formula_expression": "irae_nephritis first-match worst-wins (Brahmer 2018 Table 6.1): fold = creatinine_mg_dl / baseline_creatinine_mg_dl; delta = creatinine_mg_dl - baseline_creatinine_mg_dl. Grade 4 if dialysis_indicated or life_threatening; else grade 3 if fold > 3 or creatinine_mg_dl >= 4.0 or hospitalization_indicated; else grade 2 if fold > 2; else grade 1 if fold >= 1.5 or delta >= 0.3; else grade 0. icpi_action: 0 continue, 1 consider_hold, 2 hold, 3-4 permanently_discontinue. mg/dL only. Not KDIGO/AKIN. magent does not assay creatinine. Not a diagnosis. Not a steroid dose",
"creatinine_mg_dl": 1.6,
"criteria": [
{
"factor": "dialysis_indicated",
"met": false
},
{
"factor": "life_threatening",
"met": false
},
{
"value": 1.6,
"factor": "fold_gt_3",
"met": false
},
{
"value": 1.6,
"factor": "creatinine_ge_4",
"met": false
},
{
"factor": "hospitalization_indicated",
"met": false
},
{
"value": 1.6,
"factor": "fold_gt_2",
"met": false
},
{
"value": 1.6,
"factor": "fold_ge_1_5",
"met": true
},
{
"value": 0.6,
"factor": "delta_ge_0_3",
"met": true
}
],
"baseline_creatinine_mg_dl": 1.0,
"grade": 1,
"hospitalization_indicated": false,
"icpi_action": "consider_hold",
"life_threatening": false,
"dialysis_indicated": false
},
{
"fold": 1.6,
"delta": 0.6,
"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.",
"citation": {
"authors": "Brahmer JR, Lacchetti C, Schneider BJ, Atkins MB, Brassil KJ, Caterino JM, Chau I, Ernstoff MS, Gardner JM, Ginex P, Hallmeyer S, Holter Chakrabarty J, Leighl NB, Mammen JS, McDermott DF, Naing A, Nastoupil LJ, Phillips T, Porter LD, Puzanov I, Reichner CA, Santomasso BD, Seigel C, Spira A, Suarez-Almazor ME, Wang Y, Weber JS, Wolchok JD, Thompson JA",
"doi": "10.1200/JCO.2017.77.6385",
"id": "brahmer-2018",
"pmid": "29442540",
"source": "J Clin Oncol. 2018;36(17):1714-1768",
"title": "Management of Immune-Related Adverse Events in Patients Treated With Immune Checkpoint Inhibitor Therapy: American Society of Clinical Oncology Clinical Practice Guideline"
},
"formula": "irae_nephritis",
"formula_expression": "irae_nephritis first-match worst-wins (Brahmer 2018 Table 6.1): fold = creatinine_mg_dl / baseline_creatinine_mg_dl; delta = creatinine_mg_dl - baseline_creatinine_mg_dl. Grade 4 if dialysis_indicated or life_threatening; else grade 3 if fold > 3 or creatinine_mg_dl >= 4.0 or hospitalization_indicated; else grade 2 if fold > 2; else grade 1 if fold >= 1.5 or delta >= 0.3; else grade 0. icpi_action: 0 continue, 1 consider_hold, 2 hold, 3-4 permanently_discontinue. mg/dL only. Not KDIGO/AKIN. magent does not assay creatinine. Not a diagnosis. Not a steroid dose",
"creatinine_mg_dl": 1.6,
"criteria": [
{
"factor": "dialysis_indicated",
"met": false
},
{
"factor": "life_threatening",
"met": false
},
{
"value": 1.6,
"factor": "fold_gt_3",
"met": false
},
{
"value": 1.6,
"factor": "creatinine_ge_4",
"met": false
},
{
"factor": "hospitalization_indicated",
"met": false
},
{
"value": 1.6,
"factor": "fold_gt_2",
"met": false
},
{
"value": 1.6,
"factor": "fold_ge_1_5",
"met": true
},
{
"value": 0.6,
"factor": "delta_ge_0_3",
"met": true
}
],
"baseline_creatinine_mg_dl": 1.0,
"grade": 1,
"hospitalization_indicated": false,
"icpi_action": "consider_hold",
"life_threatening": false,
"dialysis_indicated": false
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | irae_nephritis |
formula_expression |
string | Brahmer 2018 Table 6.1 nephritis first-match worst-wins grade and ICPi action |
grade |
integer | 0-4. First-match: dialysis_indicated or life_threatening → 4; else fold > 3 or creatinine >= 4.0 mg/dL or hospitalization_indicated → 3; else fold > 2 → 2; else fold >= 1.5 or delta >= 0.3 → 1; else 0. Not a diagnosis. |
icpi_action |
string | continue (grade 0), consider_hold (grade 1), hold (grade 2), or permanently_discontinue (grade 3 or 4). Not a steroid dose. |
fold |
number | creatinine_mg_dl / baseline_creatinine_mg_dl, 4 decimal places |
delta |
number | creatinine_mg_dl - baseline_creatinine_mg_dl (mg/dL), 4 decimal places |
creatinine_mg_dl |
number | Current serum creatinine in mg/dL |
baseline_creatinine_mg_dl |
number | Baseline serum creatinine in mg/dL |
hospitalization_indicated |
boolean | Caller-assigned hospitalization-indicated flag |
dialysis_indicated |
boolean | Caller-assigned dialysis-indicated flag |
life_threatening |
boolean | Caller-assigned life-threatening flag |
criteria |
array | Per-factor Tree rows with factor and met for dialysis_indicated, life_threatening, fold_gt_3, creatinine_ge_4, hospitalization_indicated, fold_gt_2, fold_ge_1_5, and delta_ge_0_3 (first-match worst-wins); fold and creatinine/delta rows include value |
citation |
object | Brahmer 2018 J Clin Oncol citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"fold": 1.6,
"delta": 0.6,
"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.",
"citation": {
"authors": "Brahmer JR, Lacchetti C, Schneider BJ, Atkins MB, Brassil KJ, Caterino JM, Chau I, Ernstoff MS, Gardner JM, Ginex P, Hallmeyer S, Holter Chakrabarty J, Leighl NB, Mammen JS, McDermott DF, Naing A, Nastoupil LJ, Phillips T, Porter LD, Puzanov I, Reichner CA, Santomasso BD, Seigel C, Spira A, Suarez-Almazor ME, Wang Y, Weber JS, Wolchok JD, Thompson JA",
"doi": "10.1200/JCO.2017.77.6385",
"id": "brahmer-2018",
"pmid": "29442540",
"source": "J Clin Oncol. 2018;36(17):1714-1768",
"title": "Management of Immune-Related Adverse Events in Patients Treated With Immune Checkpoint Inhibitor Therapy: American Society of Clinical Oncology Clinical Practice Guideline"
},
"formula": "irae_nephritis",
"formula_expression": "irae_nephritis first-match worst-wins (Brahmer 2018 Table 6.1): fold = creatinine_mg_dl / baseline_creatinine_mg_dl; delta = creatinine_mg_dl - baseline_creatinine_mg_dl. Grade 4 if dialysis_indicated or life_threatening; else grade 3 if fold > 3 or creatinine_mg_dl >= 4.0 or hospitalization_indicated; else grade 2 if fold > 2; else grade 1 if fold >= 1.5 or delta >= 0.3; else grade 0. icpi_action: 0 continue, 1 consider_hold, 2 hold, 3-4 permanently_discontinue. mg/dL only. Not KDIGO/AKIN. magent does not assay creatinine. Not a diagnosis. Not a steroid dose",
"creatinine_mg_dl": 1.6,
"criteria": [
{
"factor": "dialysis_indicated",
"met": false
},
{
"factor": "life_threatening",
"met": false
},
{
"value": 1.6,
"factor": "fold_gt_3",
"met": false
},
{
"value": 1.6,
"factor": "creatinine_ge_4",
"met": false
},
{
"factor": "hospitalization_indicated",
"met": false
},
{
"value": 1.6,
"factor": "fold_gt_2",
"met": false
},
{
"value": 1.6,
"factor": "fold_ge_1_5",
"met": true
},
{
"value": 0.6,
"factor": "delta_ge_0_3",
"met": true
}
],
"baseline_creatinine_mg_dl": 1.0,
"grade": 1,
"hospitalization_indicated": false,
"icpi_action": "consider_hold",
"life_threatening": false,
"dialysis_indicated": false
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_creatinine |
creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged. |
| 400 | invalid_baseline_creatinine |
baseline_creatinine_mg_dl must be a number from 0.1 to 20 (Brahmer 2018 baseline creatinine mg/dL). Returned before settlement; you are not charged. |
| 400 | invalid_flag |
boolean clinical flags must be true or false Returned before settlement; you are not charged. |
| 400 | invalid_items |
POST body must be a JSON object with only an items array Returned before settlement; you are not charged. |
| 400 | invalid_item_count |
items must be an array of 1 to 25 objects Returned before settlement; you are not charged. |
| 400 | invalid_item |
each items entry must be a JSON object Returned before settlement; you are not charged. |
Related tools
- AKIN — Apply Mehta 2007 Table 2 AKIN staging and return stage 0-3 as the worse of the creatinine and urine-output limbs, with initiated renal replacement therapy mapping to stage 3.
- RIFLE — Apply Bellomo 2004 Fig. 1 RIFLE classification and return the worse of the creatinine and urine-output limbs (none, risk, injury, failure), with persistent ARF beyond 4 weeks mapping to loss and ESRD beyond 3 months mapping to esrd.
Payment
Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s. Unpaid valid requests return HTTP 402 with a base64
PAYMENT-REQUIRED
header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake
and shared payment errors: Payments.
Stdio MCP: /docs/mcp.
Guarantees
- HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged. HTTP 402 never includes the tool JSON.
- exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
- HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
- Execution is timeout-bounded and concurrency-capped.
- Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.