{
  "x402Version": 2,
  "id": 39225,
  "slug": "39225",
  "resource": "https://api.magentlab.com/api/calc/cpri",
  "description": "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.",
  "type": "http",
  "serviceName": "magent",
  "resourceType": "Agent Service",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x836Be278f1739fB4308091cD1852F7971Bc19Ee2",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 600
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "iconUrl": "https://api.magentlab.com/favicon.ico",
        "input": {
          "body": {
            "items": [
              {
                "c_peptide_ng_ml": 2.02,
                "glucose_mg_dl": 100,
                "timing": "postprandial"
              },
              {
                "c_peptide_ng_ml": 2.02,
                "glucose_mg_dl": 100,
                "timing": "postprandial"
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "below_best_cutoff": false,
                "c_peptide_ng_ml": 2.02,
                "citation": {
                  "authors": "Saisho Y, Kou K, Tanaka K, Abe T, Kurosawa H, Shimada A, Meguro S, Kawai T, Itoh H",
                  "doi": "10.1507/endocrj.K10E-399",
                  "id": "saisho-2011",
                  "pmid": "21528347",
                  "source": "Endocr J. 2011;58(4):315-322",
                  "title": "Postprandial serum C-peptide to plasma glucose ratio as a predictor of subsequent insulin treatment in patients with type 2 diabetes"
                },
                "cpri": 2.02,
                "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
                "formula": "cpri",
                "formula_expression": "cpri = c_peptide_ng_ml / glucose_mg_dl * 100",
                "glucose_mg_dl": 100,
                "timing": "postprandial"
              },
              {
                "below_best_cutoff": false,
                "c_peptide_ng_ml": 2.02,
                "citation": {
                  "authors": "Saisho Y, Kou K, Tanaka K, Abe T, Kurosawa H, Shimada A, Meguro S, Kawai T, Itoh H",
                  "doi": "10.1507/endocrj.K10E-399",
                  "id": "saisho-2011",
                  "pmid": "21528347",
                  "source": "Endocr J. 2011;58(4):315-322",
                  "title": "Postprandial serum C-peptide to plasma glucose ratio as a predictor of subsequent insulin treatment in patients with type 2 diabetes"
                },
                "cpri": 2.02,
                "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
                "formula": "cpri",
                "formula_expression": "cpri = c_peptide_ng_ml / glucose_mg_dl * 100",
                "glucose_mg_dl": 100,
                "timing": "postprandial"
              }
            ],
            "path": "/api/calc/cpri"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "c_peptide_ng_ml": {
                          "description": "Serum C-peptide in ng/mL (0-40). Saisho 2011 CPR units.",
                          "type": "number"
                        },
                        "glucose_mg_dl": {
                          "description": "Plasma glucose in mg/dL (50-1000). mg/dL only; magent does not convert mmol/L.",
                          "type": "number"
                        },
                        "timing": {
                          "description": "Sample timing as assigned by the caller: fasting or postprandial. Same CPR-index arithmetic; magent does not pick a formula from the clock.",
                          "enum": [
                            "fasting",
                            "postprandial"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "timing",
                        "c_peptide_ng_ml",
                        "glucose_mg_dl"
                      ],
                      "type": "object"
                    },
                    "maxItems": 25,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "items"
                ],
                "type": "object"
              },
              "headers": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "method": {
                "const": "POST",
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "cpri",
    "c-peptide",
    "glucose",
    "diabetes",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T02:16:05.887Z",
  "quality": {
    "calls30d": 5,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-13T02:16:05.764Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "c_peptide_ng_ml": 2.02,
                  "glucose_mg_dl": 100,
                  "timing": "postprandial"
                },
                {
                  "c_peptide_ng_ml": 2.02,
                  "glucose_mg_dl": 100,
                  "timing": "postprandial"
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "below_best_cutoff": false,
                  "c_peptide_ng_ml": 2.02,
                  "citation": {
                    "authors": "Saisho Y, Kou K, Tanaka K, Abe T, Kurosawa H, Shimada A, Meguro S, Kawai T, Itoh H",
                    "doi": "10.1507/endocrj.K10E-399",
                    "id": "saisho-2011",
                    "pmid": "21528347",
                    "source": "Endocr J. 2011;58(4):315-322",
                    "title": "Postprandial serum C-peptide to plasma glucose ratio as a predictor of subsequent insulin treatment in patients with type 2 diabetes"
                  },
                  "cpri": 2.02,
                  "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
                  "formula": "cpri",
                  "formula_expression": "cpri = c_peptide_ng_ml / glucose_mg_dl * 100",
                  "glucose_mg_dl": 100,
                  "timing": "postprandial"
                },
                {
                  "below_best_cutoff": false,
                  "c_peptide_ng_ml": 2.02,
                  "citation": {
                    "authors": "Saisho Y, Kou K, Tanaka K, Abe T, Kurosawa H, Shimada A, Meguro S, Kawai T, Itoh H",
                    "doi": "10.1507/endocrj.K10E-399",
                    "id": "saisho-2011",
                    "pmid": "21528347",
                    "source": "Endocr J. 2011;58(4):315-322",
                    "title": "Postprandial serum C-peptide to plasma glucose ratio as a predictor of subsequent insulin treatment in patients with type 2 diabetes"
                  },
                  "cpri": 2.02,
                  "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
                  "formula": "cpri",
                  "formula_expression": "cpri = c_peptide_ng_ml / glucose_mg_dl * 100",
                  "glucose_mg_dl": 100,
                  "timing": "postprandial"
                }
              ],
              "path": "/api/calc/cpri"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "c_peptide_ng_ml": {
                            "description": "Serum C-peptide in ng/mL (0-40). Saisho 2011 CPR units.",
                            "type": "number"
                          },
                          "glucose_mg_dl": {
                            "description": "Plasma glucose in mg/dL (50-1000). mg/dL only; magent does not convert mmol/L.",
                            "type": "number"
                          },
                          "timing": {
                            "description": "Sample timing as assigned by the caller: fasting or postprandial. Same CPR-index arithmetic; magent does not pick a formula from the clock.",
                            "enum": [
                              "fasting",
                              "postprandial"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "timing",
                          "c_peptide_ng_ml",
                          "glucose_mg_dl"
                        ],
                        "type": "object"
                      },
                      "maxItems": 25,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "type": "object"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "method": {
                  "const": "POST",
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.magentlab.com",
    "manifest_name": "api.magentlab.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}