# UCSF CAPRA Preoperative Prostate Cancer Risk Score Calculator

> UCSF CAPRA Preoperative Prostate Cancer Risk Score 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-15).

Computes the Cooperberg 2005 UCSF CAPRA preoperative score (0–10) and maps it to a 5-year recurrence-free survival band for prostate cancer risk stratification.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/capra
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ucsf-capra-preoperative-prostate-cancer-risk-score-calculator-84295741
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4DHBLx2yXDdhjCdqbx4Za

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 ucsf-capra-preoperative-prostate-cancer-risk-score-calculator-84295741
```

Example prompt: Calculate the UCSF CAPRA preoperative score for a 58-year-old patient with a PSA of 8.5 ng/mL, Gleason primary 3, Gleason secondary 4, clinical stage T2, and 40 percent positive biopsies.

## When to prefer this

Use this endpoint when you need the Cooperberg 2005 UCSF CAPRA preoperative score specifically — not D'Amico risk groups, not Kattan nomograms, and not CAPRA-S (which is post-surgical). Ideal when all six required preoperative variables (age, PSA, Gleason primary, Gleason secondary, clinical T stage, percent positive biopsies) are already caller-assigned and you want a fast, deterministic 0–10 score plus the Table 4 5-year RFS band for clinical documentation or risk communication.

## Known failure modes

- PSA below 2.1 ng/mL is invalid per the paper's exclusion criteria — returns an error
- T stage other than t1, t2, or t3a is invalid (no other stages supported)
- Gleason primary or secondary outside integer range 1–5 returns a validation error
- Percent positive biopsies outside 0–100 returns an error
- Missing any required query parameter results in a 400-level error
- Age outside 18–120 range is rejected

## How this service works

Cooperberg 2005 UCSF CAPRA preoperative score (Table 1). Caller-assigned PSA (>=2.1-6 0, >6-10 1, >10-20 2, >20-30 3, >30 4), Gleason 1-3/1-3 0, 1-3/4-5 1, primary 4-5 3, clinical T t1/t2 0 or t3a 1, percent positive biopsies <34 0 or >=34 1, age <50 0 or >=50 1. Score 0-10. Table 4 bands 0_1, 2, 3, 4, 5, 6, ge_7 with 5-year RFS 85/81/66/59/60/34/8. Not Kattan. Not D'Amico. Not CAPRA-S. magent does not assay PSA or read biopsies. Not a diagnosis. Not a medical device.

## Output

Returns a CAPRA integer score from 0 to 10, the corresponding Table 4 risk band (e.g. '0_1', '2', 'ge_7'), and the associated 5-year recurrence-free survival percentage (e.g. 85%, 8%) as defined by Cooperberg 2005.

## 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",
      "psa_ng_ml",
      "gleason_primary",
      "gleason_secondary",
      "t_stage",
      "percent_positive_biopsies"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (18-120, Params.age). Cooperberg 2005 Table 1: <50 scores 0; >=50 scores 1."
      },
      "t_stage": {
       "enum": [
        "t1",
        "t2",
        "t3a"
       ],
       "type": "string",
       "description": "Clinical T as assigned by the caller (Cooperberg 2005 Table 1). t1 or t2 scores 0; t3a scores 1. Other stages are invalid. Not CAPRA-S pathologic T. magent does not assign TNM."
      },
      "psa_ng_ml": {
       "type": "number",
       "description": "Preoperative PSA in ng/mL as assigned by the caller (2.1-500). Cooperberg 2005 Table 1: >=2.1 and <=6.0 scores 0; >6.0 and <=10.0 scores 1; >10.0 and <=20.0 scores 2; >20.0 and <=30.0 scores 3; >30 scores 4. PSA <2.1 is invalid (paper excluded PSA <2). magent does not assay PSA."
      },
      "gleason_primary": {
       "type": "integer",
       "description": "Primary Gleason pattern 1-5 as assigned by the caller (Cooperberg 2005 Table 1). Integer 1-5 only. Combined with gleason_secondary: 1-3/1-3 scores 0; 1-3/4-5 scores 1; primary 4-5 scores 3. magent does not read biopsies."
      },
      "gleason_secondary": {
       "type": "integer",
       "description": "Secondary Gleason pattern 1-5 as assigned by the caller (Cooperberg 2005 Table 1). Integer 1-5 only. Combined with gleason_primary as above. magent does not read biopsies."
      },
      "percent_positive_biopsies": {
       "type": "number",
       "description": "Percent of biopsy cores positive (0-100) as assigned by the caller (Cooperberg 2005 Table 1). <34 scores 0; >=34 scores 1. magent does not read biopsies."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "requir
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ucsf-capra-preoperative-prostate-cancer-risk-score-calculator-84295741/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)
