# magent ASTRAL Score Calculator

> magent ASTRAL 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-09-13).

Computes the Ntaios 2012 ASTRAL integer score to predict 3-month unfavorable functional outcome (mRS >2) after acute ischemic stroke

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/astral
- 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-astral-score-calculator-56d90486
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rzEhNMAXcIfKDxRPoLhfX

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-astral-score-calculator-56d90486
```

Example prompt: Calculate the ASTRAL score for a 75-year-old ischemic stroke patient with a caller-assigned NIHSS of 14, onset-to-admission delay over 180 minutes, a visual field defect present, admission glucose of 160 mg/dL, and no impaired consciousness.

## When to prefer this

Choose this endpoint when you need a validated, guideline-referenced integer prognostic score for 3-month mRS outcome after acute ischemic stroke and all five required clinical inputs (age, NIHSS, delay, visual field defect, impaired consciousness) are already available from the clinician. It is not a tPA eligibility or treatment decision tool. Prefer it over manual calculation to avoid arithmetic errors in the weighted ASTRAL formula, especially in research pipelines or EHR-integrated clinical decision support.

## Known failure modes

- Missing required parameters (age, nihss, delay_gt_180, visual_field_defect, loc_impaired) returns a validation error
- Both glucose_mg_dl and glucose_mmol_l supplied simultaneously causes a conflict error
- Age outside 18–120 or NIHSS outside 0–42 range may return a validation or out-of-range error
- Glucose value outside expected range (mg/dL 50–1000 or mmol/L 2.8–55.5) may be rejected
- Missing payment header (x402) results in 402 Payment Required response

## How this service works

Ntaios 2012 ASTRAL integer score for 3-month mRS >2 in acute ischemic stroke. Age 1/5 years + NIHSS (caller 0-42) + 2 if onset-to-admission >180 min + 2 if visual field defect + 1 if glucose <3.7 or >7.3 mmol/L (mg/dL /18) + 3 if impaired consciousness. Score 31 is 50% unfavorable. Not a tPA decision. magent does not compute NIHSS.

## Output

Returns the computed ASTRAL integer score derived from weighted contributions of age, NIHSS, onset-to-admission delay, visual field defect, glucose level, and impaired consciousness; a score ≥31 indicates approximately 50% probability of unfavorable 3-month functional outcome (mRS >2). The endpoint does not compute NIHSS or assess the patient directly — all clinical values must be caller-supplied.

## 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",
      "nihss",
      "delay_gt_180",
      "visual_field_defect",
      "loc_impaired"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (18-120). Ntaios 2012 integer weight is 1 point per 5 years (integer division). magent does not date the patient."
      },
      "nihss": {
       "type": "integer",
       "description": "Caller-assigned NIH Stroke Scale total (integer 0-42). 1 point per NIHSS point. magent does not compute NIHSS or examine the patient."
      },
      "delay_gt_180": {
       "type": "boolean",
       "description": "Onset-to-admission delay >180 minutes (Ntaios 2012 time item). true scores 2; false (including 180 min) scores 0. magent does not clock the delay."
      },
      "loc_impaired": {
       "type": "boolean",
       "description": "Impaired consciousness as assigned by the caller (Ntaios 2012; NIHSS item 1a >0). true scores 3; false scores 0. magent does not compute NIHSS."
      },
      "glucose_mg_dl": {
       "type": "number",
       "description": "Admission glucose in mg/dL (50-1000). Converted as mmol/L = mg/dL / 18. Provide this or glucose_mmol_l, not both."
      },
      "glucose_mmol_l": {
       "type": "number",
       "description": "Admission glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. 1 point if <3.7 or >7.3; 3.7 and 7.3 do not score."
      },
      "visual_field_defect": {
       "type": "boolean",
       "description": "Any stroke-related visual field defect as assigned by the caller (Ntaios 2012 range of visual fields). true scores 2; false scores 0. magent does not examine the patient."
      }
     }
    }
   },
   "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-astral-score-calculator-56d90486/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)
