MAGENT

Kidney · LIVE

CP-AKI simple risk score (Gupta)

CP-AKI simple score

Sum the Gupta 2024 Figure 2 simple integer/half-integer points for severe CP-AKI after a first intravenous cisplatin dose and return low, moderate, high, or very_high.

LIVE $0.005 USDC GET /api/calc/cp_aki

Markdown: /docs/cp-aki.md · Canonical: https://magentlab.com/docs/cp-aki

Not a medical device. Not a diagnosis, dose, or listing recommendation.

What it computes

Sum the Gupta 2024 Figure 2 simple integer/half-integer points for severe CP-AKI after a first intravenous cisplatin dose and return low, moderate, high, or very_high.

When to use

When an agent already has caller-assigned age, hypertension, diabetes, smoking, hemoglobin, WBC, albumin, magnesium, and first cisplatin dose in mg and needs the published Figure 2 point total. magent does not assay labs or dose cisplatin.

When not to use

  • Not a medical device and not a diagnosis of AKI, CKD, or cisplatin toxicity. Not a chemotherapy order, dose reduction, or hydration protocol.
  • This is the Gupta 2024 Figure 2 simple integer/half-integer score only (range 0–22.5). It is not the restricted-cubic-spline logistic primary model.
  • Serum creatinine is omitted from the simple score for parsimony (Gupta 2024). Platelets are in the primary model and are not Figure 2 points. Current or former smoking is a simple-score covariate (BMJ 2024;385:q1207).
  • magent does not assay hemoglobin, WBC, albumin, or magnesium and does not dose cisplatin. Values are caller-assigned. Use paper units (hemoglobin g/L, albumin g/L, magnesium mmol/L) or the documented dual-unit aliases.
  • Figure 3 groups are low 0–5.5, moderate 6–9.5, high 10–15.5, very_high ≥16. Published CP-AKI incidence was 1.3% (low) to 23.5% (very high) in derivation and 1.1% to 16.7% in validation. Those cohort rates are not a patient-specific probability.

Formula

CP-AKI simple = age (≤45 0; 46-60 2.5; 61-70 3.5; >70 4.5) + hypertension 1 + diabetes 1 + current_or_former_smoker 1 + hemoglobin_g_l (≥120 0; 110-119 1; <110 1.5) + wbc_10e9_l (≤12.0 0; >12.0 1.5) + albumin_g_l (>38 0; 33-38 1; <33 1.5) + magnesium_mmol_l (≥0.82 0; <0.82 1) + cisplatin_dose_mg (≤50 0; 51-75 2; 76-100 2.5; 101-125 3; 126-150 5; 151-200 7.5; >200 9.5); Gupta 2024 Figure 2 odds-ratio points; max 22.5; no creatinine; no platelets; low 0-5.5 / moderate 6-9.5 / high 10-15.5 / very_high ≥16

Citation

Title
Derivation and external validation of a simple risk score for predicting severe acute kidney injury after intravenous cisplatin: cohort study
Authors
Gupta S, et al.
Source
BMJ. 2024;384:e077169
DOI
10.1136/bmj-2023-077169

Worked example

Lowest Figure 2 combination

Given: age=40albumin_g_l=42cisplatin_dose_mg=50current_or_former_smoker=falsediabetes=falsehemoglobin_g_l=130hypertension=falsemagnesium_mmol_l=0.90wbc_k_ul=8

  1. age 40 ≤45 → 0; no hypertension, diabetes, or smoking → 0; hemoglobin 130 ≥120 → 0; WBC 8.0 ≤12.0 → 0; albumin 42 >38 → 0; magnesium 0.90 ≥0.82 → 0; cisplatin 50 ≤50 → 0
  2. Score = 0 (max 22.5); risk_group = low (0–5.5)

Highest published Figure 2 combination

Given: age=75albumin_g_l=30cisplatin_dose_mg=250current_or_former_smoker=truediabetes=truehemoglobin_g_l=100hypertension=truemagnesium_mmol_l=0.70wbc_k_ul=15

  1. age >70 → 4.5; hypertension 1; diabetes 1; smoker 1; hemoglobin <110 → 1.5; WBC >12.0 → 1.5; albumin <33 → 1.5; magnesium <0.82 → 1; cisplatin >200 → 9.5
  2. Score = 22.5 (max 22.5); risk_group = very_high (≥16)

Also searched as

  • CP-AKI
  • cisplatin AKI score
  • Gupta cisplatin kidney injury
  • severe CP-AKI risk score
  • cisplatin-associated acute kidney injury
  • Figure 2 cisplatin AKI
  • first-dose cisplatin AKI
  • Gupta 2024 BMJ CP-AKI

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/cp_aki?age=40&hypertension=false&diabetes=false&current_or_former_smoker=false&hemoglobin_g_l=130&wbc_k_ul=8&albumin_g_l=42&magnesium_mmol_l=0.90&cisplatin_dose_mg=50

