# magent HAT Score Calculator (sICH after Stroke Thrombolysis)

> magent HAT Score Calculator (sICH after Stroke Thrombolysis) 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-13).

Computes the HAT (Hemorrhage After Thrombolysis) score to estimate risk of symptomatic intracranial hemorrhage (sICH) following tPA stroke treatment

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/hat
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/magent-hat-score-calculator-sich-after-stroke-thrombolysis-c76c75c4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yW31XLasL1amyv1CgcP2n

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-hat-score-calculator-sich-after-stroke-thrombolysis-c76c75c4
```

Example prompt: Calculate the HAT score for a stroke patient: NIHSS is 17, history of diabetes, baseline glucose is 190 mg/dL, and CT shows hypodensity less than one-third of the MCA territory.

## When to prefer this

Use this endpoint when you need a fast, validated HAT score computation following the Lou 2008 Neurology methodology for sICH risk after stroke thrombolysis. Prefer it over manual calculation when integrating clinical decision support into stroke workflows, EHR pipelines, or agent-based triage systems. This is specifically the HAT score — not the SEDAN, SITS-SICH, or other post-thrombolysis hemorrhage risk tools.

## Known failure modes

- Missing required parameters (diabetes, nihss, hypodensity) returns a validation error
- Both glucose_mg_dl and glucose_mmol_l provided simultaneously causes a rejection
- NIHSS value outside 0–42 integer range may be rejected or produce unexpected output
- Glucose at exactly 200 mg/dL does not score the glucose item — borderline edge case
- Hypodensity value not matching enum (none, less_than_third, greater_than_third) returns error
- Payment failure (x402) if USDC balance insufficient

## How this service works

HAT (Lou 2008 Neurology) for sICH after stroke thrombolysis. Diabetes or glucose >200 mg/dL (1; not additive). NIHSS <15 0, 15-20 1, >20 2. CT hypodensity none 0, <1/3 MCA 1, >1/3 MCA 2 (no equals-1/3). Max 5. Collective sICH 2/5/10/15/44% for scores 0/1/2/3/>3. Glucose in mg/dL (mmol × 18). Not a tPA withhold. magent does not assign NIHSS or read CT.

## Output

Returns a HAT total score (0–5) and associated collective sICH probability: 2% for score 0, 5% for score 1, 10% for score 2, 15% for score 3, and 44% for scores above 3. The response reflects the Lou 2008 validated scoring categories. This is not a tPA withholding recommendation and does not include NIHSS computation or CT interpretation.

## 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": [
      "diabetes",
      "nihss",
      "hypodensity"
     ],
     "properties": {
      "nihss": {
       "type": "integer",
       "description": "Caller-assigned pretreatment NIH Stroke Scale total (integer 0-42). <15 scores 0; 15-20 scores 1; >20 scores 2 (Lou 2008). magent does not compute NIHSS or examine the patient."
      },
      "diabetes": {
       "type": "boolean",
       "description": "History of diabetes mellitus (Lou 2008). true scores 1 on the diabetes-or-glucose item; not additive with glucose >200 mg/dL."
      },
      "hypodensity": {
       "enum": [
        "none",
        "less_than_third",
        "greater_than_third"
       ],
       "type": "string",
       "description": "Easily visible hypodensity on initial CT as assigned by the caller (Lou 2008). none scores 0; less_than_third (<1/3 MCA) scores 1; greater_than_third (>1/3 MCA) scores 2. No published equals-1/3 category. magent does not read the CT."
      },
      "glucose_mg_dl": {
       "type": "number",
       "description": "Baseline glucose in mg/dL (50-1000). Provide this or glucose_mmol_l, not both. >200 scores 1 on the diabetes-or-glucose item if diabetes is false; 200.0 does not (Lou 2008)."
      },
      "glucose_mmol_l": {
       "type": "number",
       "description": "Baseline glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. Converted as mg/dL = mmol/L × 18. Scores 1 on the diabetes-or-glucose item if >200 mg/dL after conversion (200.0 does not)."
      }
     }
    }
   },
   "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-hat-score-calculator-sich-after-stroke-thrombolysis-c76c75c4/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)
