# mAPI (Modified Asthma Predictive Index) Calculator

> mAPI (Modified Asthma Predictive Index) 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 Guilbert 2004 PEAK Trial modified Asthma Predictive Index (mAPI) result for a young child based on caller-supplied boolean criteria for wheeze frequency, major risk factors, and minor risk factors.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/mapi
- 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/mapi-modified-asthma-predictive-index-calculator-c5899a30
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CjLmwZdLVQtCi6PJL8qqA

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 mapi-modified-asthma-predictive-index-calculator-c5899a30
```

Example prompt: Calculate the mAPI for a child who has had 4 or more wheeze episodes this year (at least one doctor-diagnosed), whose parent has asthma, who has been diagnosed with atopic dermatitis by a physician, has no aeroallergen sensitization, no food sensitization to milk/egg/peanut, does wheeze unrelated to colds, and whose eosinophils are below 4%.

## When to prefer this

Use this endpoint when you need a programmatic, structured application of the Guilbert 2004 PEAK Trial mAPI algorithm and all seven boolean criteria have already been clinically assessed and assigned by a qualified caller. Prefer this over manual scoring when building clinical summary tools, research screening pipelines, or educational demonstrations that require reliable, reproducible mAPI computations. Do not use as a standalone diagnostic tool or substitute for physician evaluation.

## Known failure modes

- Missing required boolean query parameters returns a validation error
- Passing non-boolean values to boolean fields causes schema rejection
- four_or_more_wheeze_episodes=false always yields mAPI negative regardless of other criteria
- Payment failure (x402) if USDC balance insufficient or payment header missing
- Network timeout if the magentlab API is unavailable

## How this service works

Guilbert 2004 mAPI (PEAK Table I). Positive if 4+ wheeze episodes in one year (one MD-diagnosed) plus 1+ major or 2+ minor. Majors: parental asthma, MD atopic dermatitis, aeroallergen sensitization. Minors: milk/egg/peanut sensitization, wheezing unrelated to colds, eosinophils ≥4%. Not original API. Not m²API. Not an asthma diagnosis. magent does not examine the child. Not a medical device.

## Output

Returns whether the mAPI is positive or negative based on the Guilbert 2004 PEAK Table I algorithm: positive requires 4+ wheeze episodes in one year (≥1 MD-diagnosed) plus either 1 major criterion (parental asthma, physician-diagnosed atopic dermatitis, or aeroallergen sensitization) or 2 minor criteria (food sensitization to milk/egg/peanut, wheezing unrelated to colds, or eosinophilia ≥4%). Response includes the classification and the contributing criterion flags.

## 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": [
      "four_or_more_wheeze_episodes",
      "parental_asthma",
      "md_atopic_dermatitis",
      "aeroallergen_sensitization",
      "food_sensitization_milk_egg_peanut",
      "wheezing_unrelated_to_colds",
      "eosinophilia_ge_4pct"
     ],
     "properties": {
      "parental_asthma": {
       "type": "boolean",
       "description": "Parental asthma as assigned by the caller. true or false. Major criterion (Guilbert 2004 PEAK Table I). magent does not take a family history."
      },
      "eosinophilia_ge_4pct": {
       "type": "boolean",
       "description": "Blood eosinophils ≥4% of WBC as assigned by the caller (Guilbert 2004 PEAK Table I; 4% or greater). true or false. Minor criterion. magent does not take an eosinophil percent and does not interpret a CBC. Not Castro-Rodriguez circulating eosinophils >4%."
      },
      "md_atopic_dermatitis": {
       "type": "boolean",
       "description": "Physician-diagnosed atopic dermatitis as assigned by the caller. true or false. Major criterion (Guilbert 2004 PEAK Table I). magent does not examine the child."
      },
      "aeroallergen_sensitization": {
       "type": "boolean",
       "description": "Allergic sensitization to at least one aeroallergen as assigned by the caller. true or false. Major criterion (Guilbert 2004 PEAK Table I). magent does not interpret allergy testing."
      },
      "wheezing_unrelated_to_colds": {
       "type": "boolean",
       "description": "Wheezing unrelated to colds as assigned by the caller. true or false. Minor criterion (Guilbert 2004 PEAK Table I). magent does not auscultate."
      },
      "four_or_more_wheeze_episodes": {
       "type": "boolean",
       "description": "Caller-assigned history of 4 or more wheezing episodes in one year with at least one physician-diagnosed episode (Guilbert 2004 PEAK Table I primary criterion). true or false. magent does not take a numeric episode count
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mapi-modified-asthma-predictive-index-calculator-c5899a30/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)
