# AIMS65 Score Calculator for Acute Upper GI Bleeding

> AIMS65 Score Calculator for Acute Upper GI Bleeding 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-15).

Calculates the Saltzman 2011 AIMS65 score (0–5) for in-hospital mortality risk stratification in acute upper gastrointestinal bleeding based on albumin, INR, mental status, systolic BP, and age.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/aims65
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aims65-score-calculator-for-acute-upper-gi-bleeding-b26ea09c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NPxZD3mjxYDzkOj7p-lIu

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 aims65-score-calculator-for-acute-upper-gi-bleeding-b26ea09c
```

Example prompt: Calculate the AIMS65 score for a 72-year-old patient with acute upper GI bleeding: albumin 2.6 g/dL, INR 1.8, systolic BP 85 mm Hg, and altered mental status reported by the admitting nurse.

## When to prefer this

Use this endpoint when you need a fast, validated AIMS65 score computation for acute upper GI bleeding risk stratification per Saltzman 2011 criteria, especially when you need to accept albumin in either g/dL or g/L, and when you need strict boundary-value handling. Prefer this over Glasgow-Blatchford or Rockall when the caller-assigned altered mental status and albumin-based criteria are the clinical focus. Not for endoscopic or post-procedure scoring.

## Known failure modes

- Missing required parameters (age, inr, altered_mental_status, systolic_mm_hg) returns a validation error
- Providing both albumin_g_dl and albumin_g_l simultaneously returns an error
- Values outside accepted ranges (e.g. age <18, INR >10, SBP <50) may be rejected
- Payment not provided or insufficient USDC results in HTTP 402 error

## How this service works

Saltzman 2011 AIMS65 for in-hospital mortality in acute upper GI bleeding: albumin <3.0 g/dL, INR >1.5, caller-assigned altered mental status, systolic BP <=90 mm Hg, and age >65; 1 point each, max 5. Albumin 3.0, INR 1.5, and age 65 do not score; SBP 90 does. Score only; no mortality percentages. Not a diagnosis. Not Glasgow-Blatchford or Rockall. magent does not assess mental status. Albumin g/dL or g/L.

## Output

Returns a numeric AIMS65 score from 0 to 5, where each of the five criteria (albumin <3.0 g/dL, INR >1.5, altered mental status, systolic BP ≤90 mm Hg, age >65) contributes 1 point if met. No mortality percentages are provided; the score alone is returned. Boundary values (albumin exactly 3.0, INR exactly 1.5, age exactly 65) do not score; systolic BP of exactly 90 does score.

## 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",
      "inr",
      "altered_mental_status",
      "systolic_mm_hg"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (18-120). Scores 1 when age >65; 65 does not score."
      },
      "inr": {
       "type": "number",
       "description": "INR (0.8-10). Scores 1 when >1.5; 1.5 does not score."
      },
      "albumin_g_l": {
       "type": "number",
       "description": "Albumin in g/L (10-60). Converted as g/dL = g/L / 10. Provide this or albumin_g_dl, not both."
      },
      "albumin_g_dl": {
       "type": "number",
       "description": "Albumin in g/dL (1-6). Provide this or albumin_g_l, not both. Scores 1 when <3.0; 3.0 does not score."
      },
      "systolic_mm_hg": {
       "type": "number",
       "description": "Cuff systolic blood pressure in mm Hg (50-250). Scores 1 when ≤90; 90 scores."
      },
      "altered_mental_status": {
       "type": "boolean",
       "description": "Altered mental status as assigned by the caller. true or false. magent does not assess mental status. 1 point if true."
      }
     }
    }
   },
   "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/aims65",
  "count": 2,
  "items": [
   {
    "inr": 1,
    "score": 0,
    "formula": "aims65",
    "citation": {
     "id": "saltzman-2011",
     "doi": "10.1016/j.gie.2011.06.024",
     "title": "A simple risk score accurately predicts in-hospital mortality, length of stay, and cost in acute upper GI bleeding",
     "source": "Gastrointest Endosc. 2011;74(6):1215-1224",
     "authors": "Saltzman JR, Tabak YP, Hyett BH, Sun X, Travis AC, Johannes RS"
    },
    "age_years": 50,
    "max_score": 5,
    "components": [
     {
      "value": 4,
      "factor": "albumin_lt_3",
      "points": 0,
      "present": false
     },
     {
      "value": 1,
      "factor": "inr_gt_1_5",
      "points": 0,
      "present": false
     },
     {
      "factor": "altered_mental_status",
      "points": 0,
      "present": false
     },
     {
      "value": 120,
      "factor": "systolic_mm_hg_le_90",
      "points": 0,
      "present": false
     },
     {
      "value": 50,
      "factor": "age_gt_65",
      "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.",
    "albumin_g_dl": 4,
    "systolic_mm_hg": 120,
    "formula_expression": "AIMS65 = (albumin_g_dl<3.0) + (inr>1.5) + altered_mental_status + (systolic_mm_hg<=90) + (age>65); each 1 if present; max 5"
   },
   {
    "inr": 1,
    "score": 0,
    "formula": "aims65",
    "citation": {
     "id": "saltzman-2011",
     "doi": "10.1016/j.gie.2011.06.024",
     "title": "A simple risk score accurately predicts in-hospital mortality, length of stay, and cost in acute upper GI bleeding",
     "source": "Gastrointest Endosc. 2011;74(6):1215-1224",
     "authors": "Saltzman JR, Tabak YP, Hyett BH, Sun X, Travis AC, Johannes RS"
    },
    "age_years": 50,
    "max_score": 5,
    "components": [
     {
      "value": 4,
      "factor": "albumin_lt_3",
      "points": 0,
      "present": false
     },
     {
      "value": 1,
      "factor": "inr_gt_1_5",
      "points": 0,
      "present": false
     },
     {
      "factor": "altered_mental_status",
      "points": 0,
      "present": false
     },
     {
      "value": 120,
      "factor": "systolic_mm_hg_le_90",
      "points": 0,
      "present": false
     },
     {
      "value": 50,
      "factor": "age_gt_65",

… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aims65-score-calculator-for-acute-upper-gi-bleeding-b26ea09c/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)
