# magent CANRISK Diabetes Risk Calculator

> magent CANRISK Diabetes Risk 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-14).

Computes the pCANRISK score (Robinson 2011 Table 3) to estimate an individual's risk of developing type 2 diabetes based on demographic, anthropometric, lifestyle, and clinical factors

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/canrisk
- 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-canrisk-diabetes-risk-calculator-bd0bc23b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YeBAHWwcLt_9WnzjsfdoR

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-canrisk-diabetes-risk-calculator-bd0bc23b
```

Example prompt: Can you calculate the pCANRISK diabetes risk score for a 58-year-old female patient — she's South Asian, BMI 31.2, waist 90 cm, has high blood pressure, no high glucose history, no macrosomia, one first-degree relative with diabetes, university education, does less than 30 minutes of activity per day, and rarely eats fruit or vegetables?

## When to prefer this

Use this endpoint when you need a validated, citation-grounded Canadian diabetes risk score (pCANRISK, Robinson 2011 Table 3) for an individual with known demographic and clinical inputs. Prefer it over generic risk calculators when ethnicity-adjusted scoring and explicit Robinson 2011 cutoffs are required, or when you need a deterministic, reproducible score for clinical documentation or population health screening pipelines.

## Known failure modes

- Missing required query parameters (age, sex, bmi_kg_m2, waist_cm, etc.) returns a 400 error
- Age outside 18-120 range causes validation failure
- Waist circumference outside 40-200 cm range rejected
- BMI outside 10-80 range rejected
- Invalid enum values for sex, education, ethnicity, or family history return validation errors
- Payment header missing or insufficient USDC balance causes 402 Payment Required

## How this service works

Robinson 2011 Table 3 pCANRISK (not eCANRISK). Age 0/7/13/15; male 6; BMI 0/4/9/14; waist 0/4/6 by sex; inactivity 1; no daily fruit/veg 2; high BP 4; high glucose 14; macrosomia 1 (women); family first-degree categories ×2; caller-assigned ethnicity White 0 Aboriginal 3 Black 5 East Asian 10 South Asian 11; education 5/1/0. Max 81 F/86 M. Cutoffs 21, 29, 32, 33, 43. Not a diagnosis.

## Output

Returns a numeric pCANRISK score (integer out of a maximum of 81 for females or 86 for males) computed from the Robinson 2011 Table 3 point system, along with applicable risk tier cutoffs (21, 29, 32, 33, 43). Not a medical diagnosis.

## 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",
      "sex",
      "bmi_kg_m2",
      "waist_cm",
      "activity_30min",
      "daily_fruit_veg",
      "high_bp",
      "high_glucose",
      "macrosomia",
      "family_history_count",
      "ethnicity",
      "education"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (18-120). Robinson 2011 Table 3 pCANRISK: 19-44 scores 0; magent scores 18-44 as 0. 45-54 scores 7; 55-64 scores 13; 65-78 scores 15; magent scores ≥65 as 15. Age 44 scores 0; 45 and 54 score 7; 55 and 64 score 13; 65 scores 15."
      },
      "sex": {
       "enum": [
        "female",
        "male"
       ],
       "type": "string",
       "description": "female or male. Robinson 2011 Table 3: female scores 0; male scores 6. Selects the sex-specific waist bands. Macrosomia is N/A for male (0)."
      },
      "high_bp": {
       "type": "boolean",
       "description": "History of high blood pressure (Robinson 2011 Table 3). true scores 4; false scores 0. magent does not measure blood pressure."
      },
      "waist_cm": {
       "type": "number",
       "description": "Waist circumference in cm (40-200). Robinson 2011 Table 3 men: <94 scores 0; 94-102 scores 4; >102 scores 6. Women: <80 scores 0; 80-88 scores 4; >88 scores 6. 94 and 102 (men) and 80 and 88 (women) score 4."
      },
      "bmi_kg_m2": {
       "type": "number",
       "description": "Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Robinson 2011 Table 3: <25 scores 0; 25-29.9 scores 4; 30-34.9 scores 9; ≥35 scores 14. 25.0 and 29.9 score 4; 30.0 and 34.9 score 9; 35.0 scores 14."
      },
      "education": {
       "enum": [
        "less_than_high_school",
        "high_school",
        "some_college",
        "university"
       ],
       "type": "string",
       "description": "Highest education completed (Robinson 2011 Table
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-canrisk-diabetes-risk-calculator-bd0bc23b/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)
