# VACS Index 2.0 Calculator (Tate 2019)

> VACS Index 2.0 Calculator (Tate 2019) 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 Veterans Aging Cohort Study (VACS) Index 2.0 mortality risk score for HIV-positive patients using 10 clinical parameters

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/vacs_2
- 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/vacs-index-2-0-calculator-tate-2019-4ba88aa6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7dPnm97vI1mZ-twETYMH2

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 vacs-index-2-0-calculator-tate-2019-4ba88aa6
```

Example prompt: Calculate the VACS Index 2.0 score for a 58-year-old HIV-positive patient with a CD4 count of 350 cells/mm³, HIV RNA of 200 copies/mL, hemoglobin of 13.5 g/dL, FIB-4 of 1.8, eGFR of 72 mL/min/1.73m², no hepatitis C, albumin of 3.9 g/dL, WBC of 5.2 × 10⁹/L, and BMI of 27 kg/m².

## When to prefer this

Use this endpoint when you have already assembled all 10 VACS 2.0 input variables for an HIV-positive adult and need a fast, reproducible implementation of the Tate 2019 polynomial scoring algorithm. Prefer this over manual calculation to avoid polynomial arithmetic errors and to ensure correct censoring of out-of-range laboratory values. Do not use if you need to derive FIB-4 from AST/ALT/platelets or eGFR from creatinine — those must be pre-computed by the caller.

## Known failure modes

- Missing required query parameter returns an error — all 10 parameters (age, cd4_cells_mm3, hiv_rna_copies_ml, hemoglobin_g_dl, fib4, egfr_ml_min_1_73m2, hepatitis_c, albumin_g_dl, wbc_10e9_l, bmi_kg_m2) must be provided
- Out-of-range values are not rejected but are silently censored to the Appendix Table 1 bounds (e.g., age clamped to 30–75, CD4 clamped to 0–1000)
- Caller must pre-compute FIB-4 and eGFR; the endpoint does not derive them from sub-components
- hepatitis_c must be a boolean; passing a string like 'yes' may cause a parse error
- Payment failure (402) if x402 payment header is not supplied or USDC balance is insufficient

## How this service works

Tate 2019 VACS Index 2.0 (not 1.0): age, CD4, HIV-1 RNA, hemoglobin, caller-assigned FIB-4 and eGFR, hepatitis C, albumin, WBC, and BMI. Appendix Table 1 polynomials. Score scaled so the median profile is 44. Not a 5-year percent (no published S0). magent does not compute FIB-4 or eGFR and does not assign HIV status.

## Output

Returns a numeric VACS Index 2.0 score scaled so that the median clinical profile equals 44, derived from Appendix Table 1 polynomial transformations applied to the 10 supplied laboratory and demographic parameters. Higher scores indicate greater mortality risk. The score is not a 5-year survival percentage (no published baseline survival S0 is incorporated).

## 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",
      "cd4_cells_mm3",
      "hiv_rna_copies_ml",
      "hemoglobin_g_dl",
      "fib4",
      "egfr_ml_min_1_73m2",
      "hepatitis_c",
      "albumin_g_dl",
      "wbc_10e9_l",
      "bmi_kg_m2"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (integer 18-120). Tate 2019 Appendix Table 1 censors age at 30-75 and uses the cubic polynomial of (age-50)/5. magent does not assign age."
      },
      "fib4": {
       "type": "number",
       "description": "Caller-assigned FIB-4 (0.1-20). Appendix Table 1 censors at 0.5-7.5. magent does not recompute FIB-4."
      },
      "bmi_kg_m2": {
       "type": "number",
       "description": "Body mass index in kg/m² (10-60). Appendix Table 1 censors at 15-35 and centers at (BMI-25). magent does not compute BMI from height and weight."
      },
      "wbc_10e9_l": {
       "type": "number",
       "description": "White blood count in 10^9/L (0.5-50), equal to k/µL. Appendix Table 1 censors at 2.5-11 and centers at (WBC-5.5). magent does not assay WBC."
      },
      "hepatitis_c": {
       "type": "boolean",
       "description": "Caller-assigned hepatitis C co-infection (Tate 2019). true adds 0.342 to the linear predictor. magent does not diagnose hepatitis C."
      },
      "albumin_g_dl": {
       "type": "number",
       "description": "Serum albumin in g/dL (1-6.5). Appendix Table 1 censors at 2-5 and centers at (albumin-4). magent does not assay albumin."
      },
      "cd4_cells_mm3": {
       "type": "integer",
       "description": "CD4 count in cells/mm³ (integer 1-2000). Appendix Table 1 censors at 0-1000 and uses ln(max(1000-CD4, 1)). magent does not assay CD4."
      },
      "hemoglobin_g_dl": {
       "type": "number",
       "description": "Hemoglobin in g/dL (3-22). Appendix Table 1 censors at 9-16 and centers at (hemoglobin-14). magent does not assay hemoglobin."

… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/vacs-index-2-0-calculator-tate-2019-4ba88aa6/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)
