# magent irAE Diabetes CTCAE Grade Calculator (Brahmer 2018 Table 4.4)

> magent irAE Diabetes CTCAE Grade Calculator (Brahmer 2018 Table 4.4) 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-14).

Grades immune checkpoint inhibitor (ICI)-related adverse event (irAE) diabetes severity (G0–G4) per Brahmer 2018 ASCO Table 4.4, and returns ICI management recommendation (continue, hold, admit).

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/irae_diabetes
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/magent-irae-diabetes-ctcae-grade-calculator-brahmer-2018-table-4-4-216f2863
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XZZ3RZ92C8oZF6p22iheF

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 magent-irae-diabetes-ctcae-grade-calculator-brahmer-2018-table-4-4-216f2863
```

Example prompt: Grade the irAE diabetes severity using the Brahmer 2018 Table 4.4 first-match algorithm: the patient's fasting glucose is 310 mg/dL, they have confirmed ketosis, no evidence of type 1 diabetes, symptoms are severe and limiting self-care ADL, but the situation is not immediately life-threatening — what grade and ICI management recommendation does the calculator return?

## When to prefer this

Use this endpoint when you need a fast, deterministic, rule-based Brahmer 2018 Table 4.4 irAE diabetes grade and ICI management recommendation for an oncology patient on immune checkpoint inhibitors. Prefer it over general CTCAE calculators when the specific Brahmer first-match logic (G4 if life_threatening or glucose >500; G3 if severe_unable_adl or glucose >250; G2 if ketosis or T1DM or glucose >160; G1 if glucose >99; else G0) and integrated ICI hold/continue output are required. Not appropriate for DKA diagnosis, insulin dosing, or non-ICI hyperglycemia grading.

## Known failure modes

- glucose_mg_dl out of accepted range (50–1000 mg/dL) returns an error
- glucose_mg_dl provided in mmol/L instead of mg/dL yields incorrect grade (unit conversion not performed)
- Missing required boolean flags (ketosis, t1dm, severe_unable_adl, life_threatening) causes request failure
- Caller misassigns clinical flags (e.g. life_threatening=true incorrectly) leading to over- or under-grading
- Payment not included or insufficient USDC results in HTTP 402 rejection

## How this service works

Brahmer 2018 ASCO Table 4.4 irAE diabetes from glucose_mg_dl (50-1000, mg/dL only) plus caller ketosis, t1dm, severe_unable_adl, and life_threatening. First-match: G4 if life_threatening or glucose >500; else G3 if severe_unable_adl or glucose >250; else G2 if ketosis or t1dm or glucose >160; else G1 if glucose >99; else G0. ICI continue (0-1), hold_until_control (2), hold_admit (3-4). Not DKA diagnostic criteria. magent does not assay glucose. Not a diagnosis. Not an insulin dose.

## Output

Returns a numeric irAE diabetes grade (G0–G4) derived by the Brahmer 2018 Table 4.4 first-match algorithm, plus an ICI management recommendation: continue (G0–G1), hold_until_control (G2), or hold_admit (G3–G4). Does not diagnose DKA, does not assay glucose or ketones, and does not prescribe insulin doses.

## 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": [
      "glucose_mg_dl",
      "ketosis",
      "t1dm",
      "life_threatening",
      "severe_unable_adl"
     ],
     "properties": {
      "t1dm": {
       "type": "boolean",
       "description": "Evidence of type 1 diabetes as assigned by the caller (Brahmer 2018 Table 4.4 grade 2; T1DM at any glucose). true or false. When true and grade 4/3 criteria are not met, grade is 2. magent does not diagnose diabetes."
      },
      "ketosis": {
       "type": "boolean",
       "description": "Ketosis as assigned by the caller (Brahmer 2018 Table 4.4 grade 2; ketosis at any glucose). true or false. When true and grade 4/3 criteria are not met, grade is 2. magent does not assay ketones."
      },
      "glucose_mg_dl": {
       "type": "number",
       "description": "Fasting glucose in mg/dL (50-1000). Brahmer 2018 Table 4.4 bands: >500 grade 4; >250 grade 3; >160 grade 2; >99 grade 1; else grade 0 unless a flag upgrades. mmol/L is not accepted. magent does not assay glucose."
      },
      "life_threatening": {
       "type": "boolean",
       "description": "Life-threatening consequences as assigned by the caller (Brahmer 2018 Table 4.4 grade 4). true or false. When true, grade is 4 regardless of glucose. magent does not examine the patient."
      },
      "severe_unable_adl": {
       "type": "boolean",
       "description": "Severe symptoms limiting self-care ADL as assigned by the caller (Brahmer 2018 Table 4.4 grade 3). true or false. When true and life_threatening is false and glucose is not >500, grade is 3. magent does not assess ADL."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-irae-diabetes-ctcae-grade-calculator-brahmer-2018-table-4-4-216f2863/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)
