MAGENT

Kidney · LIVE

PREVAIL mCRPC survival model

PREVAIL

Compute the Armstrong 2018 PREVAIL multivariable Cox linear predictor for overall survival in chemotherapy-naïve men with metastatic castration-resistant prostate cancer from albumin, ALP versus ULN, bone-metastasis count, hemoglobin, LDH versus ULN, NLR, pain score, liver metastases, PSA, time from diagnosis, and enzalutamide versus placebo.

LIVE $0.005 USDC GET /api/calc/prevail

Markdown: /docs/prevail.md · Canonical: https://magentlab.com/docs/prevail

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

What it computes

Compute the Armstrong 2018 PREVAIL multivariable Cox linear predictor for overall survival in chemotherapy-naïve men with metastatic castration-resistant prostate cancer from albumin, ALP versus ULN, bone-metastasis count, hemoglobin, LDH versus ULN, NLR, pain score, liver metastases, PSA, time from diagnosis, and enzalutamide versus placebo.

When to use

When an agent already has those eleven caller-assigned PREVAIL Table 1 values and needs the published linear predictor, not a 1-/2-/3-year OS percent, not CAPRA, and not D'Amico groups. Not a treatment or dose order.

When not to use

  • Not a medical device. Not a dose, treatment, or sequencing order. magent does not assay labs, assign pain scores, or read bone scans or other imaging.
  • Chemotherapy-naïve mCRPC from the PREVAIL trial (enzalutamide versus placebo). Not hormone-sensitive disease and not post-chemotherapy CRPC. Not a nomogram total-points conversion.
  • Armstrong 2018 Table 1 prints multivariable HRs. magent uses β = ln(HR). The paper's 1-, 2-, and 3-year OS percents sit on a nomogram (Figure 1 / supplementary Table S4) without a printed baseline survival S0 in the main text, so this tool emits the linear predictor only.
  • Low, intermediate, and high groups in that paper were tertiles of the training-set risk score. Those tertile cut-points were not printed as numbers and are not invented here.
  • ALP below ULN, LDH below ULN, NLR <2.5, bone metastases <10, pain 0-1, and no liver metastases are caller-assigned flags. magent does not apply an institutional ULN or count metastases.

Formula

lp = ln(0.71)*albumin_g_dl + ln(0.79)*alp_below_uln + ln(0.68)*bone_mets_lt_10 + ln(0.85)*hemoglobin_g_dl + ln(0.67)*ldh_below_uln + ln(0.69)*nlr_lt_2_5 + ln(0.77)*pain_0_to_1 + ln(0.49)*no_liver_metastases + ln(1.23)*ln(psa_ng_ml) + ln(0.997)*months_since_diagnosis + ln(0.68)*treatment_enzalutamide; Armstrong 2018 Table 1 multivariable HRs, β = ln(HR); A versus B codes A as 1; booleans contribute β when true else 0; no printed S0; not 1-/2-/3-year OS percents; not nomogram points; training-set tertiles unpublished as numeric cutoffs; chemotherapy-naïve mCRPC PREVAIL; magent does not read bone scans

Citation

Title
Development and validation of a prognostic model for overall survival in chemotherapy-naïve men with metastatic castration-resistant prostate cancer
Authors
Armstrong AJ, Lin P, Higano CS, et al.
Source
Ann Oncol. 2018;29(11):2200-2209
DOI
10.1093/annonc/mdy406

Worked example

Favorable PREVAIL profile, albumin 4.0, hemoglobin 13.0, PSA 20, 60 months, enzalutamide

Given: albumin_g_dl=4.0alp_below_uln=truebone_mets_lt_10=truehemoglobin_g_dl=13.0ldh_below_uln=truemonths_since_diagnosis=60nlr_lt_2_5=trueno_liver_metastases=truepain_0_to_1=truepsa_ng_ml=20.0treatment_enzalutamide=true

  1. all protective flags true; albumin 4.0 g/dL; hemoglobin 13.0 g/dL; PSA 20.0 ng/mL; months 60; enzalutamide true
  2. β = ln(HR) from Armstrong 2018 Table 1; booleans contribute β when true
  3. lp = ln(0.71)*4.0 + ln(0.79) + ln(0.68) + ln(0.85)*13.0 + ln(0.67) + ln(0.69) + ln(0.77) + ln(0.49) + ln(1.23)*ln(20.0) + ln(0.997)*60 + ln(0.68)
  4. linear_predictor = risk_score, 6 decimals; not a survival percent

