# Tangri 2011 4-Variable Kidney Failure Risk Equation (KFRE)

> Tangri 2011 4-Variable Kidney Failure Risk Equation (KFRE) 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 2-year and 5-year kidney failure risk (dialysis or transplant) from age, sex, eGFR, and urine ACR using the Tangri 2011 4-variable model.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/kfre
- 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/tangri-2011-4-variable-kidney-failure-risk-equation-kfre-f04760f9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gJOUXuaRG2gkpwyxGh801

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 tangri-2011-4-variable-kidney-failure-risk-equation-kfre-f04760f9
```

Example prompt: Calculate the Tangri 2011 4-variable kidney failure risk for a 58-year-old male with an eGFR of 32 mL/min and a urine ACR of 85 mg/g — give me both the 2-year and 5-year risk of dialysis or transplant.

## When to prefer this

Use this endpoint when you need the validated Tangri 2011 4-variable KFRE specifically — when the caller already has eGFR and ACR in mg/g and wants a peer-reviewed, published risk estimate for adult CKD stages 3–5 without race adjustment. Prefer this over the 8-variable model when cystatin C or other variables are unavailable. Do not use if you need the Tangri 2016 country-calibrated survival functions or need to compute eGFR from creatinine first.

## Known failure modes

- Missing required query parameter (age_years, male, egfr_ml_min, or acr_mg_g) returns a 400 error
- Non-positive or non-numeric values for eGFR or ACR rejected; values are clamped to valid ranges (age 18–90, eGFR 1–150, ACR 0.1–10000)
- Payment not attached or insufficient USDC balance returns 402 Payment Required
- Caller-supplied eGFR outside physiologically plausible range is clamped silently, not rejected — agent should validate inputs beforehand
- ACR in mg/mmol will produce wrong results since the endpoint expects mg/g only

## How this service works

Tangri 2011 4-variable Kidney Failure Risk Equation: 2- and 5-year risk of dialysis or transplant from age, male, eGFR, and urine ACR (mg/g). Risk = 1 - S0^exp(LP) with that paper's 4-variable coefficients. Caller supplies eGFR; magent does not compute CKD-EPI or assay ACR. Not the 8-variable model, not Tangri 2016 country S0, no race. Not a dialysis or transplant order. Not a medical device.

## Output

Returns the 2-year and 5-year probabilities of kidney failure (dialysis or transplant) computed via the Tangri 2011 four-variable linear predictor and baseline survival function (1 - S0^exp(LP)). Does not return a diagnosis, clinical recommendation, or treatment order.

## 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": [
      "age_years",
      "male",
      "egfr_ml_min",
      "acr_mg_g"
     ],
     "properties": {
      "male": {
       "type": "boolean",
       "description": "true if male, false if female. Enters the linear predictor as 1 or 0 (centered at 0.5642). No race coefficient."
      },
      "acr_mg_g": {
       "type": "number",
       "description": "Urine albumin-to-creatinine ratio in mg/g (0.1-10000, magent clamp; must be positive). Enters as natural log, centered at 5.137. magent does not assay ACR and does not convert from mg/mmol."
      },
      "age_years": {
       "type": "integer",
       "description": "Age in years (18-90, magent clamp). Tangri 2011 4-variable model uses age as a continuous predictor (per 10 years, centered at 7.036). Adult CKD 3-5 derivation."
      },
      "egfr_ml_min": {
       "type": "number",
       "description": "Caller-supplied eGFR in mL/min/1.73 m2 (1-150, magent clamp; must be positive). Tangri 2011 derivation was CKD stages 3-5. magent does not compute CKD-EPI eGFR and does not assay creatinine."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tangri-2011-4-variable-kidney-failure-risk-equation-kfre-f04760f9/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)
