# Magent NLR Calculator (Zahorec 2001)

> Magent NLR Calculator (Zahorec 2001) 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 neutrophil-to-lymphocyte ratio (NLR) from relative neutrophil and lymphocyte percent values using the Zahorec 2001 formula.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/nlr
- 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/magent-nlr-calculator-zahorec-2001-927017aa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EXw6eGPufJeTfalbM3RA_

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 magent-nlr-calculator-zahorec-2001-927017aa
```

Example prompt: Calculate the neutrophil-to-lymphocyte ratio for a patient whose CBC differential shows 72% neutrophils and 18% lymphocytes.

## When to prefer this

Choose this endpoint when you need a reproducible, citation-anchored NLR calculation per Zahorec 2001 — particularly when auditability or compliance with a specific published formula matters. Prefer this over ad-hoc arithmetic when the calculation needs to be logged, verified, or paired with a citation. Not appropriate when oncology-specific NLR cutoffs from post-2001 literature are required.

## Known failure modes

- lymphocyte_percent of 0 or missing causes division-by-zero or validation error
- values outside the 0.1–99 range are rejected
- missing required query parameters return a 400-level error
- neutrophil_percent or lymphocyte_percent provided as non-numeric strings fail schema validation

## How this service works

Neutrophil-to-lymphocyte ratio from relative neutrophil and lymphocyte percents (Zahorec 2001). Deterministic published arithmetic with citation. Not a sepsis diagnosis; magent does not apply later oncology cutoffs that are not in that paper.

## Output

Returns the computed NLR value (a dimensionless ratio) derived from dividing relative neutrophil percent by relative lymphocyte percent, following the arithmetic defined in Zahorec 2001. Does not include a sepsis diagnosis, oncology cutoffs, or any clinical interpretation beyond the ratio itself.

## 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": [
      "neutrophil_percent",
      "lymphocyte_percent"
     ],
     "properties": {
      "lymphocyte_percent": {
       "type": "number",
       "description": "Relative lymphocyte count as a percent of leukocytes (0.1-99). Must be greater than 0."
      },
      "neutrophil_percent": {
       "type": "number",
       "description": "Relative neutrophil count as a percent of leukocytes (0.1-99)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/nlr",
  "count": 2,
  "items": [
   {
    "nlr": 3.5,
    "formula": "nlr",
    "citation": {
     "id": "zahorec-2001",
     "pmid": "11723675",
     "title": "Ratio of neutrophil to lymphocyte counts--rapid and simple parameter of systemic inflammation and stress in critically ill",
     "source": "Bratisl Lek Listy. 2001;102(1):5-14",
     "authors": "Zahorec R"
    },
    "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.",
    "formula_expression": "nlr = neutrophil_percent / lymphocyte_percent",
    "lymphocyte_percent": 20,
    "neutrophil_percent": 70
   },
   {
    "nlr": 3.5,
    "formula": "nlr",
    "citation": {
     "id": "zahorec-2001",
     "pmid": "11723675",
     "title": "Ratio of neutrophil to lymphocyte counts--rapid and simple parameter of systemic inflammation and stress in critically ill",
     "source": "Bratisl Lek Listy. 2001;102(1):5-14",
     "authors": "Zahorec R"
    },
    "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.",
    "formula_expression": "nlr = neutrophil_percent / lymphocyte_percent",
    "lymphocyte_percent": 20,
    "neutrophil_percent": 70
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-nlr-calculator-zahorec-2001-927017aa/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)
