# magent PSC Revised Risk Score (Kim 2000)

> magent PSC Revised Risk Score (Kim 2000) 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 the Kim 2000 revised Mayo natural history R score for primary sclerosing cholangitis (PSC) without requiring histologic staging, using age, bilirubin, AST, albumin, and variceal bleeding history.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/psc_revised
- 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-psc-revised-risk-score-kim-2000-fdf5c633
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_A5UqgT7mgnvVCJEs95IoJ

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-psc-revised-risk-score-kim-2000-fdf5c633
```

Example prompt: Calculate the Kim 2000 revised PSC R score for a 52-year-old patient with total bilirubin 3.2 mg/dL, AST 88 U/L, albumin 3.5 g/dL, and no history of variceal bleeding.

## When to prefer this

Use this endpoint when you need the Kim 2000 revised (no-biopsy) PSC natural history R score specifically — not the original Mayo PSC model that requires histologic stage. Ideal when liver biopsy data is unavailable and you only have routine labs (bilirubin, AST, albumin), patient age, and variceal bleeding history. Do not use if you need survival probability estimates, risk band classifications, a transplant listing decision, or a PSC diagnosis.

## Known failure modes

- Missing any required parameter (age_years, bilirubin_mg_dl, ast_u_l, albumin_g_dl, variceal_bleeding) returns an error
- Bilirubin or AST at or near zero would make the natural log undefined; values are clamped (bilirubin 0.1–40, AST 1–10000)
- Age outside 18–120 or albumin outside 1.0–6.0 is clamped to range boundaries
- Non-numeric or incorrectly typed inputs (e.g. string for age) will fail validation
- Payment not provided or insufficient ($0.005 USDC via x402) results in 402 Payment Required

## How this service works

Kim 2000 revised natural history model for primary sclerosing cholangitis (no histologic stage). R = 0.03*age_years + 0.54*ln(bilirubin_mg_dL) + 0.54*ln(AST_U_L) + 1.24*variceal_bleeding - 0.84*albumin_g_dL. Natural log. Returns R only; does not look up unpublished survival percents or invent risk bands. Not a transplant listing, biopsy order, PSC diagnosis, or lab assay. Not the original Mayo PSC biopsy model.

## Output

Returns a single numeric R value computed as: 0.03×age + 0.54×ln(bilirubin_mg_dL) + 0.54×ln(AST_U_L) + 1.24×variceal_bleeding − 0.84×albumin_g_dL. This is the Kim 2000 revised natural history score for PSC. The endpoint does not return survival probabilities, risk bands, transplant recommendations, or diagnostic conclusions.

## 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",
      "bilirubin_mg_dl",
      "ast_u_l",
      "albumin_g_dl",
      "variceal_bleeding"
     ],
     "properties": {
      "ast_u_l": {
       "type": "number",
       "description": "Aspartate aminotransferase in U/L (1-10000, magent clamp). Must be positive. magent does not assay AST."
      },
      "age_years": {
       "type": "integer",
       "description": "Age in whole years (18-120, magent clamp). Kim 2000 uses age in years in the R equation."
      },
      "albumin_g_dl": {
       "type": "number",
       "description": "Serum albumin in g/dL (1.0-6.0, magent clamp). Must be positive. Kim 2000 uses g/dL. magent does not assay albumin."
      },
      "bilirubin_mg_dl": {
       "type": "number",
       "description": "Total bilirubin in mg/dL (0.1-40, magent clamp). Must be positive; natural log is undefined at 0. Kim 2000 uses mg/dL. magent does not assay bilirubin."
      },
      "variceal_bleeding": {
       "type": "boolean",
       "description": "History of variceal bleeding as assigned by the caller (Kim 2000): true (1) or false (0). magent does not diagnose bleeding."
      }
     }
    }
   },
   "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/magent-psc-revised-risk-score-kim-2000-fdf5c633/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)
