# Magent Sodium Deficit Calculator (Adrogué–Madias)

> Magent Sodium Deficit Calculator (Adrogué–Madias) 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 sodium deficit in mmol using the Adrogué–Madias total body water formula based on patient sex, weight, and measured serum sodium.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/sodium_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-sodium-deficit-calculator-adrogu-madias-2a773aff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ob6XPaRAHnaycT24Z59T5

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-sodium-deficit-calculator-adrogu-madias-2a773aff
```

Example prompt: Calculate the sodium deficit for a male patient weighing 80 kg with a measured serum sodium of 118 mmol/L targeting 130 mmol/L, using the Adrogué–Madias method.

## When to prefer this

Use this endpoint when you need a deterministic, citation-backed sodium deficit calculation using the Adrogué–Madias TBW formula for hyponatremic patients. Prefer this over manual calculation when integrating into clinical decision-support workflows or documentation pipelines where formula accuracy and provenance matter. This is a pure arithmetic endpoint — not a treatment protocol or infusion rate calculator.

## Known failure modes

- Missing required sex or sodium_mmol_l parameters returns a 400 error
- Serum sodium outside the valid hyponatremia range (90–135 mmol/L) may return a validation error
- Neither weight_kg nor weight_lb provided may result in a missing weight error
- Target sodium below measured sodium returns an error (target must exceed measured Na)
- Target sodium outside 120–150 mmol/L range may be rejected

## How this service works

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

## Output

Returns the calculated sodium deficit in mmol based on Adrogué–Madias total body water (0.6 × weight for males, 0.5 × weight for females), the measured serum sodium, and the target serum sodium (default 140 mmol/L), along with a citation to the published formula.

## 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 90-135 (hyponatremia)."
      },
      "desired_na_mmol_l": {
       "type": "number",
       "description": "Target serum sodium in mmol/L (120-150), must exceed 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/sodium_deficit",
  "count": 2,
  "items": [
   {
    "sex": "male",
    "tbw_l": 42,
    "formula": "adrogue_madias",
    "citation": {
     "id": "adrogue-madias-hyponatremia-2000",
     "doi": "10.1056/NEJM200005253422107",
     "title": "Hyponatremia",
     "source": "N Engl J Med. 2000;342(21):1581-1589",
     "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": 120,
    "desired_na_mmol_l": 140,
    "formula_expression": "TBW_L = 0.6 * weight_kg (male) or 0.5 * weight_kg (female); sodium_deficit_mmol = TBW_L * (desired_na_mmol_l - sodium_mmol_l)",
    "sodium_deficit_mmol": 840
   },
   {
    "sex": "male",
    "tbw_l": 42,
    "formula": "adrogue_madias",
    "citation": {
     "id": "adrogue-madias-hyponatremia-2000",
     "doi": "10.1056/NEJM200005253422107",
     "title": "Hyponatremia",
     "source": "N Engl J Med. 2000;342(21):1581-1589",
     "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": 120,
    "desired_na_mmol_l": 140,
    "formula_expression": "TBW_L = 0.6 * weight_kg (male) or 0.5 * weight_kg (female); sodium_deficit_mmol = TBW_L * (desired_na_mmol_l - sodium_mmol_l)",
    "sodium_deficit_mmol": 840
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-sodium-deficit-calculator-adrogu-madias-2a773aff/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)
