# Magent Free Water Deficit Calculator

> Magent Free Water Deficit 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).

Calculates free water deficit from patient weight, sex, and measured serum sodium using the Adrogué–Madias TBW formula

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/free_water_deficit
- 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-free-water-deficit-calculator-49792adb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1pKaeD4dOg5Tawc4p5IGK

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-free-water-deficit-calculator-49792adb
```

Example prompt: Calculate the free water deficit for a male patient weighing 80 kg with a measured serum sodium of 158 mmol/L, targeting a sodium of 140 mmol/L.

## When to prefer this

Use this endpoint when you need a deterministic, citation-backed Adrogué–Madias free water deficit calculation for a hypernatremic patient and only have weight, sex, and serum sodium available. Prefer this over general clinical decision support tools when you need reproducible arithmetic tied to a published formula rather than an advisory system or infusion protocol generator.

## Known failure modes

- Missing required parameters (sex or sodium_mmol_l) returns a 400-level error
- Sodium value outside hypernatremic range (below 146 mmol/L) may be rejected or flagged as out-of-range
- Weight not provided (neither weight_kg nor weight_lb) causes calculation failure
- Desired sodium >= measured sodium returns an error since no deficit exists
- Payment not included or insufficient USDC returns a 402 Payment Required response

## How this service works

Free water deficit from weight, sex, and measured Na using Adrogué–Madias TBW (0.6 male / 0.5 female). Deterministic published arithmetic with citation; not a water-replacement infusion protocol.

## Output

Returns the computed free water deficit in liters based on Adrogué–Madias total body water fractions (0.6 × weight for males, 0.5 × weight for females), the measured serum sodium, and the desired target sodium. Includes the arithmetic breakdown and citation. Does not provide an infusion rate or replacement protocol.

## 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": [
      "sex",
      "sodium_mmol_l"
     ],
     "properties": {
      "sex": {
       "enum": [
        "female",
        "male"
       ],
       "type": "string",
       "description": "Sex used for TBW: 0.6 × weight (male) or 0.5 × weight (female)."
      },
      "weight_kg": {
       "type": "number",
       "description": "Weight in kilograms. Provide weight_kg or weight_lb."
      },
      "weight_lb": {
       "type": "number",
       "description": "Weight in pounds. Converted as kg = lb * 0.45359237."
      },
      "sodium_mmol_l": {
       "type": "number",
       "description": "Measured serum sodium in mmol/L. Range 146-190 (hypernatremia)."
      },
      "desired_na_mmol_l": {
       "type": "number",
       "description": "Target serum sodium in mmol/L (130-145), must be less than measured Na. Omitted uses 140."
      }
     }
    }
   },
   "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/free_water_deficit",
  "count": 2,
  "items": [
   {
    "sex": "male",
    "tbw_l": 42,
    "formula": "adrogue_madias",
    "citation": {
     "id": "adrogue-madias-hypernatremia-2000",
     "doi": "10.1056/NEJM200005183422006",
     "title": "Hypernatremia",
     "source": "N Engl J Med. 2000;342(20):1493-1499",
     "authors": "Adrogué HJ, Madias NE"
    },
    "weight_kg": 70,
    "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.",
    "sodium_mmol_l": 160,
    "desired_na_mmol_l": 140,
    "formula_expression": "TBW_L = 0.6 * weight_kg (male) or 0.5 * weight_kg (female); free_water_deficit_l = TBW_L * (sodium_mmol_l / desired_na_mmol_l - 1)",
    "free_water_deficit_l": 6
   },
   {
    "sex": "male",
    "tbw_l": 42,
    "formula": "adrogue_madias",
    "citation": {
     "id": "adrogue-madias-hypernatremia-2000",
     "doi": "10.1056/NEJM200005183422006",
     "title": "Hypernatremia",
     "source": "N Engl J Med. 2000;342(20):1493-1499",
     "authors": "Adrogué HJ, Madias NE"
    },
    "weight_kg": 70,
    "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.",
    "sodium_mmol_l": 160,
    "desired_na_mmol_l": 140,
    "formula_expression": "TBW_L = 0.6 * weight_kg (male) or 0.5 * weight_kg (female); free_water_deficit_l = TBW_L * (sodium_mmol_l / desired_na_mmol_l - 1)",
    "free_water_deficit_l": 6
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-free-water-deficit-calculator-49792adb/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)
