# CIOMS R Factor Calculator (Bénichou 1990)

> CIOMS R Factor Calculator (Bénichou 1990) 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-15).

Computes the CIOMS R factor from ALT, ALP, and their laboratory upper limits of normal to classify drug-induced liver injury pattern as hepatocellular, cholestatic, or mixed.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/r_factor
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cioms-r-factor-calculator-b-nichou-1990-01f059da
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_riJAnu3rKkfJkyAdWj4LK

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 cioms-r-factor-calculator-b-nichou-1990-01f059da
```

Example prompt: Calculate the CIOMS R factor for a patient with ALT of 180 U/L (ULN 40 U/L) and ALP of 95 U/L (ULN 120 U/L) — is the liver injury pattern hepatocellular, cholestatic, or mixed?

## When to prefer this

Use this endpoint when you need a deterministic, standards-referenced CIOMS R factor calculation using lab-specific ULNs rather than assumed normal ranges. Prefer it when building pharmacovigilance pipelines, annotating DILI cases, or automating hepatotoxicity pattern classification in clinical trial safety workflows. It is not a RUCAM calculator and does not perform diagnosis — it computes the enzyme pattern ratio only.

## Known failure modes

- Missing required query parameters (alt_u_l, alp_u_l, alt_uln_u_l, alp_uln_u_l) returns a 4xx validation error
- ALP or ALP ULN of 0 causes division-by-zero and is rejected (must be >0)
- Values outside accepted ranges (e.g. ALT ULN outside 5–200 U/L) may be rejected with validation error
- Payment not included or insufficient (x402 protocol) results in 402 Payment Required

## How this service works

CIOMS R factor from ALT, ALP, and laboratory ULNs (Bénichou 1990). R = (ALT/ALT_ULN)/(ALP/ALP_ULN), rounded to 1 decimal, then hepatocellular (R ≥ 5), cholestatic (R ≤ 2), or mixed (2 < R < 5). Deterministic published arithmetic with citation. Not a medical device, not a DILI diagnosis or RUCAM score; magent does not assay enzymes. R is the enzyme pattern only.

## Output

Returns the computed R factor value (rounded to one decimal place) and the CIOMS pattern classification: hepatocellular (R ≥ 5), cholestatic (R ≤ 2), or mixed (2 < R < 5), based on the formula R = (ALT/ALT_ULN) / (ALP/ALP_ULN) per Bénichou 1990.

## 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": [
      "alt_u_l",
      "alp_u_l",
      "alt_uln_u_l",
      "alp_uln_u_l"
     ],
     "properties": {
      "alp_u_l": {
       "type": "number",
       "description": "Alkaline phosphatase in U/L (1-10000). Must be greater than 0."
      },
      "alt_u_l": {
       "type": "number",
       "description": "Alanine aminotransferase in U/L (1-10000)."
      },
      "alp_uln_u_l": {
       "type": "number",
       "description": "Laboratory ALP upper limit of normal in U/L (20-500). Required; must be greater than 0."
      },
      "alt_uln_u_l": {
       "type": "number",
       "description": "Laboratory ALT upper limit of normal in U/L (5-200). Required; magent does not assume 40."
      }
     }
    }
   },
   "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/cioms-r-factor-calculator-b-nichou-1990-01f059da/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)
