# Sampson 2020 LDL-C Calculator

> Sampson 2020 LDL-C 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).

Estimates LDL cholesterol using the Sampson 2020 equation from total cholesterol, HDL, and triglycerides (valid up to 800 mg/dL triglycerides), in either mg/dL or mmol/L.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/sampson
- 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/sampson-2020-ldl-c-calculator-0014a867
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bLa_iu_C1ILE-YpvKl9mG

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 sampson-2020-ldl-c-calculator-0014a867
```

Example prompt: Can you estimate the LDL cholesterol using the Sampson 2020 equation for a patient with a total cholesterol of 210 mg/dL, HDL of 55 mg/dL, and triglycerides of 150 mg/dL?

## When to prefer this

Choose this endpoint when you need to estimate LDL-C from a standard lipid panel, especially when triglycerides are elevated (up to 800 mg/dL) where the Friedewald formula becomes unreliable. Prefer this over Friedewald-based calculators for patients with hypertriglyceridemia. Use when both mg/dL and mmol/L inputs are supported and you need a deterministic, citable published equation rather than a model-based estimate.

## Known failure modes

- Triglycerides exceed 800 mg/dL — request rejected as outside equation validity range
- Mixed unit systems provided (some mg/dL, some mmol/L) — validation error
- Missing required lipid value (total cholesterol, HDL, or triglycerides) — parameter error
- Out-of-range values (e.g. HDL below 5 mg/dL or total cholesterol below 50 mg/dL) — rejected with range error
- Payment not provided or insufficient — x402 payment required response

## How this service works

Sampson 2020 estimated LDL-C from total cholesterol, HDL, and triglycerides (valid through 800 mg/dL). One unit system (mg/dL or mmol/L). Deterministic published equation with citation; not Friedewald, not a diagnosis or statin order.

## Output

Returns the estimated LDL-C value computed via the Sampson 2020 published equation, valid for triglycerides up to 800 mg/dL. Output is in the same unit system as the input (mg/dL or mmol/L). Includes the calculated LDL-C figure with citation context; not a diagnostic recommendation or statin guidance.

## 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": [],
     "properties": {
      "hdl_mg_dl": {
       "type": "number",
       "description": "HDL cholesterol in mg/dL (5-150). Same unit system as the other lipids."
      },
      "hdl_mmol_l": {
       "type": "number",
       "description": "HDL cholesterol in mmol/L (0.1-3.9). Converted as mg/dL = mmol/L * 38.67."
      },
      "triglycerides_mg_dl": {
       "type": "number",
       "description": "Triglycerides in mg/dL (10-800). Values above 800 are rejected; Sampson 2020 is not applied above 800 mg/dL."
      },
      "triglycerides_mmol_l": {
       "type": "number",
       "description": "Triglycerides in mmol/L (0.1-9.03). Cap is the SI stand-in for 800 mg/dL (mg/dL = mmol/L * 88.57). The Sampson equation is applied in mg/dL."
      },
      "total_cholesterol_mg_dl": {
       "type": "number",
       "description": "Total cholesterol in mg/dL (50-500). Provide the full mg/dL set or the full mmol/L set, not mixed."
      },
      "total_cholesterol_mmol_l": {
       "type": "number",
       "description": "Total cholesterol in mmol/L (1.3-12.9). Converted as mg/dL = mmol/L * 38.67. Do not mix with mg/dL keys."
      }
     }
    }
   },
   "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/sampson",
  "count": 2,
  "items": [
   {
    "unit": "mg_dl",
    "formula": "sampson",
    "citation": {
     "id": "sampson-2020",
     "doi": "10.1001/jamacardiol.2020.0013",
     "title": "A new equation for calculation of low-density lipoprotein cholesterol in patients with normolipidemia and/or hypertriglyceridemia",
     "source": "JAMA Cardiol. 2020;5(5):540-548",
     "authors": "Sampson M, Ling C, Sun Q, et al."
    },
    "hdl_mg_dl": 50,
    "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.",
    "ldl_c_mg_dl": 123.4,
    "ldl_c_mmol_l": 3.2,
    "formula_expression": "LDL-C = TC/0.948 - HDL/0.971 - (TG/8.56 + TG*(TC-HDL)/2140 - TG^2/16100) - 9.44 (mg/dL)",
    "triglycerides_mg_dl": 150,
    "total_cholesterol_mg_dl": 200
   },
   {
    "unit": "mg_dl",
    "formula": "sampson",
    "citation": {
     "id": "sampson-2020",
     "doi": "10.1001/jamacardiol.2020.0013",
     "title": "A new equation for calculation of low-density lipoprotein cholesterol in patients with normolipidemia and/or hypertriglyceridemia",
     "source": "JAMA Cardiol. 2020;5(5):540-548",
     "authors": "Sampson M, Ling C, Sun Q, et al."
    },
    "hdl_mg_dl": 50,
    "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.",
    "ldl_c_mg_dl": 123.4,
    "ldl_c_mmol_l": 3.2,
    "formula_expression": "LDL-C = TC/0.948 - HDL/0.971 - (TG/8.56 + TG*(TC-HDL)/2140 - TG^2/16100) - 9.44 (mg/dL)",
    "triglycerides_mg_dl": 150,
    "total_cholesterol_mg_dl": 200
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sampson-2020-ldl-c-calculator-0014a867/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)
