# magent Corrected Sodium for Hyperglycemia

> magent Corrected Sodium for Hyperglycemia 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 corrected serum sodium for hyperglycemia using either the Katz (1.6) or Hillier (2.4) correction formula, returning a deterministic result with citation.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/corrected_sodium
- 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-corrected-sodium-for-hyperglycemia-82eff0b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YAKO2liF2cfmgJrugw2tU

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-corrected-sodium-for-hyperglycemia-82eff0b9
```

Example prompt: My patient has a measured serum sodium of 132 mmol/L and a plasma glucose of 600 mg/dL — can you calculate the corrected sodium using the Hillier 2.4 formula?

## When to prefer this

Use this endpoint when you need a deterministic, citation-backed corrected sodium value for a hyperglycemic patient and you want to explicitly choose between the Katz (1.6) or Hillier (2.4) correction factor. Prefer this over manual calculation to ensure formula fidelity and auditability. Particularly useful in clinical decision-support pipelines, EMR enrichment, or AI-assisted triage tools where traceability to a published formula is required.

## Known failure modes

- Missing required 'formula' parameter — endpoint does not pick a formula silently and will return an error
- Sodium value outside valid range (110–160 mmol/L) causes validation error
- Glucose value outside valid range (50–1000 mg/dL or 2.8–55.5 mmol/L) causes validation error
- Neither glucose_mg_dl nor glucose_mmol_l provided results in missing input error
- Payment failure (x402) if USDC balance is insufficient

## How this service works

Sodium correction for hyperglycemia (Katz 1.6 or Hillier 2.4). formula is required; magent does not pick one silently. Deterministic published correction with citation; not a treatment recommendation.

## Output

Returns the corrected serum sodium in mmol/L computed using the selected formula (Katz 1.6 or Hillier 2.4), along with the correction factor applied, the formula used, and a published citation for the method. No treatment recommendation is included.

## 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": [
      "sodium_mmol_l",
      "formula"
     ],
     "properties": {
      "formula": {
       "enum": [
        "katz",
        "hillier"
       ],
       "type": "string",
       "description": "Correction factor. Required; magent does not pick one silently."
      },
      "glucose_mg_dl": {
       "type": "number",
       "description": "Plasma glucose in mg/dL (50-1000). Provide this or glucose_mmol_l."
      },
      "sodium_mmol_l": {
       "type": "number",
       "description": "Measured serum sodium in mmol/L (110-160)."
      },
      "glucose_mmol_l": {
       "type": "number",
       "description": "Plasma glucose in mmol/L (2.8-55.5). Converted as mg/dL = mmol/L * 18.015."
      }
     }
    }
   },
   "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/corrected_sodium",
  "count": 2,
  "items": [
   {
    "factor": 1.6,
    "formula": "katz",
    "citation": {
     "id": "katz-1973",
     "doi": "10.1056/NEJM197310182891607",
     "title": "Hyperglycemia-induced hyponatremia — calculation of expected serum sodium depression",
     "source": "N Engl J Med. 1973;289(16):843-844",
     "authors": "Katz MA"
    },
    "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.",
    "glucose_mg_dl": 400,
    "sodium_mmol_l": 125,
    "formula_expression": "corrected_na_mmol_l = sodium_mmol_l + 1.6 * (glucose_mg_dl - 100) / 100",
    "corrected_sodium_mmol_l": 129.8
   },
   {
    "factor": 1.6,
    "formula": "katz",
    "citation": {
     "id": "katz-1973",
     "doi": "10.1056/NEJM197310182891607",
     "title": "Hyperglycemia-induced hyponatremia — calculation of expected serum sodium depression",
     "source": "N Engl J Med. 1973;289(16):843-844",
     "authors": "Katz MA"
    },
    "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.",
    "glucose_mg_dl": 400,
    "sodium_mmol_l": 125,
    "formula_expression": "corrected_na_mmol_l = sodium_mmol_l + 1.6 * (glucose_mg_dl - 100) / 100",
    "corrected_sodium_mmol_l": 129.8
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-corrected-sodium-for-hyperglycemia-82eff0b9/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)