Full URL: https://api.magentlab.com/api/calc/cp_aki?age=40&hypertension=false&diabetes=false&current_or_former_smoker=false&hemoglobin_g_l=130&wbc_k_ul=8&albumin_g_l=42&magnesium_mmol_l=0.90&cisplatin_dose_mg=50

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/cp_aki?age=40&hypertension=false&diabetes=false&current_or_former_smoker=false&hemoglobin_g_l=130&wbc_k_ul=8&albumin_g_l=42&magnesium_mmol_l=0.90&cisplatin_dose_mg=50"

Parameters

Name Type Required Description
age integer required Age in years (integer 18-120). Gupta 2024 Figure 2: ≤45 scores 0; 46-60 scores 2.5; 61-70 scores 3.5; >70 scores 4.5.
hypertension boolean required Caller-assigned hypertension (Gupta 2024 Figure 2). true scores 1. magent does not diagnose hypertension.
diabetes boolean required Caller-assigned diabetes mellitus (Gupta 2024 Figure 2). true scores 1. magent does not diagnose diabetes.
current_or_former_smoker boolean required Caller-assigned current or former smoker (Gupta 2024 Figure 2 simple score; BMJ 2024;385:q1207). true scores 1. magent does not take a smoking history.
hemoglobin_g_l number optional Hemoglobin in g/L (30-220), Gupta 2024 units. Provide this or hemoglobin_g_dl, not both. ≥120 scores 0; 110-119 scores 1; <110 scores 1.5. magent does not assay hemoglobin.
hemoglobin_g_dl number optional Hemoglobin in g/dL (3-22). Converted as hemoglobin_g_l = hemoglobin_g_dl × 10. Provide this or hemoglobin_g_l, not both.
wbc_k_ul number optional White blood cell count in 10^9/L (0.01-500), same as k/µL. Provide this or wbc_ul, not both. ≤12.0 scores 0; >12.0 scores 1.5 (Gupta 2024 Figure 2). magent does not assay WBC.
wbc_ul number optional White blood cell count per µL (10-500000). Converted as wbc_10e9_l = wbc_ul / 1000. Provide this or wbc_k_ul, not both.
albumin_g_l number optional Serum albumin in g/L (10-60), Gupta 2024 units. Provide this or albumin_g_dl, not both. >38 scores 0; 33-38 scores 1; <33 scores 1.5. magent does not assay albumin.
albumin_g_dl number optional Serum albumin in g/dL (1-6). Converted as albumin_g_l = albumin_g_dl × 10. Provide this or albumin_g_l, not both.
magnesium_mmol_l number required Serum magnesium in mmol/L (0.2-2.5), Gupta 2024 units. ≥0.82 scores 0; <0.82 scores 1. magent does not assay magnesium.
cisplatin_dose_mg number required First intravenous cisplatin dose in mg (1-500), Gupta 2024 Figure 2. ≤50 scores 0; 51-75 scores 2; 76-100 scores 2.5; 101-125 scores 3; 126-150 scores 5; 151-200 scores 7.5; >200 scores 9.5. magent does not dose cisplatin.

Bulk (POST)

POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement.

POST /api/calc/cp_aki Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 PREVIEW

  • 1 to 25 items. Each item uses the same keys as the GET query parameters.
  • POST of 1 item costs the same as GET. Lists longer than 25: chunk into multiple POSTs. Extra items still execute; do not pad dummy rows.
  • The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
  • HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
  • Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
  • x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.

Example request (fixture)

