# Seattle Heart Failure Model (SHFM) Survival Calculator

> Seattle Heart Failure Model (SHFM) Survival 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-14).

Computes 1-, 2-, and 3-year survival probabilities for heart failure patients using the Levy 2006 Seattle Heart Failure Model Table 2 multivariate hazard ratios

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/shfm
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/seattle-heart-failure-model-shfm-survival-calculator-1f2506a2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vekvVr5SQJHSoZVU0UpJu

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 seattle-heart-failure-model-shfm-survival-calculator-1f2506a2
```

Example prompt: Run the Seattle Heart Failure Model for a 68-year-old male with NYHA class 3 heart failure, ejection fraction 25%, ischemic etiology, SBP 110 mmHg, weight 85 kg, furosemide equivalent 80 mg/day, sodium 136 mEq/L, total cholesterol 180 mg/dL, hemoglobin 12.5 g/dL, lymphocytes 18%, uric acid 7.2 mg/dL, no allopurinol, on ACE inhibitor and beta-blocker, no ARB, no K-sparing diuretic, on a statin, no BiV pacemaker, no ICD, no BiV-ICD — and give me his 1-, 2-, and 3-year survival estimates.

## When to prefer this

Choose this endpoint when you need a validated, published heart failure prognostic model (Levy 2006 SHFM) that incorporates both clinical variables and medication/device therapies simultaneously. It is preferred over generic mortality calculators when the patient has heart failure and you need 1-, 2-, or 3-year survival estimates that account for NYHA class, EF, labs, and multi-drug therapy. Use it when the caller can supply all required clinical inputs including labs, medication status, and device history.

## Known failure modes

- Missing required query parameters returns a validation error
- Age outside 14–100 range may be rejected or produce unreliable results
- Mutually exclusive device flags (e.g., icd=true and biv_icd=true simultaneously) may cause model inconsistency
- Invalid enum values for sex or nyha return a 400 error
- Payment not provided or insufficient USDC results in 402 Payment Required
- Lab values outside physiologically plausible ranges may produce extrapolated results without warning

## How this service works

Levy 2006 Seattle Heart Failure Model 1-, 2-, and 3-year survival from Table 2 multivariate HRs. Score = sum of ln(HR)*x; S(t)=exp(-0.0405*t)**exp(score). Age, sex, NYHA, EF, ischemic etiology, SBP, furosemide-eq diuretic, labs, and already-on ACEI, beta-blocker, ARB, K-sparing diuretic, statin, BiV, ICD, or BiV-ICD. Caller assigns class, etiology, and therapy. magent does not measure labs or blood pressure. Not a diagnosis, prescription, or device order.

## Output

Returns the SHFM composite score (sum of ln(HR)*x terms) and S(t)=exp(-0.0405*t)^exp(score) survival probabilities at 1, 2, and 3 years, derived from Levy 2006 Table 2 multivariate hazard ratios. The output reflects the patient's predicted probability of being alive at each time point given their clinical profile and current therapy.

## 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",
      "sex",
      "nyha",
      "ef_percent",
      "ischemic",
      "sbp_mm_hg",
      "weight_kg",
      "loop_diuretic_furosemide_eq_mg_day",
      "allopurinol",
      "sodium_meq_l",
      "total_cholesterol_mg_dl",
      "hemoglobin_g_dl",
      "lymphocyte_percent",
      "uric_acid_mg_dl",
      "ace_inhibitor",
      "beta_blocker",
      "arb",
      "k_sparing_diuretic",
      "statin",
      "biv_pacemaker",
      "icd",
      "biv_icd"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (integer 14-100). Levy 2006 Table 2: per decade, multivariate HR 1.090. magent does not take a date of birth."
      },
      "arb": {
       "type": "boolean",
       "description": "Patient already on an angiotensin-receptor blocker as assigned by the caller (true or false). Table 2 already-on HR 0.85. Not a prescription."
      },
      "icd": {
       "type": "boolean",
       "description": "Patient already has an ICD (without biventricular pacing) as assigned by the caller (true or false). Table 2 already-on HR 0.73. Mutually exclusive with biv_pacemaker and biv_icd. Not a device order."
      },
      "sex": {
       "enum": [
        "female",
        "male"
       ],
       "type": "string",
       "description": "Sex used by the forced Table 2 male HR 1.089 (female or male). magent does not assign sex."
      },
      "nyha": {
       "enum": [
        1,
        2,
        3,
        4
       ],
       "type": "integer",
       "description": "NYHA class 1-4 as assigned by the caller (integer). Levy 2006 Table 2 multivariate HR 1.600 per class. magent does not examine the patient."
      },
      "statin": {
       "type": "boolean",
       "description": "Patient already on a statin as assigned by the caller (true or false). Table 2 already-on / multivariate HR 0.63. Not a prescription."
      },
      "biv_icd": {
   
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/seattle-heart-failure-model-shfm-survival-calculator-1f2506a2/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)
