MAGENT

WEDGE

FEUrea

Compute fractional excretion of urea (FEUN) from BUN, urine urea nitrogen, plasma creatinine, and urine creatinine.

WEDGE $0.005 USDC GET /api/calc/feurea

Markdown: /docs/feurea.md · Canonical: https://magentlab.com/docs/feurea

Not a medical device. Not a diagnosis, dose, or listing recommendation.

What it computes

Compute fractional excretion of urea (FEUN) from BUN, urine urea nitrogen, plasma creatinine, and urine creatinine.

When to use

When diuretics make FENa unhelpful and an agent must not invent FEUrea from a language model.

When not to use

  • Not a diagnosis of prerenal azotemia or ATN. Carvounis bands are published FEUN cut-points (low ≤35%, high >35%), not a clinical order.
  • FENa is a separate tool. This calculator does not compute FENa.
  • Diuretics and CKD can change interpretation. Arithmetic only from the four laboratory values.

Formula

FEUrea_percent = 100 * (urine_urea_mg_dl * plasma_creatinine_mg_dl) / (bun_mg_dl * urine_creatinine_mg_dl)

Citation

Title
Significance of the fractional excretion of urea in the differential diagnosis of acute renal failure
Authors
Carvounis CP, Nisar S, Guro-Razuman S
Source
Kidney Int. 2002;62(6):2223-2229
DOI
10.1046/j.1523-1755.2002.00683.x

Worked example

UUN 200, BUN 20, UCr 100, PCr 2

Given: bun_mg_dl=20creatinine_mg_dl=2urine_creatinine_mg_dl=100urine_urea_mg_dl=200

  1. FEUrea = 100 * (200 * 2) / (20 * 100)
  2. = 40000 / 2000 = 20.0
  3. Carvounis band ≤35 → low (published cut-point, not a diagnosis)

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/feurea?bun_mg_dl=20&urine_urea_mg_dl=200&creatinine_mg_dl=2&urine_creatinine_mg_dl=100

Full URL: https://api.magentlab.com/api/calc/feurea?bun_mg_dl=20&urine_urea_mg_dl=200&creatinine_mg_dl=2&urine_creatinine_mg_dl=100

x402 V2 curl

Expect HTTP 402 and a PAYMENT-REQUIRED header until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge. HTTP 503 after a signature: retry the same PAYMENT-SIGNATURE — that is not a new 402.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/feurea?bun_mg_dl=20&urine_urea_mg_dl=200&creatinine_mg_dl=2&urine_creatinine_mg_dl=100"

Cursor mcp.json

Intended config for @magent/mcp. This is not npm @x402/fetch (a payment fetch wrapper).

{
  "mcpServers": {
    "magent": {
      "args": [
        "-y",
        "@magent/mcp"
      ],
      "command": "npx",
      "env": {
        "X402_PRIVATE_KEY": "0xYOUR_SPENDING_KEY"
      }
    }
  }
}

Parameters

Name Type Required Description
bun_mg_dl number required Blood urea nitrogen in mg/dL (1-200). Same units as urine urea nitrogen.
urine_urea_mg_dl number required Urine urea nitrogen in mg/dL (1-2000). Same units as BUN.
creatinine_mg_dl number optional Plasma creatinine in mg/dL. Provide this or creatinine_umol_l.
creatinine_umol_l number optional Plasma creatinine in µmol/L. Converted as mg/dL = µmol/L / 88.42.
urine_creatinine_mg_dl number optional Urine creatinine in mg/dL (1-500). Provide this or urine_creatinine_umol_l.
urine_creatinine_umol_l number optional Urine creatinine in µmol/L (88-44210). Converted as mg/dL = µmol/L / 88.42.

Bulk (POST)

POST the same path with a JSON items array. Price is n times the GET unit. Invalid items return HTTP 400 before settlement.

POST /api/calc/feurea Max 25 unit_amount * n PREVIEW

  • 1 to 25 items. Each item uses the same keys as the GET query parameters.
  • The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
  • HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
  • Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
  • x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.

Example request (fixture)

