# TIMI UA/NSTEMI Risk Score Calculator

> TIMI UA/NSTEMI 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-09-15).

Calculates the TIMI risk score (0–7) for unstable angina and NSTEMI from patient age and six clinical flags, returning the total and component breakdown.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/timi_ua_nstemi
- 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/timi-ua-nstemi-risk-score-calculator-af6b68e6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wuYrJwrlVGn-4-sBFdIwA

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 timi-ua-nstemi-risk-score-calculator-af6b68e6
```

Example prompt: Calculate the TIMI risk score for a 68-year-old patient who has known CAD with stenosis over 50%, had 3 angina episodes in the last 24 hours, shows ST deviation on ECG, has elevated cardiac markers, has been taking aspirin for the past week, and has 3 or more CAD risk factors.

## When to prefer this

Use this endpoint when you need a fast, deterministic, evidence-based TIMI risk score for an unstable angina or NSTEMI patient and already have the clinical flags assigned by a clinician. It is ideal for automating documentation, populating risk stratification fields in clinical workflows, or double-checking manual calculations. It does not interpret ECGs or expand risk factor lists — those must be pre-assigned by the caller. Prefer this over general-purpose LLM reasoning for TIMI scoring because it guarantees mathematical correctness and returns a citable published formula (Antman 2000).

## Known failure modes

- Missing required query parameters (age or any of the six boolean flags) returns a validation error
- Age outside 18–120 range may be rejected or flagged
- Non-boolean values for flag parameters cause schema validation failures
- Payment failure (x402) if USDC balance is insufficient
- Network timeout on the remote API

## How this service works

TIMI risk score for unstable angina / NSTEMI from age and six caller-assigned flags. Returns the 0-7 point total and components. Deterministic published score with citation; not an invasive-strategy protocol.

## Output

Returns the integer TIMI UA/NSTEMI total score from 0 to 7 along with the individual point contributions from each of the seven components (age ≥65, ≥3 CAD risk factors, known CAD, aspirin use, severe angina, ST deviation, elevated markers), with a citation to the published scoring system.

## 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",
      "cad_risk_factors_ge_3",
      "known_cad",
      "aspirin_last_7d",
      "severe_angina",
      "st_deviation",
      "elevated_markers"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (18-120). Age ≥65 scores 1."
      },
      "known_cad": {
       "type": "boolean",
       "description": "Known CAD (stenosis ≥50%). true or false."
      },
      "st_deviation": {
       "type": "boolean",
       "description": "ST deviation ≥0.5 mm as assigned by the caller. true or false. magent does not read ECGs."
      },
      "severe_angina": {
       "type": "boolean",
       "description": "Severe angina (≥2 episodes in 24 hours). true or false."
      },
      "aspirin_last_7d": {
       "type": "boolean",
       "description": "Aspirin use in the last 7 days. true or false."
      },
      "elevated_markers": {
       "type": "boolean",
       "description": "Elevated cardiac markers as assigned by the caller. true or false."
      },
      "cad_risk_factors_ge_3": {
       "type": "boolean",
       "description": "≥3 CAD risk factors as assigned by the caller. true or false. magent does not expand smoking, hypertension, family history, diabetes, or cholesterol."
      }
     }
    }
   },
   "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/timi_ua_nstemi",
  "count": 2,
  "items": [
   {
    "score": 0,
    "formula": "timi_ua_nstemi",
    "citation": {
     "id": "antman-2000",
     "doi": "10.1001/jama.284.7.835",
     "title": "The TIMI risk score for unstable angina/non–ST elevation MI: A method for prognostication and therapeutic decision making",
     "source": "JAMA. 2000;284(7):835-842",
     "authors": "Antman EM, Cohen M, Bernink PJLM, et al."
    },
    "age_years": 50,
    "max_score": 7,
    "components": [
     {
      "value": 50,
      "factor": "age_ge_65",
      "points": 0,
      "present": false
     },
     {
      "factor": "cad_risk_factors_ge_3",
      "points": 0,
      "present": false
     },
     {
      "factor": "known_cad",
      "points": 0,
      "present": false
     },
     {
      "factor": "aspirin_last_7d",
      "points": 0,
      "present": false
     },
     {
      "factor": "severe_angina",
      "points": 0,
      "present": false
     },
     {
      "factor": "st_deviation",
      "points": 0,
      "present": false
     },
     {
      "factor": "elevated_markers",
      "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": "TIMI UA/NSTEMI = age_ge_65 + cad_risk_factors_ge_3 + known_cad + aspirin_last_7d + severe_angina + st_deviation + elevated_markers; each 1 if present; max 7"
   },
   {
    "score": 0,
    "formula": "timi_ua_nstemi",
    "citation": {
     "id": "antman-2000",
     "doi": "10.1001/jama.284.7.835",
     "title": "The TIMI risk score for unstable angina/non–ST elevation MI: A method for prognostication and therapeutic decision making",
     "source": "JAMA. 2000;284(7):835-842",
     "authors": "Antman EM, Cohen M, Bernink PJLM, et al."
    },
    "age_years": 50,
    "max_score": 7,
    "components": [
     {
      "value": 50,
      "factor": "age_ge_65",
      "points": 0,
      "present": false
     },
     {
      "factor": "cad_risk_factors_ge_3",
      "points": 0,
      "present": false
     },
     {
      "factor": "known_cad",
      "points": 0,
      "present": false
     },
     {
      "factor": "aspirin_last_7d",
      "points": 0,
      "present": false
     },
     {
      "factor": "severe_angina",
      "points": 0,
      "present
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/timi-ua-nstemi-risk-score-calculator-af6b68e6/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)
