# magent Mayo SPN (Swensen 1997) Malignancy Probability Calculator

> magent Mayo SPN (Swensen 1997) Malignancy Probability 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).

Computes the Swensen 1997 Mayo Clinic logistic probability of malignancy for a 4–30 mm radiologically indeterminate solitary pulmonary nodule using six clinical variables.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/mayo_spn
- 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/magent-mayo-spn-swensen-1997-malignancy-probability-calculator-63e2cf18
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XOsFhvVoNxL4eoMCJSSKs

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 magent-mayo-spn-swensen-1997-malignancy-probability-calculator-63e2cf18
```

Example prompt: Calculate the Swensen 1997 Mayo Clinic malignancy probability for a 68-year-old current smoker with no prior extrathoracic cancer, who has a 14mm spiculated nodule in the upper lobe.

## When to prefer this

Use this endpoint when you need a validated, reference-model logistic probability for an adult patient with a 4–30 mm radiologically indeterminate solitary pulmonary nodule and you have the six Swensen 1997 input variables available. Prefer this over manual calculation to avoid arithmetic errors and to get a machine-readable logit + probability pair. Do not use for nodules outside the 4–30 mm derivation range, pediatric patients, nodules with a definitive radiological diagnosis, or when the Gould 2007 or Brock models are required by your clinical protocol.

## Known failure modes

- Missing required query parameters (age, smoke, cancer, diameter_mm, spiculation, upper_lobe) → 400 Bad Request
- Age outside 18–120 range or diameter outside 4–30 mm range → validation error or clamped result
- Payment not provided or insufficient USDC → 402 Payment Required
- Non-boolean value passed for boolean fields → schema validation error
- Network timeout or server unavailability → 5xx error

## How this service works

Swensen 1997 Mayo Clinic logistic probability of malignancy for a 4-30 mm radiologically indeterminate solitary pulmonary nodule. Inputs: age, current or former smoking, extrathoracic cancer diagnosed ≥5 years before the nodule, largest diameter in mm, caller-assigned spiculation, and caller-assigned upper-lobe location. Returns logit x and P = e^x / (1 + e^x). magent does not read the film. Not Gould 2007, not Brock, not a diagnosis, not a biopsy order, and not a medical device.

## Output

Returns the logit linear predictor (x) and the derived malignancy probability P = e^x / (1 + e^x), both as numeric values, based on the Swensen 1997 Mayo Clinic logistic regression model for indeterminate solitary pulmonary nodules.

## 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",
      "smoke",
      "cancer",
      "diameter_mm",
      "spiculation",
      "upper_lobe"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (18-120). Swensen 1997 is an adult derivation; 18 is an implementation clamp."
      },
      "smoke": {
       "type": "boolean",
       "description": "Cigarette smoking as coded in Swensen 1997. true = current or former smoker (1); false = never (0). The caller assigns smoking history."
      },
      "cancer": {
       "type": "boolean",
       "description": "Extrathoracic cancer diagnosed ≥5 years before the nodule (Swensen 1997). true scores 1; false scores 0. The derivation excluded cancer within 5 years. The caller assigns the history."
      },
      "upper_lobe": {
       "type": "boolean",
       "description": "Upper-lobe location as assigned by the caller (Swensen 1997). true or false. magent does not read the film."
      },
      "diameter_mm": {
       "type": "number",
       "description": "Largest nodule diameter in millimetres (4-30). Swensen 1997 derivation range. magent does not measure the film."
      },
      "spiculation": {
       "type": "boolean",
       "description": "Spiculated edge as assigned by the caller (Swensen 1997). true or false. magent does not read the film."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-mayo-spn-swensen-1997-malignancy-probability-calculator-63e2cf18/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)
