# magent irAE Colitis Grade Calculator (Brahmer 2018)

> magent irAE Colitis Grade Calculator (Brahmer 2018) 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).

Calculates immune-related adverse event (irAE) colitis grade (1–4) per Brahmer 2018 ASCO Table 2.1 and returns the corresponding ICI (immune checkpoint inhibitor) management action.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/irae_colitis
- 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-colitis-grade-calculator-brahmer-2018-279e6a37
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AWKW-CnoQ_QJEykMC3eJw

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-colitis-grade-calculator-brahmer-2018-279e6a37
```

Example prompt: Grade the irAE colitis for a patient who has 5 stools over baseline, is not incontinent, has hospitalization indicated, is not limiting self-care, and is not life-threatening — and tell me what ICI action to take.

## When to prefer this

Choose this endpoint when you need a fast, rule-based irAE colitis grade and ICI action recommendation strictly following Brahmer 2018 ASCO Table 2.1 — particularly useful in agentic oncology workflows where caller-assigned clinical flags (incontinence, hospitalization, life-threatening) are already available and you need a structured, auditable grading output without LLM interpretation. Not appropriate when ostomy-output banding is required, steroid dosing is needed, or a licensed clinical judgment is sought.

## Known failure modes

- Missing required query parameters returns a validation error
- stools_over_baseline outside integer range 0–40 may cause rejection or unexpected behavior
- Ostomy-output increase is not supported as an input and will not be graded correctly
- Conflicting flags (e.g., life_threatening=false but all grade-3 flags false and stools<4) defaults to grade 1
- Payment failure (402) if USDC balance is insufficient for the $0.005 per-call fee

## How this service works

Brahmer 2018 ASCO Table 2.1 irAE colitis grade from stools_over_baseline (0-40) and four caller-assigned flags. First-match: grade 4 if life_threatening; else 3 if stools >= 7 or incontinence or hospitalization_indicated or limiting_self_care; else 2 if stools >= 4; else 1. Returns icpi_action continue, hold, hold_consider_discontinue_ctla4, or permanently_discontinue. Ostomy-output bands not implemented. magent does not count stools. Not a medical device, not a diagnosis, not a steroid dose.

## Output

Returns the irAE colitis grade (1–4) computed by first-match logic from the Brahmer 2018 ASCO Table 2.1 algorithm, plus the recommended ICI management action string: one of 'continue', 'hold', 'hold_consider_discontinue_ctla4', or 'permanently_discontinue'. Does not include steroid dosing, patient examination, or stool counting.

## 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": [
      "stools_over_baseline",
      "incontinence",
      "hospitalization_indicated",
      "limiting_self_care",
      "life_threatening"
     ],
     "properties": {
      "incontinence": {
       "type": "boolean",
       "description": "Incontinence as assigned by the caller (Brahmer 2018 Table 2.1 grade 3). true or false. When true and life_threatening is false, grade is 3. magent does not examine the patient."
      },
      "life_threatening": {
       "type": "boolean",
       "description": "Life-threatening consequences with urgent intervention indicated, as assigned by the caller (Brahmer 2018 Table 2.1 grade 4). true or false. When true, grade is 4 regardless of stool count. magent does not examine the patient."
      },
      "limiting_self_care": {
       "type": "boolean",
       "description": "Limiting self-care ADL as assigned by the caller (Brahmer 2018 Table 2.1 grade 3). true or false. When true and life_threatening is false, grade is 3. magent does not assess ADL."
      },
      "stools_over_baseline": {
       "type": "integer",
       "description": "Increase of stools per day over baseline as assigned by the caller (integer 0-40; Brahmer 2018 Table 2.1 CTCAE diarrhea). Fewer than four is grade 1; four to six is grade 2; seven or more is grade 3 unless life_threatening is true. Ostomy-output increase is not an input. magent does not count stools."
      },
      "hospitalization_indicated": {
       "type": "boolean",
       "description": "Hospitalization indicated as assigned by the caller (Brahmer 2018 Table 2.1 grade 3). true or false. When true and life_threatening is false, grade is 3. magent does not admit the patient."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-irae-colitis-grade-calculator-brahmer-2018-279e6a37/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)
