# ABCD2 TIA Stroke Risk Score Calculator

> ABCD2 TIA Stroke Risk Score Calculator is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-10).

Calculates the ABCD2 score (Johnston 2007) to estimate early stroke risk after a transient ischemic attack (TIA), based on age, blood pressure, clinical features, symptom duration, and diabetes.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/abcd2?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/abcd2-tia-stroke-risk-score-calculator-0e24c48d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HdCRKGBywlkYF-oExse2_

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 abcd2-tia-stroke-risk-score-calculator-0e24c48d
```

Example prompt: Calculate the ABCD2 stroke-risk score for a 68-year-old patient with TIA who had a systolic BP of 155 and diastolic of 92, presented with unilateral weakness, symptoms lasting 75 minutes, and has a history of diabetes.

## When to prefer this

Use this endpoint when you need the specific ABCD2 (Johnston 2007) score — not ABCD (Rothwell 2005) or ABCD3-I — for early two-day stroke risk stratification after TIA. Ideal for clinical documentation workflows, automated triage tools, or risk band reporting where a deterministic, peer-cited formula is required and the caller already has all six input values from chart or triage data.

## Known failure modes

- Missing required query parameters returns a validation error
- Diastolic value equal to or exceeding systolic returns an error
- Age outside 18–120 range or duration outside 0–1440 minutes is rejected
- Invalid clinical_features enum string returns an error
- Blood pressure values outside plausible ranges (systolic 50–250, diastolic 20–160) are rejected

## How this service works

Deterministic published-formula arithmetic plus ICD-10-CM, RxNorm, and LOINC. Pay in USDC on Base via x402.

## Output

Returns the numeric ABCD2 total score (0–7) and the corresponding risk band (low: 0–3, moderate: 4–5, high: 6–7), based on the deterministic Johnston 2007 scoring algorithm. Does not include a diagnosis or admission recommendation.

## 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": [
      "age",
      "systolic_mm_hg",
      "diastolic_mm_hg",
      "clinical_features",
      "duration_min",
      "diabetes"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (18-120). Age ≥60 scores 1; 59 scores 0."
      },
      "diabetes": {
       "type": "boolean",
       "description": "Diabetes mellitus. true scores 1; false scores 0."
      },
      "duration_min": {
       "type": "integer",
       "description": "Symptom duration in minutes (integer 0-1440). Under 10 scores 0; 10-59 scores 1; 60 or more scores 2."
      },
      "systolic_mm_hg": {
       "type": "number",
       "description": "Cuff systolic blood pressure in mm Hg (50-250). ≥140 scores 1."
      },
      "diastolic_mm_hg": {
       "type": "number",
       "description": "Cuff diastolic blood pressure in mm Hg (20-160). Must be less than systolic. ≥90 scores 1."
      },
      "clinical_features": {
       "type": "string",
       "description": "Caller-assigned TIA features. none scores 0; speech_without_weakness scores 1; unilateral_weakness scores 2. Mutually exclusive. magent does not examine the patient."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/abcd2",
  "count": 2,
  "items": [
   {
    "score": 0,
    "formula": "abcd2",
    "citation": {
     "id": "johnston-2007",
     "doi": "10.1016/S0140-6736(07)60150-0",
     "title": "Validation and refinement of scores to predict very early stroke risk after transient ischaemic attack",
     "source": "Lancet. 2007;369(9558):283-292",
     "authors": "Johnston SC, Rothwell PM, Nguyen-Huynh MN, et al."
    },
    "age_years": 55,
    "max_score": 7,
    "abcd2_band": "0-3",
    "components": [
     {
      "value": 55,
      "factor": "age",
      "points": 0,
      "present": false
     },
     {
      "factor": "blood_pressure",
      "points": 0,
      "present": false,
      "systolic_mm_hg": 120,
      "diastolic_mm_hg": 80
     },
     {
      "value": "none",
      "factor": "clinical_features",
      "points": 0,
      "present": false
     },
     {
      "value": 5,
      "factor": "duration_min",
      "points": 0,
      "present": false
     },
     {
      "factor": "diabetes",
      "points": 0,
      "present": false
     }
    ],
    "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.",
    "formula_expression": "ABCD2 = age_ge_60 + blood_pressure + clinical_features + duration + diabetes; age >=60 1; SBP >=140 or DBP >=90 1; none 0 / speech_without_weakness 1 / unilateral_weakness 2; duration <10 0, 10-59 1, >=60 2; diabetes 1; bands 0-3 / 4-5 / 6-7; max 7"
   },
   {
    "score": 0,
    "formula": "abcd2",
    "citation": {
     "id": "johnston-2007",
     "doi": "10.1016/S0140-6736(07)60150-0",
     "title": "Validation and refinement of scores to predict very early stroke risk after transient ischaemic attack",
     "source": "Lancet. 2007;369(9558):283-292",
     "authors": "Johnston SC, Rothwell PM, Nguyen-Huynh MN, et al."
    },
    "age_years": 55,
    "max_score": 7,
    "abcd2_band": "0-3",
    "components": [
     {
      "value": 55,
      "factor": "age",
      "points": 0,
      "present": false
     },
     {
      "factor": "blood_pressure",
      "points": 0,
      "present": false,
      "systolic_mm_hg": 120,
      "diastolic_mm_hg": 80
     },
     {
      "value": "none",
      "factor": "clinical_features",
      "points": 0,
      "present": false
     },
     {
      "value": 5,
      "factor": "duration_min",
     
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/abcd2-tia-stroke-risk-score-calculator-0e24c48d/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)
