# Magent Friedewald LDL-C Calculator

> Magent Friedewald 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 Friedewald equation from total cholesterol, HDL, and triglycerides in either mg/dL or mmol/L

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/friedewald
- 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/magent-friedewald-ldl-c-calculator-b00cd863
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_StO0gxlwECM8pLaE_Lfic

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-friedewald-ldl-c-calculator-b00cd863
```

Example prompt: Calculate the estimated LDL cholesterol using the Friedewald equation for a patient with total cholesterol 210 mg/dL, HDL 55 mg/dL, and triglycerides 150 mg/dL.

## When to prefer this

Use this endpoint when you need a fast, deterministic Friedewald LDL-C estimate from a standard lipid panel without direct LDL measurement, especially when triglycerides are under 400 mg/dL. Prefer the Sampson 2020 sibling endpoint (also on api.magentlab.com) when triglycerides exceed 400 mg/dL or when more modern accuracy is required. This endpoint is ideal for automated clinical workflows, EHR integrations, and risk-stratification pipelines that need a reproducible, citable LDL calculation.

## Known failure modes

- Triglycerides above 400 mg/dL (or 4.5 mmol/L) are rejected — Friedewald equation is invalid above this threshold
- Mixing mg/dL and mmol/L inputs across parameters returns an error
- Missing any of the three required lipid values returns a validation error
- Values outside the accepted ranges (e.g. total cholesterol < 50 mg/dL) are rejected
- Providing both mg/dL and mmol/L versions of the same parameter causes a conflict error

## How this service works

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

## Output

Returns the estimated LDL-C value computed via the Friedewald equation (LDL = Total Cholesterol − HDL − Triglycerides/5 in mg/dL, or equivalent in mmol/L), along with the unit system used and a citation to the published equation. Not a clinical diagnosis or treatment recommendation.

## 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-400). Values above 400 are rejected; Friedewald VLDL is TG/5 for typical specimens only."
      },
      "triglycerides_mmol_l": {
       "type": "number",
       "description": "Triglycerides in mmol/L (0.1-4.5). Cap is the SI stand-in for 400 mg/dL (mg/dL = mmol/L * 88.57). SI LDL uses TG/2.2."
      },
      "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/friedewald",
  "count": 2,
  "items": [
   {
    "unit": "mg_dl",
    "formula": "friedewald",
    "citation": {
     "id": "friedewald-1972",
     "doi": "10.1093/clinchem/18.6.499",
     "title": "Estimation of the concentration of low-density lipoprotein cholesterol in plasma, without use of the preparative ultracentrifuge",
     "source": "Clin Chem. 1972;18(6):499-502",
     "authors": "Friedewald WT, Levy RI, Fredrickson DS"
    },
    "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": 120,
    "ldl_c_mmol_l": 3.1,
    "formula_expression": "ldl_c_mg_dl = total_cholesterol_mg_dl - hdl_mg_dl - (triglycerides_mg_dl / 5)",
    "triglycerides_mg_dl": 150,
    "total_cholesterol_mg_dl": 200
   },
   {
    "unit": "mg_dl",
    "formula": "friedewald",
    "citation": {
     "id": "friedewald-1972",
     "doi": "10.1093/clinchem/18.6.499",
     "title": "Estimation of the concentration of low-density lipoprotein cholesterol in plasma, without use of the preparative ultracentrifuge",
     "source": "Clin Chem. 1972;18(6):499-502",
     "authors": "Friedewald WT, Levy RI, Fredrickson DS"
    },
    "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": 120,
    "ldl_c_mmol_l": 3.1,
    "formula_expression": "ldl_c_mg_dl = total_cholesterol_mg_dl - hdl_mg_dl - (triglycerides_mg_dl / 5)",
    "triglycerides_mg_dl": 150,
    "total_cholesterol_mg_dl": 200
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-friedewald-ldl-c-calculator-b00cd863/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)
