# Magent Fluid Balance Calculator (fluid_io)

> Magent Fluid Balance Calculator (fluid_io) 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-14).

Computes net fluid balance in mL by subtracting caller-supplied total output from total intake, with optional breakdown validation for oral/IV intake and urine/ultrafiltration/drain/GI output components.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/fluid_io
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/magent-fluid-balance-calculator-fluid-io-fd65da9d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hlfgXxNOXl3slDyv4Cwag

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-fluid-balance-calculator-fluid-io-fd65da9d
```

Example prompt: Calculate the net fluid balance for my ICU patient who received 3200 mL total intake (800 mL oral, 2400 mL IV) and had 2100 mL total output (1500 mL urine, 300 mL drain, 300 mL GI losses) over the last 12 hours.

## When to prefer this

Use this endpoint when you need a deterministic, citation-backed arithmetic computation of net fluid balance (intake minus output) following the Acheampong and Vincent 2015 definition, with optional component-level breakdown validation. Prefer this over manual arithmetic when you need server-side validation that intake and output addends are internally consistent. Do not use it to estimate insensible losses, to order fluids or diuretics, or to measure I/O — those must be supplied by the caller.

## Known failure modes

- Intake addends (oral + IV) do not sum to total_intake_ml — validation error
- Output addends (urine + ultrafiltration + drain + GI) do not sum to total_output_ml — validation error
- Values out of range (negative or exceeding 100000 mL) — rejected
- Missing required total_intake_ml or total_output_ml — 400 error
- Payment not provided or insufficient — 402 error

## How this service works

Net fluid balance in mL: caller-assigned total intake minus total output over the same interval. Optional oral plus IV intake and urine, ultrafiltration, drain, and GI output must sum to those totals when sent (Acheampong and Vincent 2015). Does not estimate insensible losses. Not a resuscitation or diuretic order; magent does not measure I/O. Deterministic published arithmetic with citation.

## Output

Returns the net fluid balance in mL (total_intake_ml minus total_output_ml). If optional intake or output addends are provided, the API validates that they sum to the respective totals. Does not estimate insensible losses. Based on Acheampong and Vincent 2015 methodology.

## 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": [
      "total_intake_ml",
      "total_output_ml"
     ],
     "properties": {
      "gi_output_ml": {
       "type": "number",
       "description": "Optional estimated gastrointestinal losses in mL (0-100000). Acheampong 2015 counted stool only with profound diarrhea. When any output addend is sent, the output addends (missing as 0) must equal total_output_ml. magent does not estimate insensible loss."
      },
      "iv_intake_ml": {
       "type": "number",
       "description": "Optional intravenous intake in mL (0-100000). When any intake addend is sent, oral_intake_ml + iv_intake_ml (missing as 0) must equal total_intake_ml."
      },
      "oral_intake_ml": {
       "type": "number",
       "description": "Optional oral intake in mL (0-100000). When any intake addend is sent, oral_intake_ml + iv_intake_ml (missing as 0) must equal total_intake_ml."
      },
      "drain_output_ml": {
       "type": "number",
       "description": "Optional drain fluid in mL (0-100000). When any output addend is sent, the output addends (missing as 0) must equal total_output_ml."
      },
      "total_intake_ml": {
       "type": "number",
       "description": "Caller-assigned total fluid intake in mL over the interval (0-100000). Acheampong 2015: sum of intravenous and oral fluids. magent does not measure intake."
      },
      "total_output_ml": {
       "type": "number",
       "description": "Caller-assigned total fluid output in mL over the same interval (0-100000). Acheampong 2015: urine, ultrafiltration, drain fluid, and estimated gastrointestinal losses. magent does not measure output."
      },
      "urine_output_ml": {
       "type": "number",
       "description": "Optional urine output in mL (0-100000). When any output addend is sent, urine + ultrafiltration + drain + GI (missing as 0) must equal total_output_ml."
      },
      "ultrafiltration_ml": {
       "type": "number",
       "desc
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-fluid-balance-calculator-fluid-io-fd65da9d/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)