Same profile with any liver metastases

Given: albumin_g_dl=4.0alp_below_uln=truebone_mets_lt_10=truehemoglobin_g_dl=13.0ldh_below_uln=truemonths_since_diagnosis=60nlr_lt_2_5=trueno_liver_metastases=falsepain_0_to_1=truepsa_ng_ml=20.0treatment_enzalutamide=true

  1. same labs and flags as the favorable example except no_liver_metastases false (drops ln(0.49))
  2. linear_predictor is the Table 1 LP, 6 decimals; not a tertile band

Also searched as

  • PREVAIL survival model
  • Armstrong 2018 mCRPC OS
  • chemotherapy-naïve mCRPC OS
  • PREVAIL Cox model
  • enzalutamide PREVAIL OS
  • mCRPC overall survival model

Try

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

/api/calc/prevail?albumin_g_dl=4.0&alp_below_uln=true&bone_mets_lt_10=true&hemoglobin_g_dl=13.0&ldh_below_uln=true&nlr_lt_2_5=true&pain_0_to_1=true&no_liver_metastases=true&psa_ng_ml=20.0&months_since_diagnosis=60&treatment_enzalutamide=true

Full URL: https://api.magentlab.com/api/calc/prevail?albumin_g_dl=4.0&alp_below_uln=true&bone_mets_lt_10=true&hemoglobin_g_dl=13.0&ldh_below_uln=true&nlr_lt_2_5=true&pain_0_to_1=true&no_liver_metastases=true&psa_ng_ml=20.0&months_since_diagnosis=60&treatment_enzalutamide=true

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/prevail?albumin_g_dl=4.0&alp_below_uln=true&bone_mets_lt_10=true&hemoglobin_g_dl=13.0&ldh_below_uln=true&nlr_lt_2_5=true&pain_0_to_1=true&no_liver_metastases=true&psa_ng_ml=20.0&months_since_diagnosis=60&treatment_enzalutamide=true"

Parameters

