# Magent CPR Index (C-Peptide-to-Glucose Ratio) Calculator

> Magent CPR Index (C-Peptide-to-Glucose Ratio) Calculator 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 Saisho 2011 C-Peptide Reactivity (CPR) Index from serum C-peptide and plasma glucose, and flags whether the result falls below the 2.02 cutoff predictive of later insulin therapy need.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/cpri
- 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/magent-cpr-index-c-peptide-to-glucose-ratio-calculator-72dcae8d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jl7LJcK-5b-RFTKT1ZXOe

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-cpr-index-c-peptide-to-glucose-ratio-calculator-72dcae8d
```

Example prompt: Calculate the CPR index for a fasting patient with a serum C-peptide of 1.8 ng/mL and a plasma glucose of 210 mg/dL, and tell me if it falls below the 2.02 cutoff for predicting future insulin therapy need.

## When to prefer this

Use this endpoint when you need the specific Saisho 2011 CPR index arithmetic with an automated below-2.02 cutoff flag, particularly in clinical decision support workflows evaluating future insulin therapy need. Prefer it over manual calculation to avoid arithmetic errors and to get the standardized cutoff flag with its documented sensitivity/specificity. Do not use for HOMA-IR, standalone C-peptide interpretation, diabetes diagnosis, or insulin dosing orders.

## Known failure modes

- Missing required query parameters (timing, c_peptide_ng_ml, glucose_mg_dl) returns a 400 error
- Glucose value outside 50–1000 mg/dL range rejected as invalid input
- C-peptide value outside 0–40 ng/mL range rejected
- Glucose provided in mmol/L instead of mg/dL will produce incorrect results (no unit conversion performed)
- Payment not included or insufficient USDC results in 402 Payment Required

## How this service works

Saisho 2011 CPR index: serum C-peptide (ng/mL) / plasma glucose (mg/dL) * 100, two decimals. timing fasting or postprandial (same formula; required label). below_best_cutoff true iff cpri < 2.02 (ROC for later insulin therapy; 80.8% sensitivity, 63.3% specificity). Glucose mg/dL only. Not HOMA-IR, not a diabetes diagnosis, not C-peptide alone, and not an insulin order.

## Output

Returns the CPR index as a decimal value rounded to two places (C-peptide ng/mL / glucose mg/dL * 100), the sample timing label, and a boolean below_best_cutoff indicating whether the index is below 2.02 — the ROC-derived threshold associated with 80.8% sensitivity and 63.3% specificity for predicting later insulin therapy requirement.

## 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": [
      "timing",
      "c_peptide_ng_ml",
      "glucose_mg_dl"
     ],
     "properties": {
      "timing": {
       "enum": [
        "fasting",
        "postprandial"
       ],
       "type": "string",
       "description": "Sample timing as assigned by the caller: fasting or postprandial. Same CPR-index arithmetic; magent does not pick a formula from the clock."
      },
      "glucose_mg_dl": {
       "type": "number",
       "description": "Plasma glucose in mg/dL (50-1000). mg/dL only; magent does not convert mmol/L."
      },
      "c_peptide_ng_ml": {
       "type": "number",
       "description": "Serum C-peptide in ng/mL (0-40). Saisho 2011 CPR units."
      }
     }
    }
   },
   "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-cpr-index-c-peptide-to-glucose-ratio-calculator-72dcae8d/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)
