# Absolute Lymphocyte Count (ALC) Calculator — Shapiro 1998

> Absolute Lymphocyte Count (ALC) Calculator — Shapiro 1998 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).

Calculates absolute lymphocyte count from WBC and lymphocyte percentage, and predicts CD4 count category using the Shapiro 1998 rule (ALC <1000 → CD4 <200; ALC ≥2000 → CD4 ≥200).

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/alc
- 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/absolute-lymphocyte-count-alc-calculator-shapiro-1998-0f133bed
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VHmfBR8E5A2c5sivVwj43

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 absolute-lymphocyte-count-alc-calculator-shapiro-1998-0f133bed
```

Example prompt: Calculate the absolute lymphocyte count for a patient with a WBC of 4.5 k/µL and 28% lymphocytes, and tell me what CD4 category Shapiro 1998 predicts.

## When to prefer this

Use this endpoint when you need a fast, deterministic ALC calculation and CD4 category prediction based on the peer-reviewed Shapiro 1998 formula, especially in workflows processing CBC results where CD4 testing is unavailable. Prefer it over manual arithmetic or general-purpose calculators when you need a citable, published clinical decision rule with clear ALC thresholds.

## Known failure modes

- Missing required lymphocyte_percent parameter returns a validation error
- WBC value out of range (e.g. wbc_ul not between 10–500000) may return an error or unexpected result
- Neither wbc_ul nor wbc_k_ul provided results in a missing-parameter error
- lymphocyte_percent out of range (0.1–99) may cause a validation error
- x402 payment failure if insufficient USDC balance prevents the call from completing

## How this service works

Absolute lymphocyte count from WBC and lymphocyte percent (Shapiro 1998). ALC < 1000 cells/mm3 predicts CD4 < 200; ALC >= 2000 predicts CD4 >= 200. Deterministic published arithmetic with citation. Not a CD4 measurement or HIV diagnosis. magent does not measure the CBC.

## Output

Returns the computed absolute lymphocyte count (ALC) in cells/mm³, along with the Shapiro 1998 CD4 prediction category (CD4 <200, indeterminate, or CD4 ≥200) based on ALC thresholds of 1000 and 2000 cells/mm³.

## 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": [
      "lymphocyte_percent"
     ],
     "properties": {
      "wbc_ul": {
       "type": "number",
       "description": "WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000."
      },
      "wbc_k_ul": {
       "type": "number",
       "description": "WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500."
      },
      "lymphocyte_percent": {
       "type": "number",
       "description": "Lymphocytes as a percent of WBC (0.1-99). Shapiro 1998 uses the CBC lymphocyte percentage."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/absolute-lymphocyte-count-alc-calculator-shapiro-1998-0f133bed/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)