Name Type Required Description
albumin_g_dl number required Serum albumin in g/dL (1.0-6.5). Armstrong 2018 Table 1: continuous, HR 0.71 per g/dL. magent does not assay albumin.
alp_below_uln boolean required Alkaline phosphatase below the institutional ULN as assigned by the caller (true or false). Table 1: true (<ULN versus ≥ULN) has HR 0.79. magent does not assay ALP or apply ULN.
bone_mets_lt_10 boolean required Fewer than 10 bone metastases as assigned by the caller (true or false). Table 1: true (<10 versus ≥10) has HR 0.68. magent does not read bone scans.
hemoglobin_g_dl number required Hemoglobin in g/dL (3.0-22.0). Table 1: continuous, HR 0.85 per g/dL. magent does not assay hemoglobin.
ldh_below_uln boolean required Lactate dehydrogenase below the institutional ULN as assigned by the caller (true or false). Table 1: true (<ULN versus ≥1×ULN) has HR 0.67. magent does not assay LDH or apply ULN.
nlr_lt_2_5 boolean required Neutrophil-to-lymphocyte ratio <2.5 as assigned by the caller (true or false). Table 1: true (<2.5 versus ≥2.5) has HR 0.69. magent does not compute NLR from counts.
pain_0_to_1 boolean required Pain score 0-1 versus ≥2 on the paper's linear scale, as assigned by the caller (true or false). Table 1: true (0-1 versus ≥2) has HR 0.77. magent does not assign pain scores.
no_liver_metastases boolean required No liver metastases as assigned by the caller (true or false). Table 1 pattern of spread: true (no liver metastases versus any liver metastases) has HR 0.49. magent does not read imaging.
psa_ng_ml number required Baseline PSA in ng/mL (0.1-10000). Table 1: continuous log_e PSA, HR 1.23 per ln(ng/mL). magent does not assay PSA.
months_since_diagnosis number required Time from diagnosis to randomization in months (0-720). Table 1: continuous, HR 0.997 per month. magent does not date the interval.
treatment_enzalutamide boolean required true if the PREVAIL treatment term is enzalutamide, false if placebo. Table 1: true (enzalutamide versus placebo) has HR 0.68. Not a dose or treatment order.

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/prevail 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": [
    {
      "albumin_g_dl": "4.0",
      "alp_below_uln": "true",
      "bone_mets_lt_10": "true",
      "hemoglobin_g_dl": "13.0",
      "ldh_below_uln": "true",
      "months_since_diagnosis": "60",
      "nlr_lt_2_5": "true",
      "no_liver_metastases": "true",
      "pain_0_to_1": "true",
      "psa_ng_ml": "20.0",
      "treatment_enzalutamide": "true"
    },
    {
      "albumin_g_dl": "4.0",
      "alp_below_uln": "true",
      "bone_mets_lt_10": "true",
      "hemoglobin_g_dl": "13.0",
      "ldh_below_uln": "true",
      "months_since_diagnosis": "60",
      "nlr_lt_2_5": "true",
      "no_liver_metastases": "true",
      "pain_0_to_1": "true",
      "psa_ng_ml": "20.0",
      "treatment_enzalutamide": "true"
    }
  ]
}

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/prevail",
  "items": [
    {
      "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": "Armstrong AJ, Lin P, Higano CS, et al.",
        "doi": "10.1093/annonc/mdy406",
        "id": "armstrong-2018-prevail",
        "pmid": "30202945",
        "source": "Ann Oncol. 2018;29(11):2200-2209",
        "title": "Development and validation of a prognostic model for overall survival in chemotherapy-naïve men with metastatic castration-resistant prostate cancer"
      },
      "formula": "prevail",
      "formula_expression": "lp = ln(0.71)*albumin_g_dl + ln(0.79)*alp_below_uln + ln(0.68)*bone_mets_lt_10 + ln(0.85)*hemoglobin_g_dl + ln(0.67)*ldh_below_uln + ln(0.69)*nlr_lt_2_5 + ln(0.77)*pain_0_to_1 + ln(0.49)*no_liver_metastases + ln(1.23)*ln(psa_ng_ml) + ln(0.997)*months_since_diagnosis + ln(0.68)*treatment_enzalutamide; Armstrong 2018 Table 1 multivariable HRs, β = ln(HR); A versus B codes A as 1; booleans contribute β when true else 0; no printed S0; not 1-/2-/3-year OS percents; not nomogram points; training-set tertiles unpublished as numeric cutoffs; chemotherapy-naïve mCRPC PREVAIL; magent does not read bone scans",
      "albumin_g_dl": 4.0,
      "hemoglobin_g_dl": 13.0,
      "linear_predictor": -5.796122,
      "psa_ng_ml": 20.0,
      "alp_below_uln": true,
      "bone_mets_lt_10": true,
      "ldh_below_uln": true,
      "months_since_diagnosis": 60.0,
      "nlr_lt_2_5": true,
      "no_liver_metastases": true,
      "pain_0_to_1": true,
      "risk_score": -5.796122,
      "treatment_enzalutamide": true
    },
    {
      "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": "Armstrong AJ, Lin P, Higano CS, et al.",
        "doi": "10.1093/annonc/mdy406",
        "id": "armstrong-2018-prevail",
        "pmid": "30202945",
        "source": "Ann Oncol. 2018;29(11):2200-2209",
        "title": "Development and validation of a prognostic model for overall survival in chemotherapy-naïve men with metastatic castration-resistant prostate cancer"
      },
      "formula": "prevail",
      "formula_expression": "lp = ln(0.71)*albumin_g_dl + ln(0.79)*alp_below_uln + ln(0.68)*bone_mets_lt_10 + ln(0.85)*hemoglobin_g_dl + ln(0.67)*ldh_below_uln + ln(0.69)*nlr_lt_2_5 + ln(0.77)*pain_0_to_1 + ln(0.49)*no_liver_metastases + ln(1.23)*ln(psa_ng_ml) + ln(0.997)*months_since_diagnosis + ln(0.68)*treatment_enzalutamide; Armstrong 2018 Table 1 multivariable HRs, β = ln(HR); A versus B codes A as 1; booleans contribute β when true else 0; no printed S0; not 1-/2-/3-year OS percents; not nomogram points; training-set tertiles unpublished as numeric cutoffs; chemotherapy-naïve mCRPC PREVAIL; magent does not read bone scans",
      "albumin_g_dl": 4.0,
      "hemoglobin_g_dl": 13.0,
      "linear_predictor": -5.796122,
      "psa_ng_ml": 20.0,
      "alp_below_uln": true,
      "bone_mets_lt_10": true,
      "ldh_below_uln": true,
      "months_since_diagnosis": 60.0,
      "nlr_lt_2_5": true,
      "no_liver_metastases": true,
      "pain_0_to_1": true,
      "risk_score": -5.796122,
      "treatment_enzalutamide": true
    }
  ]
}

