# 4PEPS Pulmonary Embolism Probability Score Calculator

> 4PEPS Pulmonary Embolism Probability 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-14).

Computes the Roy 2021 4PEPS clinical decision score for pulmonary embolism pre-test probability, returning a numeric score and risk band (very_low, low, moderate, or high).

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/4peps
- 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/4peps-pulmonary-embolism-probability-score-calculator-42eab251
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Znaey0roBgluW17X6TZwe

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 4peps-pulmonary-embolism-probability-score-calculator-42eab251
```

Example prompt: Calculate the 4PEPS score for a 62-year-old male patient: no chronic respiratory disease, heart rate 92 bpm, presenting with chest pain and acute dyspnea, on hormonal estrogen therapy, prior VTE history, no syncope, no 4-week immobility, SpO2 at 93%, calf pain present, and PE is the most likely diagnosis.

## When to prefer this

Use this endpoint when you need a validated, rule-based computation of the Roy 2021 4PEPS pre-test probability score for pulmonary embolism, particularly in agentic clinical decision support workflows where reproducibility and audit-ability matter. Prefer this over general LLM-based clinical reasoning when you need a deterministic, scored output tied directly to published coefficients. This endpoint does not replace imaging decisions or D-dimer thresholds — it computes the structured score only.

## Known failure modes

- Missing required query parameters (e.g. age, sex, spo2_percent) return a validation error
- Out-of-range values (e.g. age <18, SpO2 outside 50–100, heart rate outside 30–220) are rejected
- pe_most_likely must be assigned by caller — endpoint does not infer clinical likelihood
- Boolean fields passed as non-boolean strings may cause parsing errors
- Score interpretation is limited to the four defined bands; caller must apply clinical context

## How this service works

Roy 2021 4PEPS Table 3: age <50 −2, 50–64 −1, ≥65 0; chronic respiratory disease −1; HR <80 −1; chest pain and acute dyspnea +1; male +2; estrogen treatment +2; prior VTE +2; syncope +2; 4-week immobility +2; SpO2 <95% +3; calf pain or unilateral edema +3; PE most likely +5. Max 22. Bands: very_low <0, low 0–5, moderate 6–12, high ≥13. Not imaging or D-dimer. magent does not examine the patient or decide PE most likely.

## Output

Returns the calculated 4PEPS integer score (max 22) and a categorical risk band: very_low (score <0), low (0–5), moderate (6–12), or high (≥13). Does not provide imaging recommendations or D-dimer guidance, and does not make clinical decisions independently.

## 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",
      "chronic_respiratory_disease",
      "heart_rate_bpm",
      "chest_pain_and_acute_dyspnea",
      "sex",
      "hormonal_estrogenic_treatment",
      "personal_history_vte",
      "syncope",
      "immobility_4w",
      "spo2_percent",
      "calf_pain_or_unilateral_edema",
      "pe_most_likely"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (integer 18-120). Roy 2021 Table 3: <50 scores −2; 50-64 scores −1; ≥65 scores 0 (65-80 and >80 were not independently associated)."
      },
      "sex": {
       "enum": [
        "female",
        "male"
       ],
       "type": "string",
       "description": "female or male (Roy 2021 Table 3). Male scores +2. Female scores 0. Assigned by the caller."
      },
      "syncope": {
       "type": "boolean",
       "description": "Syncope as assigned by the caller (Roy 2021 Table 3). true scores +2. magent does not examine the patient."
      },
      "spo2_percent": {
       "type": "number",
       "description": "Oxygen saturation percent (50-100). Roy 2021 Table 3: <95 scores +3; 95 and above score 0."
      },
      "immobility_4w": {
       "type": "boolean",
       "description": "Immobility within 4 weeks (Roy 2021 Table 3 footnote a): surgery, lower limb plaster cast, or bedridden more than 3 days for an acute medical condition. true scores +2. Assigned by the caller. magent does not examine the patient."
      },
      "heart_rate_bpm": {
       "type": "integer",
       "description": "Heart rate in beats per minute (integer 30-220). Table 3: <80 scores −1. 80-100 was not independently associated; this tool does not add tachycardia points."
      },
      "pe_most_likely": {
       "type": "boolean",
       "description": "PE is the most likely diagnosis as assigned by the caller (Roy 2021 Table 3). true scores +5. magent does not examine the patient or decide PE mos
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/4peps-pulmonary-embolism-probability-score-calculator-42eab251/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)