{
  "items": [
    {
      "age": "40",
      "albumin_g_l": "42",
      "cisplatin_dose_mg": "50",
      "current_or_former_smoker": "false",
      "diabetes": "false",
      "hemoglobin_g_l": "130",
      "hypertension": "false",
      "magnesium_mmol_l": "0.90",
      "wbc_k_ul": "8"
    },
    {
      "age": "40",
      "albumin_g_l": "42",
      "cisplatin_dose_mg": "50",
      "current_or_former_smoker": "false",
      "diabetes": "false",
      "hemoglobin_g_l": "130",
      "hypertension": "false",
      "magnesium_mmol_l": "0.90",
      "wbc_k_ul": "8"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/cp_aki",
  "items": [
    {
      "components": [
        {
          "value": 40,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "factor": "hypertension",
          "points": 0,
          "present": false
        },
        {
          "factor": "diabetes",
          "points": 0,
          "present": false
        },
        {
          "factor": "current_or_former_smoker",
          "points": 0,
          "present": false
        },
        {
          "value": 130.0,
          "factor": "hemoglobin",
          "points": 0,
          "present": false
        },
        {
          "value": 8.0,
          "factor": "wbc",
          "points": 0,
          "present": false
        },
        {
          "value": 42.0,
          "factor": "albumin",
          "points": 0,
          "present": false
        },
        {
          "value": 0.9,
          "factor": "magnesium",
          "points": 0,
          "present": false
        },
        {
          "value": 50.0,
          "factor": "cisplatin_dose",
          "points": 0,
          "present": false
        }
      ],
      "age": 40,
      "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.",
      "citation": {
        "authors": "Gupta S, et al.",
        "doi": "10.1136/bmj-2023-077169",
        "id": "gupta-2024",
        "pmid": "38538012",
        "source": "BMJ. 2024;384:e077169",
        "title": "Derivation and external validation of a simple risk score for predicting severe acute kidney injury after intravenous cisplatin: cohort study"
      },
      "formula": "cp_aki",
      "formula_expression": "CP-AKI simple = age (≤45 0; 46-60 2.5; 61-70 3.5; >70 4.5) + hypertension 1 + diabetes 1 + current_or_former_smoker 1 + hemoglobin_g_l (≥120 0; 110-119 1; <110 1.5) + wbc_10e9_l (≤12.0 0; >12.0 1.5) + albumin_g_l (>38 0; 33-38 1; <33 1.5) + magnesium_mmol_l (≥0.82 0; <0.82 1) + cisplatin_dose_mg (≤50 0; 51-75 2; 76-100 2.5; 101-125 3; 126-150 5; 151-200 7.5; >200 9.5); Gupta 2024 Figure 2 odds-ratio points; max 22.5; no creatinine; no platelets; low 0-5.5 / moderate 6-9.5 / high 10-15.5 / very_high ≥16",
      "max_score": 22.5,
      "score": 0,
      "wbc_10e9_l": 8.0,
      "albumin_g_l": 42.0,
      "risk_group": "low",
      "cisplatin_dose_mg": 50.0,
      "hemoglobin_g_l": 130.0,
      "magnesium_mmol_l": 0.9
    },
    {
      "components": [
        {
          "value": 40,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "factor": "hypertension",
          "points": 0,
          "present": false
        },
        {
          "factor": "diabetes",
          "points": 0,
          "present": false
        },
        {
          "factor": "current_or_former_smoker",
          "points": 0,
          "present": false
        },
        {
          "value": 130.0,
          "factor": "hemoglobin",
          "points": 0,
          "present": false
        },
        {
          "value": 8.0,
          "factor": "wbc",
          "points": 0,
          "present": false
        },
        {
          "value": 42.0,
          "factor": "albumin",
          "points": 0,
          "present": false
        },
        {
          "value": 0.9,
          "factor": "magnesium",
          "points": 0,
          "present": false
        },
        {
          "value": 50.0,
          "factor": "cisplatin_dose",
          "points": 0,
          "present": false
        }
      ],
      "age": 40,
      "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.",
      "citation": {
        "authors": "Gupta S, et al.",
        "doi": "10.1136/bmj-2023-077169",
        "id": "gupta-2024",
        "pmid": "38538012",
        "source": "BMJ. 2024;384:e077169",
        "title": "Derivation and external validation of a simple risk score for predicting severe acute kidney injury after intravenous cisplatin: cohort study"
      },
      "formula": "cp_aki",
      "formula_expression": "CP-AKI simple = age (≤45 0; 46-60 2.5; 61-70 3.5; >70 4.5) + hypertension 1 + diabetes 1 + current_or_former_smoker 1 + hemoglobin_g_l (≥120 0; 110-119 1; <110 1.5) + wbc_10e9_l (≤12.0 0; >12.0 1.5) + albumin_g_l (>38 0; 33-38 1; <33 1.5) + magnesium_mmol_l (≥0.82 0; <0.82 1) + cisplatin_dose_mg (≤50 0; 51-75 2; 76-100 2.5; 101-125 3; 126-150 5; 151-200 7.5; >200 9.5); Gupta 2024 Figure 2 odds-ratio points; max 22.5; no creatinine; no platelets; low 0-5.5 / moderate 6-9.5 / high 10-15.5 / very_high ≥16",
      "max_score": 22.5,
      "score": 0,
      "wbc_10e9_l": 8.0,
      "albumin_g_l": 42.0,
      "risk_group": "low",
      "cisplatin_dose_mg": 50.0,
      "hemoglobin_g_l": 130.0,
      "magnesium_mmol_l": 0.9
    }
  ]
}

Response

Field Type Description
formula string cp_aki
formula_expression string Exact expression used
score number Gupta 2024 Figure 2 points 0-22.5 (half-integers allowed)
max_score number 22.5
risk_group string Figure 3 groups: low (0-5.5), moderate (6-9.5), high (10-15.5), very_high (≥16). A group, not a diagnosis or chemo order.
age integer Age in years used for Figure 2 age bands
hemoglobin_g_l number Hemoglobin in g/L used for Figure 2 bands (g/dL inputs converted ×10)
wbc_10e9_l number WBC in 10^9/L used for the ≤12.0 / >12.0 Figure 2 cut-off
albumin_g_l number Albumin in g/L used for Figure 2 bands (g/dL inputs converted ×10)
magnesium_mmol_l number Magnesium in mmol/L used for the ≥0.82 / <0.82 Figure 2 cut-off
cisplatin_dose_mg number First intravenous cisplatin dose in mg used for Figure 2 dose bands
components array Per-factor Figure 2 points
citation object Gupta et al. BMJ 2024 citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "components": [
    {
      "value": 40,
      "factor": "age",
      "points": 0,
      "present": false
    },
    {
      "factor": "hypertension",
      "points": 0,
      "present": false
    },
    {
      "factor": "diabetes",
      "points": 0,
      "present": false
    },
    {
      "factor": "current_or_former_smoker",
      "points": 0,
      "present": false
    },
    {
      "value": 130.0,
      "factor": "hemoglobin",
      "points": 0,
      "present": false
    },
    {
      "value": 8.0,
      "factor": "wbc",
      "points": 0,
      "present": false
    },
    {
      "value": 42.0,
      "factor": "albumin",
      "points": 0,
      "present": false
    },
    {
      "value": 0.9,
      "factor": "magnesium",
      "points": 0,
      "present": false
    },
    {
      "value": 50.0,
      "factor": "cisplatin_dose",
      "points": 0,
      "present": false
    }
  ],
  "age": 40,
  "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.",
  "citation": {
    "authors": "Gupta S, et al.",
    "doi": "10.1136/bmj-2023-077169",
    "id": "gupta-2024",
    "pmid": "38538012",
    "source": "BMJ. 2024;384:e077169",
    "title": "Derivation and external validation of a simple risk score for predicting severe acute kidney injury after intravenous cisplatin: cohort study"
  },
  "formula": "cp_aki",
  "formula_expression": "CP-AKI simple = age (≤45 0; 46-60 2.5; 61-70 3.5; >70 4.5) + hypertension 1 + diabetes 1 + current_or_former_smoker 1 + hemoglobin_g_l (≥120 0; 110-119 1; <110 1.5) + wbc_10e9_l (≤12.0 0; >12.0 1.5) + albumin_g_l (>38 0; 33-38 1; <33 1.5) + magnesium_mmol_l (≥0.82 0; <0.82 1) + cisplatin_dose_mg (≤50 0; 51-75 2; 76-100 2.5; 101-125 3; 126-150 5; 151-200 7.5; >200 9.5); Gupta 2024 Figure 2 odds-ratio points; max 22.5; no creatinine; no platelets; low 0-5.5 / moderate 6-9.5 / high 10-15.5 / very_high ≥16",
  "max_score": 22.5,
  "score": 0,
  "wbc_10e9_l": 8.0,
  "albumin_g_l": 42.0,
  "risk_group": "low",
  "cisplatin_dose_mg": 50.0,
  "hemoglobin_g_l": 130.0,
  "magnesium_mmol_l": 0.9
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_age age must be an integer from 18 to 120 Returned before settlement; you are not charged.
400 invalid_flag boolean clinical flags must be true or false Returned before settlement; you are not charged.
400 invalid_hemoglobin hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.
400 invalid_wbc wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.
400 invalid_albumin albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.
400 invalid_magnesium_mmol magnesium_mmol_l must be a number from 0.2 to 2.5 (Gupta 2024 CP-AKI serum magnesium mmol/L). Returned before settlement; you are not charged.
400 invalid_cisplatin_dose_mg cisplatin_dose_mg must be a number from 1 to 500 (Gupta 2024 CP-AKI first intravenous cisplatin dose mg). Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • AKIN — Apply Mehta 2007 Table 2 AKIN staging and return stage 0-3 as the worse of the creatinine and urine-output limbs, with initiated renal replacement therapy mapping to stage 3.
  • Mehran CIN risk score — Sum the Mehran 2004 eGFR model B integer score for contrast-induced nephropathy after PCI and return low (≤5), moderate (6–10), high (11–15), or very_high (≥16) with the development-set CIN percent.

Payment

Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /docs/mcp.

Guarantees

  • HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged. HTTP 402 never includes the tool JSON.
  • exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
  • HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
  • Execution is timeout-bounded and concurrency-capped.
  • Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.