Response

Field Type Description
formula string prevail
formula_expression string Armstrong 2018 Table 1 Cox linear predictor from ln(HR)
albumin_g_dl number Input albumin g/dL
alp_below_uln boolean Caller-assigned ALP below ULN
bone_mets_lt_10 boolean Caller-assigned bone metastases <10
hemoglobin_g_dl number Input hemoglobin g/dL
ldh_below_uln boolean Caller-assigned LDH below ULN
nlr_lt_2_5 boolean Caller-assigned NLR <2.5
pain_0_to_1 boolean Caller-assigned pain score 0-1
no_liver_metastases boolean Caller-assigned no liver metastases
psa_ng_ml number Input PSA ng/mL
months_since_diagnosis number Input months from diagnosis to randomization
treatment_enzalutamide boolean Caller-assigned enzalutamide versus placebo
linear_predictor number Unrounded Armstrong 2018 Table 1 Cox linear predictor, 6 decimals. Not a survival percent.
risk_score number Same value as linear_predictor (unscaled Cox LP). Not a tertile band; those cut-points were not printed.
citation object Armstrong 2018 PREVAIL citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "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": "Armstrong AJ, Lin P, Higano CS, et al.",
    "doi": "10.1093/annonc/mdy406",
    "id": "armstrong-2018-prevail",
    "pmid": "30202945",
    "source": "Ann Oncol. 2018;29(11):2200-2209",
    "title": "Development and validation of a prognostic model for overall survival in chemotherapy-naïve men with metastatic castration-resistant prostate cancer"
  },
  "formula": "prevail",
  "formula_expression": "lp = ln(0.71)*albumin_g_dl + ln(0.79)*alp_below_uln + ln(0.68)*bone_mets_lt_10 + ln(0.85)*hemoglobin_g_dl + ln(0.67)*ldh_below_uln + ln(0.69)*nlr_lt_2_5 + ln(0.77)*pain_0_to_1 + ln(0.49)*no_liver_metastases + ln(1.23)*ln(psa_ng_ml) + ln(0.997)*months_since_diagnosis + ln(0.68)*treatment_enzalutamide; Armstrong 2018 Table 1 multivariable HRs, β = ln(HR); A versus B codes A as 1; booleans contribute β when true else 0; no printed S0; not 1-/2-/3-year OS percents; not nomogram points; training-set tertiles unpublished as numeric cutoffs; chemotherapy-naïve mCRPC PREVAIL; magent does not read bone scans",
  "albumin_g_dl": 4.0,
  "hemoglobin_g_dl": 13.0,
  "linear_predictor": -5.796122,
  "psa_ng_ml": 20.0,
  "alp_below_uln": true,
  "bone_mets_lt_10": true,
  "ldh_below_uln": true,
  "months_since_diagnosis": 60.0,
  "nlr_lt_2_5": true,
  "no_liver_metastases": true,
  "pain_0_to_1": true,
  "risk_score": -5.796122,
  "treatment_enzalutamide": true
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_prevail PREVAIL survival-model inputs must match Armstrong 2018 albumin, ALP vs ULN, hemoglobin, LDH vs ULN, NLR, bone metastases, pain, liver metastases, PSA, time from diagnosis, and enzalutamide vs placebo. 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

  • CAPRA — Apply Cooperberg 2005 Table 1 CAPRA points from caller-assigned preoperative PSA, Gleason primary/secondary, clinical T (t1/t2/t3a), percent positive biopsies, and age, and return the 0-10 score, Table 4 Kaplan-Meier band, and Table 4 5-year recurrence-free survival point estimate. Not a diagnosis.
  • D'Amico — Apply the D'Amico 1998 JAMA clinically localized three-group rule to caller-assigned clinical T (t1c, t2a, t2b, t2c), Gleason sum 2-10, and PSA ng/mL, and return risk low, intermediate, or high. Does not assay PSA, assign Gleason, or compute CAPRA or NCCN groups.

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.