MAGENT

LIVE

CKD-EPI 2021 eGFR

Race-free creatinine eGFR. Deterministic NEJM 2021 equation. Not a treatment recommendation.

LIVE $0.005 USDC GET /api/calc/egfr_ckd_epi

When to use

CKD-EPI 2021 creatinine eGFR (race-free). Use when an agent must not guess kidney function from a language model. Deterministic published formula with citation.

Try

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

/api/calc/egfr_ckd_epi?creatinine_mg_dl=1.1&age=65&sex=female

Full URL: https://api.magentlab.com/api/calc/egfr_ckd_epi?creatinine_mg_dl=1.1&age=65&sex=female

Request

GET /api/calc/egfr_ckd_epi · x402 V2 · USDC on Base · $0.005 USDC

x402 V2 curl

Expect HTTP 402 and a PAYMENT-REQUIRED header until you retry with PAYMENT-SIGNATURE.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/egfr_ckd_epi?creatinine_mg_dl=1.1&age=65&sex=female"

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"
      }
    }
  }
}

Query parameters

Name Type Required Description
creatinine_mg_dl number optional Serum creatinine in mg/dL. Provide this or creatinine_umol_l.
creatinine_umol_l number optional Serum creatinine in µmol/L. Converted as mg/dL = µmol/L / 88.42.
age integer required Age in years (18-120). CKD-EPI 2021 is validated in adults.
sex string required · female, male Sex used by the published equation. female or male.

Success fields

Field Type Description
formula string ckd_epi_2021_creatinine
formula_expression string Exact expression used
creatinine_mg_dl number Normalized creatinine
age_years integer Age used in the equation
sex string female or male
egfr_ml_min_1_73m2 number Estimated GFR, 1 decimal place
units string mL/min/1.73m2
citation object NEJM 2021 citation
disclaimer string Not-a-device notice

Example

Frozen fixture. Not a live lookup.

{
  "units": "mL/min/1.73m2",
  "disclaimer": "Not a medical device. Deterministic published-formula or coded-ontology output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
  "age_years": 65,
  "citation": {
    "authors": "Inker LA, Eneanya ND, Coresh J, et al.",
    "doi": "10.1056/NEJMoa2102953",
    "id": "inker-2021",
    "source": "N Engl J Med. 2021;385(19):1737-1749",
    "title": "New Creatinine- and Cystatin C-Based Equations to Estimate GFR without Race"
  },
  "creatinine_mg_dl": 1.1,
  "egfr_ml_min_1_73m2": 55.8,
  "formula": "ckd_epi_2021_creatinine",
  "formula_expression": "142 * min(Scr/κ,1)^α * max(Scr/κ,1)^(-1.200) * 0.9938^age * (1.012 if female)",
  "sex": "female"
}

Payment

Unpaid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. Retry the same URL with PAYMENT-SIGNATURE. Settlement completes before the tool runs. Full handshake and shared payment errors: Payments.

Errors

HTTP Code When
400 invalid_creatinine creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required
400 invalid_age age must be an integer from 18 to 120
400 invalid_sex sex must be female or male
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 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

Guarantees

  • Settlement finishes before the tool executes. Uncertain settlement fails closed (HTTP 503).
  • Lookups run on our nodes — no third-party data API wrappers.
  • Localhost, IP literals, and metadata hostnames are rejected.
  • Execution is timeout-bounded and concurrency-capped.