# ROPE Score Calculator (Risk of Paradoxical Embolism)

> ROPE Score Calculator (Risk of Paradoxical Embolism) 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 ROPE score (Kent 2013) to estimate the likelihood that a patent foramen ovale (PFO) is responsible for a cryptogenic stroke, based on age decade and five clinical flags.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/rope
- 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/rope-score-calculator-risk-of-paradoxical-embolism-9701fb1b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RMWlWuzEs9zTrBW79YSAR

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 rope-score-calculator-risk-of-paradoxical-embolism-9701fb1b
```

Example prompt: Calculate the ROPE score for a 45-year-old patient who has no hypertension, no diabetes, no prior stroke or TIA, is a nonsmoker, and has a cortical infarct on imaging.

## When to prefer this

Use this endpoint when you need a fast, deterministic ROPE score computation per Kent 2013 (Neurology) Table 4 for a cryptogenic stroke patient with known or suspected PFO. It is not a replacement for clinical imaging interpretation, PFO diagnosis, or closure indication assessment. Prefer this over manual arithmetic when integrating ROPE into automated clinical workflows or decision-support pipelines.

## Known failure modes

- Missing any required query parameter (age, no_hypertension, no_diabetes, no_prior_stroke_tia, nonsmoker, cortical_infarct) returns an error
- Age below 18 or non-integer age value rejected
- Boolean flags supplied as non-boolean values cause validation error
- Payment failure or insufficient USDC balance returns 402 Payment Required

## How this service works

ROPE (Risk of Paradoxical Embolism; Kent 2013 Neurology Table 4) from age decades (18-29 5, 30-39 4, 40-49 3, 50-59 2, 60-69 1, >=70 0) plus five caller-assigned 1-point factors (no hypertension, no diabetes, no prior stroke/TIA, nonsmoker, cortical infarct). Score 0-10 with abstract groupings 0-3, 4-8 residual, and 9-10. Not a PFO diagnosis, not a closure indication, not PASCAL. magent does not read imaging or a smoking history.

## Output

Returns a ROPE score integer from 0 to 10 derived from age-decade points and five binary clinical flags, plus the abstract risk grouping (0–3, 4–8 residual, or 9–10) indicating how likely the patient's stroke is attributable to a PFO versus other causes.

## 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",
      "no_hypertension",
      "no_diabetes",
      "no_prior_stroke_tia",
      "nonsmoker",
      "cortical_infarct"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (18-120). Kent 2013 Table 4: 18-29 scores 5; 30-39 scores 4; 40-49 scores 3; 50-59 scores 2; 60-69 scores 1; 70 or older scores 0."
      },
      "nonsmoker": {
       "type": "boolean",
       "description": "Nonsmoker (Kent 2013). Caller-assigned. magent does not read a smoking history. true scores 1; false scores 0."
      },
      "no_diabetes": {
       "type": "boolean",
       "description": "Absence of diabetes (Kent 2013). Caller-assigned. true scores 1; false scores 0."
      },
      "no_hypertension": {
       "type": "boolean",
       "description": "Absence of hypertension (Kent 2013). Caller-assigned. true scores 1; false scores 0."
      },
      "cortical_infarct": {
       "type": "boolean",
       "description": "Cortical infarct on imaging (Kent 2013). Caller-assigned. magent does not read imaging. true scores 1; false scores 0."
      },
      "no_prior_stroke_tia": {
       "type": "boolean",
       "description": "Absence of prior stroke or TIA (Kent 2013). Caller-assigned. true scores 1; false scores 0."
      }
     }
    }
   },
   "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/rope",
  "count": 2,
  "items": [
   {
    "score": 0,
    "formula": "rope",
    "citation": {
     "id": "kent-2013",
     "doi": "10.1212/WNL.0b013e3182a08d59",
     "pmid": "23864310",
     "title": "An index to identify stroke-related vs incidental patent foramen ovale in cryptogenic stroke",
     "source": "Neurology. 2013;81(7):619-625",
     "authors": "Kent DM, Ruthazer R, Weimar C, Mas JL, Serena J, Homma S, Di Angelantonio E, Di Tullio MR, Lutz JS, Elkind MSV, Griffith J, Jaigobin C, Mattle HP, Michel P, Mono ML, Nedeltchev K, Papetti F, Thaler DE"
    },
    "age_years": 70,
    "max_score": 10,
    "components": [
     {
      "value": 70,
      "factor": "age",
      "points": 0,
      "present": false
     },
     {
      "factor": "no_hypertension",
      "points": 0,
      "present": false
     },
     {
      "factor": "no_diabetes",
      "points": 0,
      "present": false
     },
     {
      "factor": "no_prior_stroke_tia",
      "points": 0,
      "present": false
     },
     {
      "factor": "nonsmoker",
      "points": 0,
      "present": false
     },
     {
      "factor": "cortical_infarct",
      "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.",
    "rope_stratum": "0_to_3",
    "formula_expression": "ROPE = age_points + no_hypertension 1 + no_diabetes 1 + no_prior_stroke_tia 1 + nonsmoker 1 + cortical_infarct 1; age 18-29 5, 30-39 4, 40-49 3, 50-59 2, 60-69 1, >=70 0; Kent 2013 Table 4; max 10"
   },
   {
    "score": 0,
    "formula": "rope",
    "citation": {
     "id": "kent-2013",
     "doi": "10.1212/WNL.0b013e3182a08d59",
     "pmid": "23864310",
     "title": "An index to identify stroke-related vs incidental patent foramen ovale in cryptogenic stroke",
     "source": "Neurology. 2013;81(7):619-625",
     "authors": "Kent DM, Ruthazer R, Weimar C, Mas JL, Serena J, Homma S, Di Angelantonio E, Di Tullio MR, Lutz JS, Elkind MSV, Griffith J, Jaigobin C, Mattle HP, Michel P, Mono ML, Nedeltchev K, Papetti F, Thaler DE"
    },
    "age_years": 70,
    "max_score": 10,
    "components": [
     {
      "value": 70,
      "factor": "age",
      "points": 0,
      "present": false
     },
     {
      "factor": "no_hypertension",
      "points": 0,
      "present": false

… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/rope-score-calculator-risk-of-paradoxical-embolism-9701fb1b/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)