{
  "items": [
    {
      "bun_mg_dl": "20",
      "creatinine_mg_dl": "2",
      "urine_creatinine_mg_dl": "100",
      "urine_urea_mg_dl": "200"
    },
    {
      "bun_mg_dl": "20",
      "creatinine_mg_dl": "2",
      "urine_creatinine_mg_dl": "100",
      "urine_urea_mg_dl": "200"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/feurea",
  "items": [
    {
      "units": "%",
      "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.",
      "citation": {
        "authors": "Carvounis CP, Nisar S, Guro-Razuman S",
        "doi": "10.1046/j.1523-1755.2002.00683.x",
        "id": "carvounis-2002",
        "source": "Kidney Int. 2002;62(6):2223-2229",
        "title": "Significance of the fractional excretion of urea in the differential diagnosis of acute renal failure"
      },
      "formula": "carvounis",
      "formula_expression": "FEUrea_percent = 100 * (urine_urea_mg_dl * plasma_creatinine_mg_dl) / (bun_mg_dl * urine_creatinine_mg_dl)",
      "creatinine_mg_dl": 2.0,
      "urine_creatinine_mg_dl": 100.0,
      "bun_mg_dl": 20.0,
      "carvounis_band": "low",
      "feurea_percent": 20.0,
      "urine_urea_mg_dl": 200.0
    },
    {
      "units": "%",
      "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.",
      "citation": {
        "authors": "Carvounis CP, Nisar S, Guro-Razuman S",
        "doi": "10.1046/j.1523-1755.2002.00683.x",
        "id": "carvounis-2002",
        "source": "Kidney Int. 2002;62(6):2223-2229",
        "title": "Significance of the fractional excretion of urea in the differential diagnosis of acute renal failure"
      },
      "formula": "carvounis",
      "formula_expression": "FEUrea_percent = 100 * (urine_urea_mg_dl * plasma_creatinine_mg_dl) / (bun_mg_dl * urine_creatinine_mg_dl)",
      "creatinine_mg_dl": 2.0,
      "urine_creatinine_mg_dl": 100.0,
      "bun_mg_dl": 20.0,
      "carvounis_band": "low",
      "feurea_percent": 20.0,
      "urine_urea_mg_dl": 200.0
    }
  ]
}

Response

Field Type Description
formula string carvounis
formula_expression string Exact expression used
bun_mg_dl number BUN used in the equation
urine_urea_mg_dl number Urine urea nitrogen used
creatinine_mg_dl number Normalized plasma creatinine
urine_creatinine_mg_dl number Normalized urine creatinine
feurea_percent number Fractional excretion of urea in percent, 2 decimal places
carvounis_band string Published Carvounis 2002 FEUN cut-point: low (≤35) or high (>35). Not a diagnosis.
units string %
citation object Kidney Int 2002 citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "units": "%",
  "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.",
  "citation": {
    "authors": "Carvounis CP, Nisar S, Guro-Razuman S",
    "doi": "10.1046/j.1523-1755.2002.00683.x",
    "id": "carvounis-2002",
    "source": "Kidney Int. 2002;62(6):2223-2229",
    "title": "Significance of the fractional excretion of urea in the differential diagnosis of acute renal failure"
  },
  "formula": "carvounis",
  "formula_expression": "FEUrea_percent = 100 * (urine_urea_mg_dl * plasma_creatinine_mg_dl) / (bun_mg_dl * urine_creatinine_mg_dl)",
  "creatinine_mg_dl": 2.0,
  "urine_creatinine_mg_dl": 100.0,
  "bun_mg_dl": 20.0,
  "carvounis_band": "low",
  "feurea_percent": 20.0,
  "urine_urea_mg_dl": 200.0
}

Errors

HTTP Code When
400 invalid_creatinine creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.
400 invalid_bun bun_mg_dl must be a number from 1 to 200. Returned before settlement; you are not charged.
400 invalid_urine_urea urine_urea_mg_dl must be a number from 1 to 2000. Returned before settlement; you are not charged.
400 invalid_urine_creatinine urine_creatinine_mg_dl (1-500) or urine_creatinine_umol_l (88-44210) is required. Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.
402 payment_required Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header
409 payment_in_progress The same authorization nonce is already being settled; retry shortly
429 rate_limited Too many requests from this client
503 settlement_uncertain Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE
503 settle_failed Settlement failed; retry with the same PAYMENT-SIGNATURE shortly
503 facilitator_unavailable Payment facilitator unavailable
503 facilitator_misconfigured Payment facilitator is not configured
503 facilitator_unauthorized Payment facilitator rejected credentials
503 ledger_unavailable Payment ledger unavailable
503 payment_unavailable Payment processing unavailable

Related tools

  • Cockcroft–Gault CrCl — Compute Cockcroft–Gault creatinine clearance in mL/min using total body weight.
  • CKD-EPI 2021 eGFR — Compute race-free CKD-EPI 2021 creatinine eGFR in mL/min/1.73m2.
  • FENa — Compute fractional excretion of sodium from plasma and urine sodium and creatinine using Espinel 1976.

Also searched as

  • fractional excretion of urea
  • FEUN
  • FEUrea
  • Carvounis FEUN
  • urine urea nitrogen fraction
  • fractional urea excretion

Payment

Required query parameters must be present and valid. Invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments.

Guarantees

  • Invalid query parameters return HTTP 400 before settlement. You are not charged.
  • Settlement finishes before the tool executes. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
  • HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
  • Execution is timeout-bounded and concurrency-capped.
  • Calculator inputs are not persisted. Request logs store path without query.