# RESP score (Schmidt)

RESP

Status: LIVE
Price: $0.005 USDC
`GET /api/calc/resp`
HTML: https://magentlab.com/docs/resp
Markdown: https://magentlab.com/docs/resp.md

Not a medical device. Not a diagnosis, dose, or listing recommendation.

## What it computes

Sum Schmidt 2014 Table 3 RESP points from caller-assigned pre-ECMO predictors and return class I–V with published hospital survival percents.

## When to use

When an agent needs the published RESP point total and class survival percent and must not invent an ECMO cannulation order or a continuous logit.

## When not to use

- Not a medical device and not an ECMO initiation, cannulation, or continuation order. magent does not assign ECMO and does not examine the patient.
- One Table 3 acute respiratory diagnosis group only. Do not add a second diagnosis. Flags are caller-assigned (immunocompromised includes malignancy, solid organ transplant, HIV, or cirrhosis as assigned).
- PaCO2 uses the published ≥75 mm Hg cutoff (the paper also states ≥10 kPa). magent accepts mm Hg only and does not convert kPa.
- Hospital survival percents are the five published risk-class figures (I 92%, II 76%, III 57%, IV 33%, V 18%). This tool does not compute a continuous logit.

## Formula

```
RESP = age_years (18-49 → 0, 50-59 → -2, ≥60 → -3) + immunocompromised (-2) + mechanical_ventilation_before_ecmo (lt_48h → 3, h48_to_7d → 1, gt_7d → 0) + diagnosis (viral_pneumonia → 3, bacterial_pneumonia → 3, asthma → 11, trauma_burn → 3, aspiration_pneumonitis → 5, other_acute_respiratory → 1, nonrespiratory_or_chronic_respiratory → 0) + cns_dysfunction (-7) + acute_nonpulmonary_infection (-3) + neuromuscular_blockade_before_ecmo (1) + nitric_oxide_before_ecmo (-1) + bicarbonate_infusion_before_ecmo (-2) + cardiac_arrest_before_ecmo (-2) + (paco2_mm_hg ≥75 → -1) + (peak_inspiratory_pressure_cm_h2o ≥42 → -1); Schmidt 2014 Table 3; range -22 to 15; class I ≥6 (92%), II 3 to 5 (76%), III -1 to 2 (57%), IV -5 to -2 (33%), V ≤-6 (18%) hospital survival
```

## Citation

