{
  "x402Version": 2,
  "id": 38815,
  "slug": "38815",
  "resource": "https://api.magentlab.com/api/calc/score2_diabetes",
  "description": "ESC 2023 SCORE2-Diabetes 10-year fatal plus non-fatal CVD percent for type 2 diabetes, age 40-79, from sex, smoking, systolic BP, total and HDL cholesterol, age at diagnosis, IFCC HbA1c, eGFR, and European geographic risk region. Not SCORE2, not SCORE2-OP, not a diagnosis or statin order. magent does not assay lipids, HbA1c, or eGFR.",
  "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": [
              {
                "age": 60,
                "age_at_diabetes_diagnosis": 60,
                "egfr_ml_min_1_73m2": 90,
                "european_risk_region": "moderate",
                "hba1c_mmol_mol": 50,
                "hdl_mmol_l": 1.3,
                "sbp_mm_hg": 140,
                "sex": "male",
                "smoker": false,
                "total_cholesterol_mmol_l": 5.5
              },
              {
                "age": 60,
                "age_at_diabetes_diagnosis": 60,
                "egfr_ml_min_1_73m2": 90,
                "european_risk_region": "moderate",
                "hba1c_mmol_mol": 50,
                "hdl_mmol_l": 1.3,
                "sbp_mm_hg": 140,
                "sex": "male",
                "smoker": false,
                "total_cholesterol_mmol_l": 5.5
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "age": 60,
                "age_at_diabetes_diagnosis": 60,
                "citation": {
                  "authors": "SCORE2-Diabetes working group and ESC Cardiovascular risk collaboration",
                  "doi": "10.1093/eurheartj/ehad260",
                  "id": "score2-diabetes-2023",
                  "pmid": "37247330",
                  "source": "Eur Heart J. 2023;44(28):2544-2556",
                  "title": "SCORE2-Diabetes: 10-year cardiovascular risk estimation in type 2 diabetes in Europe"
                },
                "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.",
                "egfr_ml_min_1_73m2": 90,
                "european_risk_region": "moderate",
                "formula": "score2_diabetes",
                "formula_expression": "10-year fatal+non-fatal CVD % = 100*(1-exp(-exp(scale1+scale2*ln(-ln(1-uncal))))); uncal=1-S0^exp(lp); cage=(age-60)/5; csbp=(SBP-120)/20; ctc=(TC-6)/1; chdl=(HDL-1.3)/0.5; cdiabage=(age_at_dx-50)/5; chba1c=(HbA1c_mmol_mol-31)/9.34; cegfr=(ln(eGFR)-4.5)/0.15; diabetes=1; men S0=0.9605 lp=0.5368*cage+0.4774*smoke+0.1322*csbp+0.6457*diabetes+0.1102*ctc-0.1087*chdl-0.0672*cage*smoke-0.0268*cage*csbp-0.0983*cage*diabetes-0.0181*cage*ctc+0.0095*cage*chdl-0.0998*diabetes*cdiabage+0.0955*chba1c-0.0591*cegfr+0.0058*cegfr^2-0.0134*cage*chba1c+0.0115*cage*cegfr; women S0=0.9776 lp=0.6624*cage+0.6139*smoke+0.1421*csbp+0.8096*diabetes+0.1127*ctc-0.1568*chdl-0.1122*cage*smoke-0.0167*cage*csbp-0.1272*cage*diabetes-0.0200*cage*ctc+0.0186*cage*chdl-0.118*diabetes*cdiabage+0.1173*chba1c-0.0640*cegfr+0.0062*cegfr^2-0.0196*cage*chba1c+0.0169*cage*cegfr; region scale1/scale2 SCORE2 age<70 and SCORE2-OP age 70-79; age 40-79; type 2 diabetes only; geographic region not race; not SCORE2; not SCORE2-OP",
                "hba1c_mmol_mol": 50,
                "hdl_mmol_l": 1.3,
                "linear_predictor": 0.7175,
                "risk_10y_percent": 11,
                "sbp_mm_hg": 140,
                "sex": "male",
                "smoker": false,
                "total_cholesterol_mmol_l": 5.5
              },
              {
                "age": 60,
                "age_at_diabetes_diagnosis": 60,
                "citation": {
                  "authors": "SCORE2-Diabetes working group and ESC Cardiovascular risk collaboration",
                  "doi": "10.1093/eurheartj/ehad260",
                  "id": "score2-diabetes-2023",
                  "pmid": "37247330",
                  "source": "Eur Heart J. 2023;44(28):2544-2556",
                  "title": "SCORE2-Diabetes: 10-year cardiovascular risk estimation in type 2 diabetes in Europe"
                },
                "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.",
                "egfr_ml_min_1_73m2": 90,
                "european_risk_region": "moderate",
                "formula": "score2_diabetes",
                "formula_expression": "10-year fatal+non-fatal CVD % = 100*(1-exp(-exp(scale1+scale2*ln(-ln(1-uncal))))); uncal=1-S0^exp(lp); cage=(age-60)/5; csbp=(SBP-120)/20; ctc=(TC-6)/1; chdl=(HDL-1.3)/0.5; cdiabage=(age_at_dx-50)/5; chba1c=(HbA1c_mmol_mol-31)/9.34; cegfr=(ln(eGFR)-4.5)/0.15; diabetes=1; men S0=0.9605 lp=0.5368*cage+0.4774*smoke+0.1322*csbp+0.6457*diabetes+0.1102*ctc-0.1087*chdl-0.0672*cage*smoke-0.0268*cage*csbp-0.0983*cage*diabetes-0.0181*cage*ctc+0.0095*cage*chdl-0.0998*diabetes*cdiabage+0.0955*chba1c-0.0591*cegfr+0.0058*cegfr^2-0.0134*cage*chba1c+0.0115*cage*cegfr; women S0=0.9776 lp=0.6624*cage+0.6139*smoke+0.1421*csbp+0.8096*diabetes+0.1127*ctc-0.1568*chdl-0.1122*cage*smoke-0.0167*cage*csbp-0.1272*cage*diabetes-0.0200*cage*ctc+0.0186*cage*chdl-0.118*diabetes*cdiabage+0.1173*chba1c-0.0640*cegfr+0.0062*cegfr^2-0.0196*cage*chba1c+0.0169*cage*cegfr; region scale1/scale2 SCORE2 age<70 and SCORE2-OP age 70-79; age 40-79; type 2 diabetes only; geographic region not race; not SCORE2; not SCORE2-OP",
                "hba1c_mmol_mol": 50,
                "hdl_mmol_l": 1.3,
                "linear_predictor": 0.7175,
                "risk_10y_percent": 11,
                "sbp_mm_hg": 140,
                "sex": "male",
                "smoker": false,
                "total_cholesterol_mmol_l": 5.5
              }
            ],
            "path": "/api/calc/score2_diabetes"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "age": {
                          "description": "Age in years (integer 40-79). SCORE2-Diabetes 2023 is for ages 40-79. Not SCORE2 (40-69 without diabetes labs). Not SCORE2-OP.",
                          "type": "integer"
                        },
                        "age_at_diabetes_diagnosis": {
                          "description": "Age at type 2 diabetes diagnosis in years (integer 1-79, not after current age). Enters as (age_at_dx-50)/5. Patient is assumed to have type 2 diabetes.",
                          "type": "integer"
                        },
                        "egfr_ml_min_1_73m2": {
                          "description": "Caller-assigned eGFR in mL/min/1.73 m² (5-200). Enters as (ln(eGFR)-4.5)/0.15 plus the squared term. magent does not compute CKD-EPI.",
                          "type": "number"
                        },
                        "european_risk_region": {
                          "description": "Geographic SCORE2/SCORE2-OP calibration region (low, moderate, high, or very_high) as printed for SCORE2-Diabetes. Not race. Not ethnicity.",
                          "enum": [
                            "low",
                            "moderate",
                            "high",
                            "very_high"
                          ],
                          "type": "string"
                        },
                        "hba1c_mmol_mol": {
                          "description": "HbA1c in IFCC mmol/mol (20-195), not % DCCT. Enters as (HbA1c-31)/9.34. magent does not assay HbA1c.",
                          "type": "number"
                        },
                        "hdl_mmol_l": {
                          "description": "HDL cholesterol in mmol/L (0.4-4). Enters as (HDL-1.3)/0.5. magent does not assay lipids.",
                          "type": "number"
                        },
                        "sbp_mm_hg": {
                          "description": "Systolic blood pressure in mm Hg (50-250). Enters as (SBP-120)/20. magent does not measure blood pressure.",
                          "type": "number"
                        },
                        "sex": {
                          "description": "Sex used by the sex-specific SCORE2-Diabetes 2023 coefficients (female or male).",
                          "enum": [
                            "female",
                            "male"
                          ],
                          "type": "string"
                        },
                        "smoker": {
                          "description": "Current cigarette smoking as assigned by the caller (true or false). magent does not take a smoking history.",
                          "type": "boolean"
                        },
                        "total_cholesterol_mmol_l": {
                          "description": "Total cholesterol in mmol/L (1.5-15). Enters as (TC-6). magent does not assay lipids.",
                          "type": "number"
                        }
                      },
                      "required": [
                        "age",
                        "sex",
                        "smoker",
                        "sbp_mm_hg",
                        "total_cholesterol_mmol_l",
                        "hdl_mmol_l",
                        "age_at_diabetes_diagnosis",
                        "hba1c_mmol_mol",
                        "egfr_ml_min_1_73m2",
                        "european_risk_region"
                      ],
                      "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": [
    "score2-diabetes",
    "cvd-risk",
    "type-2-diabetes",
    "esc-2023",
    "europe",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T14:42:24.129Z",
  "quality": {
    "calls30d": 6,
    "uniquePayers30d": 3,
    "lastCalledAt": "2026-10-13T14:42:23.909Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "age": 60,
                  "age_at_diabetes_diagnosis": 60,
                  "egfr_ml_min_1_73m2": 90,
                  "european_risk_region": "moderate",
                  "hba1c_mmol_mol": 50,
                  "hdl_mmol_l": 1.3,
                  "sbp_mm_hg": 140,
                  "sex": "male",
                  "smoker": false,
                  "total_cholesterol_mmol_l": 5.5
                },
                {
                  "age": 60,
                  "age_at_diabetes_diagnosis": 60,
                  "egfr_ml_min_1_73m2": 90,
                  "european_risk_region": "moderate",
                  "hba1c_mmol_mol": 50,
                  "hdl_mmol_l": 1.3,
                  "sbp_mm_hg": 140,
                  "sex": "male",
                  "smoker": false,
                  "total_cholesterol_mmol_l": 5.5
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "age": 60,
                  "age_at_diabetes_diagnosis": 60,
                  "citation": {
                    "authors": "SCORE2-Diabetes working group and ESC Cardiovascular risk collaboration",
                    "doi": "10.1093/eurheartj/ehad260",
                    "id": "score2-diabetes-2023",
                    "pmid": "37247330",
                    "source": "Eur Heart J. 2023;44(28):2544-2556",
                    "title": "SCORE2-Diabetes: 10-year cardiovascular risk estimation in type 2 diabetes in Europe"
                  },
                  "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.",
                  "egfr_ml_min_1_73m2": 90,
                  "european_risk_region": "moderate",
                  "formula": "score2_diabetes",
                  "formula_expression": "10-year fatal+non-fatal CVD % = 100*(1-exp(-exp(scale1+scale2*ln(-ln(1-uncal))))); uncal=1-S0^exp(lp); cage=(age-60)/5; csbp=(SBP-120)/20; ctc=(TC-6)/1; chdl=(HDL-1.3)/0.5; cdiabage=(age_at_dx-50)/5; chba1c=(HbA1c_mmol_mol-31)/9.34; cegfr=(ln(eGFR)-4.5)/0.15; diabetes=1; men S0=0.9605 lp=0.5368*cage+0.4774*smoke+0.1322*csbp+0.6457*diabetes+0.1102*ctc-0.1087*chdl-0.0672*cage*smoke-0.0268*cage*csbp-0.0983*cage*diabetes-0.0181*cage*ctc+0.0095*cage*chdl-0.0998*diabetes*cdiabage+0.0955*chba1c-0.0591*cegfr+0.0058*cegfr^2-0.0134*cage*chba1c+0.0115*cage*cegfr; women S0=0.9776 lp=0.6624*cage+0.6139*smoke+0.1421*csbp+0.8096*diabetes+0.1127*ctc-0.1568*chdl-0.1122*cage*smoke-0.0167*cage*csbp-0.1272*cage*diabetes-0.0200*cage*ctc+0.0186*cage*chdl-0.118*diabetes*cdiabage+0.1173*chba1c-0.0640*cegfr+0.0062*cegfr^2-0.0196*cage*chba1c+0.0169*cage*cegfr; region scale1/scale2 SCORE2 age<70 and SCORE2-OP age 70-79; age 40-79; type 2 diabetes only; geographic region not race; not SCORE2; not SCORE2-OP",
                  "hba1c_mmol_mol": 50,
                  "hdl_mmol_l": 1.3,
                  "linear_predictor": 0.7175,
                  "risk_10y_percent": 11,
                  "sbp_mm_hg": 140,
                  "sex": "male",
                  "smoker": false,
                  "total_cholesterol_mmol_l": 5.5
                },
                {
                  "age": 60,
                  "age_at_diabetes_diagnosis": 60,
                  "citation": {
                    "authors": "SCORE2-Diabetes working group and ESC Cardiovascular risk collaboration",
                    "doi": "10.1093/eurheartj/ehad260",
                    "id": "score2-diabetes-2023",
                    "pmid": "37247330",
                    "source": "Eur Heart J. 2023;44(28):2544-2556",
                    "title": "SCORE2-Diabetes: 10-year cardiovascular risk estimation in type 2 diabetes in Europe"
                  },
                  "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.",
                  "egfr_ml_min_1_73m2": 90,
                  "european_risk_region": "moderate",
                  "formula": "score2_diabetes",
                  "formula_expression": "10-year fatal+non-fatal CVD % = 100*(1-exp(-exp(scale1+scale2*ln(-ln(1-uncal))))); uncal=1-S0^exp(lp); cage=(age-60)/5; csbp=(SBP-120)/20; ctc=(TC-6)/1; chdl=(HDL-1.3)/0.5; cdiabage=(age_at_dx-50)/5; chba1c=(HbA1c_mmol_mol-31)/9.34; cegfr=(ln(eGFR)-4.5)/0.15; diabetes=1; men S0=0.9605 lp=0.5368*cage+0.4774*smoke+0.1322*csbp+0.6457*diabetes+0.1102*ctc-0.1087*chdl-0.0672*cage*smoke-0.0268*cage*csbp-0.0983*cage*diabetes-0.0181*cage*ctc+0.0095*cage*chdl-0.0998*diabetes*cdiabage+0.0955*chba1c-0.0591*cegfr+0.0058*cegfr^2-0.0134*cage*chba1c+0.0115*cage*cegfr; women S0=0.9776 lp=0.6624*cage+0.6139*smoke+0.1421*csbp+0.8096*diabetes+0.1127*ctc-0.1568*chdl-0.1122*cage*smoke-0.0167*cage*csbp-0.1272*cage*diabetes-0.0200*cage*ctc+0.0186*cage*chdl-0.118*diabetes*cdiabage+0.1173*chba1c-0.0640*cegfr+0.0062*cegfr^2-0.0196*cage*chba1c+0.0169*cage*cegfr; region scale1/scale2 SCORE2 age<70 and SCORE2-OP age 70-79; age 40-79; type 2 diabetes only; geographic region not race; not SCORE2; not SCORE2-OP",
                  "hba1c_mmol_mol": 50,
                  "hdl_mmol_l": 1.3,
                  "linear_predictor": 0.7175,
                  "risk_10y_percent": 11,
                  "sbp_mm_hg": 140,
                  "sex": "male",
                  "smoker": false,
                  "total_cholesterol_mmol_l": 5.5
                }
              ],
              "path": "/api/calc/score2_diabetes"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "age": {
                            "description": "Age in years (integer 40-79). SCORE2-Diabetes 2023 is for ages 40-79. Not SCORE2 (40-69 without diabetes labs). Not SCORE2-OP.",
                            "type": "integer"
                          },
                          "age_at_diabetes_diagnosis": {
                            "description": "Age at type 2 diabetes diagnosis in years (integer 1-79, not after current age). Enters as (age_at_dx-50)/5. Patient is assumed to have type 2 diabetes.",
                            "type": "integer"
                          },
                          "egfr_ml_min_1_73m2": {
                            "description": "Caller-assigned eGFR in mL/min/1.73 m² (5-200). Enters as (ln(eGFR)-4.5)/0.15 plus the squared term. magent does not compute CKD-EPI.",
                            "type": "number"
                          },
                          "european_risk_region": {
                            "description": "Geographic SCORE2/SCORE2-OP calibration region (low, moderate, high, or very_high) as printed for SCORE2-Diabetes. Not race. Not ethnicity.",
                            "enum": [
                              "low",
                              "moderate",
                              "high",
                              "very_high"
                            ],
                            "type": "string"
                          },
                          "hba1c_mmol_mol": {
                            "description": "HbA1c in IFCC mmol/mol (20-195), not % DCCT. Enters as (HbA1c-31)/9.34. magent does not assay HbA1c.",
                            "type": "number"
                          },
                          "hdl_mmol_l": {
                            "description": "HDL cholesterol in mmol/L (0.4-4). Enters as (HDL-1.3)/0.5. magent does not assay lipids.",
                            "type": "number"
                          },
                          "sbp_mm_hg": {
                            "description": "Systolic blood pressure in mm Hg (50-250). Enters as (SBP-120)/20. magent does not measure blood pressure.",
                            "type": "number"
                          },
                          "sex": {
                            "description": "Sex used by the sex-specific SCORE2-Diabetes 2023 coefficients (female or male).",
                            "enum": [
                              "female",
                              "male"
                            ],
                            "type": "string"
                          },
                          "smoker": {
                            "description": "Current cigarette smoking as assigned by the caller (true or false). magent does not take a smoking history.",
                            "type": "boolean"
                          },
                          "total_cholesterol_mmol_l": {
                            "description": "Total cholesterol in mmol/L (1.5-15). Enters as (TC-6). magent does not assay lipids.",
                            "type": "number"
                          }
                        },
                        "required": [
                          "age",
                          "sex",
                          "smoker",
                          "sbp_mm_hg",
                          "total_cholesterol_mmol_l",
                          "hdl_mmol_l",
                          "age_at_diabetes_diagnosis",
                          "hba1c_mmol_mol",
                          "egfr_ml_min_1_73m2",
                          "european_risk_region"
                        ],
                        "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"
  }
}