# Light's Criteria Pleural Fluid Calculator

> Light's Criteria Pleural Fluid 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).

Applies Light's 1972 criteria to classify pleural fluid as exudate or transudate using protein and LDH ratios against a caller-supplied LDH upper limit of normal

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/lights
- 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/light-s-criteria-pleural-fluid-calculator-b4364523
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_osWqbBIwVABle1xzA_ItD

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 light-s-criteria-pleural-fluid-calculator-b4364523
```

Example prompt: Apply Light's criteria to this pleural tap: pleural protein 4.2 g/dL, serum protein 6.8 g/dL, pleural LDH 320 U/L, serum LDH 210 U/L, and our lab's LDH upper limit of normal is 240 U/L — is it an exudate?

## When to prefer this

Use this endpoint when you need a strictly correct, citeable implementation of Light's 1972 original three-criterion rule — specifically when you must supply the laboratory's own LDH ULN rather than assuming 200 U/L. Prefer this over manual calculation to avoid arithmetic errors and to get structured, auditable output for clinical documentation or decision support pipelines. Do not use if you need Heffner's abbreviated criteria or a diagnosis of pleural disease cause.

## Known failure modes

- Missing required parameters (pleural_protein_g_dl, serum_protein_g_dl, pleural_ldh_u_l, serum_ldh_u_l, ldh_uln_u_l) returns validation error
- Values outside allowed ranges (e.g. LDH ULN outside 50–2000 U/L) return 400-level error
- Payment failure or insufficient USDC balance returns 402 Payment Required
- Passing 0 for any parameter may cause division-by-zero or range rejection

## How this service works

Light 1972 pleural fluid criteria: exudate if protein ratio > 0.5, LDH ratio > 0.6, or pleural LDH > two-thirds the laboratory LDH ULN. ULN is required; magent does not assume 200 U/L. Strictly greater than those cutoffs. Deterministic published arithmetic with citation; not a diagnosis of cause, not Heffner's abbreviated criteria, and not a chest x-ray interpretation.

## Output

Returns a deterministic classification of the pleural fluid as exudate or transudate based on Light's three criteria: (1) pleural-to-serum protein ratio > 0.5, (2) pleural-to-serum LDH ratio > 0.6, (3) pleural LDH > two-thirds the caller-supplied LDH ULN. Output includes individual ratio values, which criteria are met, and the overall classification. Not a diagnosis of cause and not Heffner's abbreviated criteria.

## 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": [
      "pleural_protein_g_dl",
      "serum_protein_g_dl",
      "pleural_ldh_u_l",
      "serum_ldh_u_l",
      "ldh_uln_u_l"
     ],
     "properties": {
      "ldh_uln_u_l": {
       "type": "number",
       "description": "Laboratory LDH upper limit of normal in U/L (50-2000). Required; magent does not assume 200."
      },
      "serum_ldh_u_l": {
       "type": "number",
       "description": "Serum LDH in U/L (1-10000)."
      },
      "pleural_ldh_u_l": {
       "type": "number",
       "description": "Pleural fluid LDH in U/L (1-10000)."
      },
      "serum_protein_g_dl": {
       "type": "number",
       "description": "Serum protein in g/dL (0.1-20)."
      },
      "pleural_protein_g_dl": {
       "type": "number",
       "description": "Pleural fluid protein in g/dL (0.1-20)."
      }
     }
    }
   },
   "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/lights",
  "count": 2,
  "items": [
   {
    "exudate": false,
    "formula": "lights",
    "citation": {
     "id": "light-1972",
     "doi": "10.7326/0003-4819-77-4-507",
     "title": "Pleural effusions: the diagnostic separation of transudates and exudates",
     "source": "Ann Intern Med. 1972;77(4):507-513",
     "authors": "Light RW, Macgregor MI, Luchsinger PC, Ball WC Jr"
    },
    "criteria": [
     {
      "met": false,
      "value": 0.5,
      "factor": "protein_ratio_gt_0_5"
     },
     {
      "met": false,
      "value": 0.5,
      "factor": "ldh_ratio_gt_0_6"
     },
     {
      "met": false,
      "value": 100,
      "factor": "pleural_ldh_gt_two_thirds_uln"
     }
    ],
    "ldh_ratio": 0.5,
    "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.",
    "protein_ratio": 0.5,
    "pleural_ldh_u_l": 100,
    "formula_expression": "exudate if pleural_protein_g_dl / serum_protein_g_dl > 0.5 or pleural_ldh_u_l / serum_ldh_u_l > 0.6 or pleural_ldh_u_l > (2/3) * ldh_uln_u_l",
    "ldh_two_thirds_uln": 133.3
   },
   {
    "exudate": false,
    "formula": "lights",
    "citation": {
     "id": "light-1972",
     "doi": "10.7326/0003-4819-77-4-507",
     "title": "Pleural effusions: the diagnostic separation of transudates and exudates",
     "source": "Ann Intern Med. 1972;77(4):507-513",
     "authors": "Light RW, Macgregor MI, Luchsinger PC, Ball WC Jr"
    },
    "criteria": [
     {
      "met": false,
      "value": 0.5,
      "factor": "protein_ratio_gt_0_5"
     },
     {
      "met": false,
      "value": 0.5,
      "factor": "ldh_ratio_gt_0_6"
     },
     {
      "met": false,
      "value": 100,
      "factor": "pleural_ldh_gt_two_thirds_uln"
     }
    ],
    "ldh_ratio": 0.5,
    "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.",
    "protein_ratio": 0.5,
    "pleural_ldh_u_l": 100,
    "formula_expression": "exudate if pleural_protein_g_dl / serum_protein_g_dl > 0.5 or pleural_ldh_u_l / serum_ldh_u_l > 0.6 or pleural_ldh_u_l > (2/3) * ldh_uln_u_l",
    "ldh_two_thirds_uln": 133.3
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/light-s-criteria-pleural-fluid-calculator-b4364523/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)