[Predicting Survival after Extracorporeal Membrane Oxygenation for Severe Acute Respiratory Failure. The Respiratory Extracorporeal Membrane Oxygenation Survival Prediction (RESP) Score](https://doi.org/10.1164/rccm.201311-2023OC)
Schmidt M, Bailey M, Sheldrake J, et al.
Am J Respir Crit Care Med. 2014;189(11):1374-1382
DOI: [10.1164/rccm.201311-2023OC](https://doi.org/10.1164/rccm.201311-2023OC)

## Worked example

### Age 40, viral pneumonia, MV <48 h

Given: `acute_nonpulmonary_infection=false, age_years=40, bicarbonate_infusion_before_ecmo=false, cardiac_arrest_before_ecmo=false, cns_dysfunction=false, diagnosis=viral_pneumonia, immunocompromised=false, mechanical_ventilation_before_ecmo=lt_48h, neuromuscular_blockade_before_ecmo=false, nitric_oxide_before_ecmo=false, paco2_mm_hg=40, peak_inspiratory_pressure_cm_h2o=30`

1. age 40 → 0; immunocompromised false → 0; lt_48h → +3; viral_pneumonia → +3; remaining flags false; PaCO2 40 → 0; PIP 30 → 0
2. Score = 6 (range -22 to 15); resp_class I; hospital_survival_percent 92


### Age 60, immunocompromised, CNS dysfunction is class V

Given: `acute_nonpulmonary_infection=false, age_years=60, bicarbonate_infusion_before_ecmo=false, cardiac_arrest_before_ecmo=false, cns_dysfunction=true, diagnosis=viral_pneumonia, immunocompromised=true, mechanical_ventilation_before_ecmo=lt_48h, neuromuscular_blockade_before_ecmo=false, nitric_oxide_before_ecmo=false, paco2_mm_hg=40, peak_inspiratory_pressure_cm_h2o=30`

1. age 60 → -3; immunocompromised → -2; lt_48h → +3; viral_pneumonia → +3; cns_dysfunction → -7
2. Score = -6; resp_class V; hospital_survival_percent 18. Not an ECMO order.


## Also searched as

- RESP score
- Respiratory ECMO Survival Prediction
- Schmidt RESP
- pre-ECMO survival score
- VV-ECMO survival
- RESP class
- extracorporeal membrane oxygenation survival prediction
- Schmidt 2014 RESP

## Parameters

- `age_years` (integer, required): Age in years, integer 18-120, as assigned before ECMO (Schmidt 2014 Table 3). 18-49 → 0; 50-59 → -2; ≥60 → -3.
- `immunocompromised` (boolean, required): Immunocompromised status as assigned by the caller (Schmidt 2014: malignancy, solid organ transplant, HIV, or cirrhosis). true or false. true scores -2.
- `mechanical_ventilation_before_ecmo` (string, required): Duration of mechanical ventilation before ECMO as one token (Schmidt 2014 Table 3). lt_48h → +3; h48_to_7d → +1; gt_7d → 0. magent does not subtract timestamps.
- `diagnosis` (string, required): One acute respiratory diagnosis group (Schmidt 2014 Table 3). viral_pneumonia → +3; bacterial_pneumonia → +3; asthma → +11; trauma_burn → +3; aspiration_pneumonitis → +5; other_acute_respiratory → +1; nonrespiratory_or_chronic_respiratory → 0. Select one token. magent does not diagnose.
- `cns_dysfunction` (boolean, required): Central nervous system dysfunction as assigned by the caller (Schmidt 2014: neurotrauma, stroke, encephalopathy, cerebral embolism, or seizure). true or false. true scores -7. magent does not examine the patient.
- `acute_nonpulmonary_infection` (boolean, required): Acute associated (nonpulmonary) infection as assigned by the caller (Schmidt 2014: bacteremia, pneumonia diagnosed >48 h before ECMO, or infected burns). true or false. true scores -3.
- `neuromuscular_blockade_before_ecmo` (boolean, required): Neuromuscular blockade agents before ECMO as assigned by the caller (Schmidt 2014 Table 3). true or false. true scores +1.
- `nitric_oxide_before_ecmo` (boolean, required): Nitric oxide use before ECMO as assigned by the caller (Schmidt 2014 Table 3). true or false. true scores -1.
- `bicarbonate_infusion_before_ecmo` (boolean, required): Bicarbonate infusion before ECMO as assigned by the caller (Schmidt 2014 Table 3). true or false. true scores -2.
- `cardiac_arrest_before_ecmo` (boolean, required): Cardiac arrest before ECMO as assigned by the caller (Schmidt 2014 Table 3). true or false. true scores -2.
- `paco2_mm_hg` (number, required): Arterial PaCO2 in mm Hg (8-200) as assigned before ECMO. ≥75 scores -1 (Schmidt 2014 Table 3; the paper also states ≥10 kPa). magent does not convert kPa and does not read an ABG.
- `peak_inspiratory_pressure_cm_h2o` (number, required): Peak inspiratory pressure in cm H2O (5-80) as assigned before ECMO. ≥42 scores -1 (Schmidt 2014 Table 3). magent does not read a ventilator.

## Bulk (POST)

POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement.

Method: `POST /api/calc/resp`
Max items: 25
Price: unit_amount + extra_item_amount * (n - 1) (unit 5000 atomic, extra 2000 atomic)
Status: PREVIEW

- 1 to 25 items. Each item uses the same keys as the GET query parameters.
- POST of 1 item costs the same as GET. Lists longer than 25: chunk into multiple POSTs. Extra items still execute; do not pad dummy rows.
- The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
- HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
- Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
- x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.

Example request:

```json
{
  "items": [
    {
      "acute_nonpulmonary_infection": "false",
      "age_years": "40",
      "bicarbonate_infusion_before_ecmo": "false",
      "cardiac_arrest_before_ecmo": "false",
      "cns_dysfunction": "false",
      "diagnosis": "viral_pneumonia",
      "immunocompromised": "false",
      "mechanical_ventilation_before_ecmo": "lt_48h",
      "neuromuscular_blockade_before_ecmo": "false",
      "nitric_oxide_before_ecmo": "false",
      "paco2_mm_hg": "40",
      "peak_inspiratory_pressure_cm_h2o": "30"
    },
    {
      "acute_nonpulmonary_infection": "false",
      "age_years": "40",
      "bicarbonate_infusion_before_ecmo": "false",
      "cardiac_arrest_before_ecmo": "false",
      "cns_dysfunction": "false",
      "diagnosis": "viral_pneumonia",
      "immunocompromised": "false",
      "mechanical_ventilation_before_ecmo": "lt_48h",
      "neuromuscular_blockade_before_ecmo": "false",
      "nitric_oxide_before_ecmo": "false",
      "paco2_mm_hg": "40",
      "peak_inspiratory_pressure_cm_h2o": "30"
    }
  ]
}
```

Human paywall (two-item fixture): https://api.magentlab.com/paywall/bulk/resp

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/resp",
  "items": [
    {
      "components": [
        {
          "value": 40,
          "factor": "age_years",
          "points": 0,
          "present": false
        },
        {
          "factor": "immunocompromised",
          "points": 0,
          "present": false
        },
        {
          "value": "lt_48h",
          "factor": "mechanical_ventilation_before_ecmo",
          "points": 3,
          "present": true
        },
        {
          "value": "viral_pneumonia",
          "factor": "diagnosis",
          "points": 3,
          "present": true
        },
        {
          "factor": "cns_dysfunction",
          "points": 0,
          "present": false
        },
        {
          "factor": "acute_nonpulmonary_infection",
          "points": 0,
          "present": false
        },
        {
          "factor": "neuromuscular_blockade_before_ecmo",
          "points": 0,
          "present": false
        },
        {
          "factor": "nitric_oxide_before_ecmo",
          "points": 0,
          "present": false
        },
        {
          "factor": "bicarbonate_infusion_before_ecmo",
          "points": 0,
          "present": false
        },
        {
          "factor": "cardiac_arrest_before_ecmo",
          "points": 0,
          "present": false
        },
        {
          "value": 40.0,
          "factor": "paco2_mm_hg",
          "points": 0,
          "present": false
        },
        {
          "value": 30.0,
          "factor": "peak_inspiratory_pressure_cm_h2o",
          "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.",
      "age_years": 40,
      "citation": {
        "authors": "Schmidt M, Bailey M, Sheldrake J, et al.",
        "doi": "10.1164/rccm.201311-2023OC",
        "id": "schmidt-2014",
        "pmid": "24693864",
        "source": "Am J Respir Crit Care Med. 2014;189(11):1374-1382",
        "title": "Predicting Survival after Extracorporeal Membrane Oxygenation for Severe Acute Respiratory Failure. The Respiratory Extracorporeal Membrane Oxygenation Survival Prediction (RESP) Score"
      },
      "formula": "resp",
      "formula_expression": "RESP = age_years (18-49 → 0, 50-59 → -2, ≥60 → -3) + immunocompromised (-2) + mechanical_ventilation_before_ecmo (lt_48h → 3, h48_to_7d → 1, gt_7d → 0) + diagnosis (viral_pneumonia → 3, bacterial_pneumonia → 3, asthma → 11, trauma_burn → 3, aspiration_pneumonitis → 5, other_acute_respiratory → 1, nonrespiratory_or_chronic_respiratory → 0) + cns_dysfunction (-7) + acute_nonpulmonary_infection (-3) + neuromuscular_blockade_before_ecmo (1) + nitric_oxide_before_ecmo (-1) + bicarbonate_infusion_before_ecmo (-2) + cardiac_arrest_before_ecmo (-2) + (paco2_mm_hg ≥75 → -1) + (peak_inspiratory_pressure_cm_h2o ≥42 → -1); Schmidt 2014 Table 3; range -22 to 15; class I ≥6 (92%), II 3 to 5 (76%), III -1 to 2 (57%), IV -5 to -2 (33%), V ≤-6 (18%) hospital survival",
      "max_score": 15,
      "score": 6,
      "paco2_mm_hg": 40.0,
      "diagnosis": "viral_pneumonia",
      "min_score": -22,
      "hospital_survival_percent": 92,
      "mechanical_ventilation_before_ecmo": "lt_48h",
      "peak_inspiratory_pressure_cm_h2o": 30.0,
      "resp_class": "I"
    },
    {
      "components": [
        {
          "value": 40,
          "factor": "age_years",
          "points": 0,
          "present": false
        },
        {
          "factor": "immunocompromised",
          "points": 0,
          "present": false
        },
        {
          "value": "lt_48h",
          "factor": "mechanical_ventilation_before_ecmo",
          "points": 3,
          "present": true
        },
        {
          "value": "viral_pneumonia",
          "factor": "diagnosis",
          "points": 3,
          "present": true
        },
        {
          "factor": "cns_dysfunction",
          "points": 0,
          "present": false
        },
        {
          "factor": "acute_nonpulmonary_infection",
          "points": 0,
          "present": false
        },
        {
          "factor": "neuromuscular_blockade_before_ecmo",
          "points": 0,
          "present": false
        },
        {
          "factor": "nitric_oxide_before_ecmo",
          "points": 0,
          "present": false
        },
        {
          "factor": "bicarbonate_infusion_before_ecmo",
          "points": 0,
          "present": false
        },
        {
          "factor": "cardiac_arrest_before_ecmo",
          "points": 0,
          "present": false
        },
        {
          "value": 40.0,
          "factor": "paco2_mm_hg",
          "points": 0,
          "present": false
        },
        {
          "value": 30.0,
          "factor": "peak_inspiratory_pressure_cm_h2o",
          "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.",
      "age_years": 40,
      "citation": {
        "authors": "Schmidt M, Bailey M, Sheldrake J, et al.",
        "doi": "10.1164/rccm.201311-2023OC",
        "id": "schmidt-2014",
        "pmid": "24693864",
        "source": "Am J Respir Crit Care Med. 2014;189(11):1374-1382",
        "title": "Predicting Survival after Extracorporeal Membrane Oxygenation for Severe Acute Respiratory Failure. The Respiratory Extracorporeal Membrane Oxygenation Survival Prediction (RESP) Score"
      },
      "formula": "resp",
      "formula_expression": "RESP = age_years (18-49 → 0, 50-59 → -2, ≥60 → -3) + immunocompromised (-2) + mechanical_ventilation_before_ecmo (lt_48h → 3, h48_to_7d → 1, gt_7d → 0) + diagnosis (viral_pneumonia → 3, bacterial_pneumonia → 3, asthma → 11, trauma_burn → 3, aspiration_pneumonitis → 5, other_acute_respiratory → 1, nonrespiratory_or_chronic_respiratory → 0) + cns_dysfunction (-7) + acute_nonpulmonary_infection (-3) + neuromuscular_blockade_before_ecmo (1) + nitric_oxide_before_ecmo (-1) + bicarbonate_infusion_before_ecmo (-2) + cardiac_arrest_before_ecmo (-2) + (paco2_mm_hg ≥75 → -1) + (peak_inspiratory_pressure_cm_h2o ≥42 → -1); Schmidt 2014 Table 3; range -22 to 15; class I ≥6 (92%), II 3 to 5 (76%), III -1 to 2 (57%), IV -5 to -2 (33%), V ≤-6 (18%) hospital survival",
      "max_score": 15,
      "score": 6,
      "paco2_mm_hg": 40.0,
      "diagnosis": "viral_pneumonia",
      "min_score": -22,
      "hospital_survival_percent": 92,
      "mechanical_ventilation_before_ecmo": "lt_48h",
      "peak_inspiratory_pressure_cm_h2o": 30.0,
      "resp_class": "I"
    }
  ]
}
```

## Response fields

- `formula` (string): resp
- `formula_expression` (string): Exact expression used
- `score` (integer): Schmidt 2014 Table 3 RESP points, theoretical range -22 to 15
- `min_score` (integer): -22
- `max_score` (integer): 15
- `resp_class` (string): Schmidt 2014 risk class I (≥6), II (3 to 5), III (-1 to 2), IV (-5 to -2), or V (≤-6). A class, not an ECMO order.
- `hospital_survival_percent` (integer): Published hospital survival percent for the class: I 92, II 76, III 57, IV 33, V 18. Not a continuous logit.
- `age_years` (integer): Age in years used for Table 3 age points
- `diagnosis` (string): Diagnosis token used (one Table 3 group)
- `mechanical_ventilation_before_ecmo` (string): Mechanical-ventilation duration token used
- `paco2_mm_hg` (number): Arterial PaCO2 in mm Hg used for the ≥75 cutoff
- `peak_inspiratory_pressure_cm_h2o` (number): Peak inspiratory pressure in cm H2O used for the ≥42 cutoff
- `components` (array): Per-factor points
- `citation` (object): Schmidt et al. Am J Respir Crit Care Med 2014 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 40,
      "factor": "age_years",
      "points": 0,
      "present": false
    },
    {
      "factor": "immunocompromised",
      "points": 0,
      "present": false
    },
    {
      "value": "lt_48h",
      "factor": "mechanical_ventilation_before_ecmo",
      "points": 3,
      "present": true
    },
    {
      "value": "viral_pneumonia",
      "factor": "diagnosis",
      "points": 3,
      "present": true
    },
    {
      "factor": "cns_dysfunction",
      "points": 0,
      "present": false
    },
    {
      "factor": "acute_nonpulmonary_infection",
      "points": 0,
      "present": false
    },
    {
      "factor": "neuromuscular_blockade_before_ecmo",
      "points": 0,
      "present": false
    },
    {
      "factor": "nitric_oxide_before_ecmo",
      "points": 0,
      "present": false
    },
    {
      "factor": "bicarbonate_infusion_before_ecmo",
      "points": 0,
      "present": false
    },
    {
      "factor": "cardiac_arrest_before_ecmo",
      "points": 0,
      "present": false
    },
    {
      "value": 40.0,
      "factor": "paco2_mm_hg",
      "points": 0,
      "present": false
    },
    {
      "value": 30.0,
      "factor": "peak_inspiratory_pressure_cm_h2o",
      "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.",
  "age_years": 40,
  "citation": {
    "authors": "Schmidt M, Bailey M, Sheldrake J, et al.",
    "doi": "10.1164/rccm.201311-2023OC",
    "id": "schmidt-2014",
    "pmid": "24693864",
    "source": "Am J Respir Crit Care Med. 2014;189(11):1374-1382",
    "title": "Predicting Survival after Extracorporeal Membrane Oxygenation for Severe Acute Respiratory Failure. The Respiratory Extracorporeal Membrane Oxygenation Survival Prediction (RESP) Score"
  },
  "formula": "resp",
  "formula_expression": "RESP = age_years (18-49 → 0, 50-59 → -2, ≥60 → -3) + immunocompromised (-2) + mechanical_ventilation_before_ecmo (lt_48h → 3, h48_to_7d → 1, gt_7d → 0) + diagnosis (viral_pneumonia → 3, bacterial_pneumonia → 3, asthma → 11, trauma_burn → 3, aspiration_pneumonitis → 5, other_acute_respiratory → 1, nonrespiratory_or_chronic_respiratory → 0) + cns_dysfunction (-7) + acute_nonpulmonary_infection (-3) + neuromuscular_blockade_before_ecmo (1) + nitric_oxide_before_ecmo (-1) + bicarbonate_infusion_before_ecmo (-2) + cardiac_arrest_before_ecmo (-2) + (paco2_mm_hg ≥75 → -1) + (peak_inspiratory_pressure_cm_h2o ≥42 → -1); Schmidt 2014 Table 3; range -22 to 15; class I ≥6 (92%), II 3 to 5 (76%), III -1 to 2 (57%), IV -5 to -2 (33%), V ≤-6 (18%) hospital survival",
  "max_score": 15,
  "score": 6,
  "paco2_mm_hg": 40.0,
  "diagnosis": "viral_pneumonia",
  "min_score": -22,
  "hospital_survival_percent": 92,
  "mechanical_ventilation_before_ecmo": "lt_48h",
  "peak_inspiratory_pressure_cm_h2o": 30.0,
  "resp_class": "I"
}
```

## Errors

- HTTP 400 `invalid_resp`: RESP needs Schmidt 2014 pre-ECMO respiratory-failure predictors in published ranges. Returned before settlement; you are not charged.
- HTTP 400 `invalid_items`: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
- HTTP 400 `invalid_item_count`: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
- HTTP 400 `invalid_item`: each items entry must be a JSON object Returned before settlement; you are not charged.

Shared HTTP 402 and 503: https://magentlab.com/docs/payments

## Related tools

- [APACHE II](https://magentlab.com/docs/apache-ii) — Compute the Knaus 1985 APACHE II integer from 12 Acute Physiology Score items, age points, and chronic-health points.
- [SAPS 3](https://magentlab.com/docs/saps-3) — Compute the Moreno 2005 SAPS 3 admission integer from Box I, Box II, and Box III at ICU admission, then the Part 2 global logit hospital-mortality percent.

## Payment

Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s.

- GET the tool with Accept: application/json (do not send Accept: text/html unless you want the human paywall).
- HTTP 402 means you have not paid. Decode the base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote.
- Sign accepts[0] (exact, EIP-3009) with validBefore = now + maxTimeoutSeconds (600 seconds), or accepts[1] (batch-settlement deposit/voucher) on product GET. Ping and POST {items} stay exact. Magent retries transient facilitator 429/5xx before answering.
- Retry the same URL with PAYMENT-SIGNATURE (base64 JSON of accepted and payload). Magent attaches canonical extensions.bazaar on CDP verify/settle; echoing 402 bazaar is optional.
- Success is HTTP 200 JSON plus PAYMENT-RESPONSE. exact settles before the tool. batch-settlement verifies (and deposit-settles) before the tool and commits the charge after HTTP 2xx. HTTP 503: retry the same PAYMENT-SIGNATURE. Mint a new exact nonce only after a new HTTP 402.

- offered `exact` on eip155:8453: Fixed-price USDC on Base. The buyer authorizes the advertised amount (EIP-3009). magent settles before the tool runs (paymentFlow upfront). extra.assetTransferMethod=eip3009 extra.paymentFlow=upfront.
- offered `batch-settlement` on eip155:8453: Payment-channel vouchers claimed later in batches. Exact stays accepts[0]. Same-path POST {items} is still exact. extra.assetTransferMethod=eip3009 extra.paymentFlow=authorization.

- not offered `upto`: Not offered. Usage-based: buyer authorizes a ceiling, seller settles the actual amount after work. Reserved for a future metered tool. Not for current calculators or code search.

Same-path POST {items} is still scheme exact: one EIP-3009 authorization for GET unit plus $0.002 per extra item. That is not x402 batch-settlement (payment channels / vouchers).

Shared HTTP 402 and 503 table: https://magentlab.com/docs/payments

Stdio MCP (one process per host): https://magentlab.com/docs/mcp

## Guarantees

- HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged. HTTP 402 never includes the tool JSON.
- exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
- HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
- Execution is timeout-bounded and concurrency-capped.
- Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.
