{
  "x402Version": 2,
  "id": 39551,
  "slug": "39551",
  "resource": "https://api.magentlab.com/api/calc/sampson",
  "description": "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.",
  "type": "http",
  "serviceName": "magent",
  "resourceType": "Agent Service",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x836Be278f1739fB4308091cD1852F7971Bc19Ee2",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 600
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "iconUrl": "https://api.magentlab.com/favicon.ico",
        "input": {
          "body": {
            "items": [
              {
                "hdl_mg_dl": 50,
                "hdl_mmol_l": 1,
                "total_cholesterol_mg_dl": 200,
                "total_cholesterol_mmol_l": 5,
                "triglycerides_mg_dl": 150,
                "triglycerides_mmol_l": 2.2
              },
              {
                "hdl_mg_dl": 50,
                "hdl_mmol_l": 1,
                "total_cholesterol_mg_dl": 200,
                "total_cholesterol_mmol_l": 5,
                "triglycerides_mg_dl": 150,
                "triglycerides_mmol_l": 2.2
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "citation": {
                  "authors": "Sampson M, Ling C, Sun Q, et al.",
                  "doi": "10.1001/jamacardiol.2020.0013",
                  "id": "sampson-2020",
                  "source": "JAMA Cardiol. 2020;5(5):540-548",
                  "title": "A new equation for calculation of low-density lipoprotein cholesterol in patients with normolipidemia and/or hypertriglyceridemia"
                },
                "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": "sampson",
                "formula_expression": "LDL-C = TC/0.948 - HDL/0.971 - (TG/8.56 + TG*(TC-HDL)/2140 - TG^2/16100) - 9.44 (mg/dL)",
                "hdl_mg_dl": 50,
                "ldl_c_mg_dl": 123.4,
                "ldl_c_mmol_l": 3.2,
                "total_cholesterol_mg_dl": 200,
                "triglycerides_mg_dl": 150,
                "unit": "mg_dl"
              },
              {
                "citation": {
                  "authors": "Sampson M, Ling C, Sun Q, et al.",
                  "doi": "10.1001/jamacardiol.2020.0013",
                  "id": "sampson-2020",
                  "source": "JAMA Cardiol. 2020;5(5):540-548",
                  "title": "A new equation for calculation of low-density lipoprotein cholesterol in patients with normolipidemia and/or hypertriglyceridemia"
                },
                "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": "sampson",
                "formula_expression": "LDL-C = TC/0.948 - HDL/0.971 - (TG/8.56 + TG*(TC-HDL)/2140 - TG^2/16100) - 9.44 (mg/dL)",
                "hdl_mg_dl": 50,
                "ldl_c_mg_dl": 123.4,
                "ldl_c_mmol_l": 3.2,
                "total_cholesterol_mg_dl": 200,
                "triglycerides_mg_dl": 150,
                "unit": "mg_dl"
              }
            ],
            "path": "/api/calc/sampson"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "hdl_mg_dl": {
                          "description": "HDL cholesterol in mg/dL (5-150). Same unit system as the other lipids.",
                          "type": "number"
                        },
                        "hdl_mmol_l": {
                          "description": "HDL cholesterol in mmol/L (0.1-3.9). Converted as mg/dL = mmol/L * 38.67.",
                          "type": "number"
                        },
                        "total_cholesterol_mg_dl": {
                          "description": "Total cholesterol in mg/dL (50-500). Provide the full mg/dL set or the full mmol/L set, not mixed.",
                          "type": "number"
                        },
                        "total_cholesterol_mmol_l": {
                          "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.",
                          "type": "number"
                        },
                        "triglycerides_mg_dl": {
                          "description": "Triglycerides in mg/dL (10-800). Values above 800 are rejected; Sampson 2020 is not applied above 800 mg/dL.",
                          "type": "number"
                        },
                        "triglycerides_mmol_l": {
                          "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.",
                          "type": "number"
                        }
                      },
                      "required": [],
                      "type": "object"
                    },
                    "maxItems": 25,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "items"
                ],
                "type": "object"
              },
              "headers": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "method": {
                "const": "POST",
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "ldl",
    "sampson",
    "lipids",
    "cholesterol",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-12T14:08:07.477Z",
  "quality": {
    "calls30d": 3,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-10-12T14:08:07.342Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "hdl_mg_dl": 50,
                  "hdl_mmol_l": 1,
                  "total_cholesterol_mg_dl": 200,
                  "total_cholesterol_mmol_l": 5,
                  "triglycerides_mg_dl": 150,
                  "triglycerides_mmol_l": 2.2
                },
                {
                  "hdl_mg_dl": 50,
                  "hdl_mmol_l": 1,
                  "total_cholesterol_mg_dl": 200,
                  "total_cholesterol_mmol_l": 5,
                  "triglycerides_mg_dl": 150,
                  "triglycerides_mmol_l": 2.2
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "citation": {
                    "authors": "Sampson M, Ling C, Sun Q, et al.",
                    "doi": "10.1001/jamacardiol.2020.0013",
                    "id": "sampson-2020",
                    "source": "JAMA Cardiol. 2020;5(5):540-548",
                    "title": "A new equation for calculation of low-density lipoprotein cholesterol in patients with normolipidemia and/or hypertriglyceridemia"
                  },
                  "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": "sampson",
                  "formula_expression": "LDL-C = TC/0.948 - HDL/0.971 - (TG/8.56 + TG*(TC-HDL)/2140 - TG^2/16100) - 9.44 (mg/dL)",
                  "hdl_mg_dl": 50,
                  "ldl_c_mg_dl": 123.4,
                  "ldl_c_mmol_l": 3.2,
                  "total_cholesterol_mg_dl": 200,
                  "triglycerides_mg_dl": 150,
                  "unit": "mg_dl"
                },
                {
                  "citation": {
                    "authors": "Sampson M, Ling C, Sun Q, et al.",
                    "doi": "10.1001/jamacardiol.2020.0013",
                    "id": "sampson-2020",
                    "source": "JAMA Cardiol. 2020;5(5):540-548",
                    "title": "A new equation for calculation of low-density lipoprotein cholesterol in patients with normolipidemia and/or hypertriglyceridemia"
                  },
                  "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": "sampson",
                  "formula_expression": "LDL-C = TC/0.948 - HDL/0.971 - (TG/8.56 + TG*(TC-HDL)/2140 - TG^2/16100) - 9.44 (mg/dL)",
                  "hdl_mg_dl": 50,
                  "ldl_c_mg_dl": 123.4,
                  "ldl_c_mmol_l": 3.2,
                  "total_cholesterol_mg_dl": 200,
                  "triglycerides_mg_dl": 150,
                  "unit": "mg_dl"
                }
              ],
              "path": "/api/calc/sampson"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "hdl_mg_dl": {
                            "description": "HDL cholesterol in mg/dL (5-150). Same unit system as the other lipids.",
                            "type": "number"
                          },
                          "hdl_mmol_l": {
                            "description": "HDL cholesterol in mmol/L (0.1-3.9). Converted as mg/dL = mmol/L * 38.67.",
                            "type": "number"
                          },
                          "total_cholesterol_mg_dl": {
                            "description": "Total cholesterol in mg/dL (50-500). Provide the full mg/dL set or the full mmol/L set, not mixed.",
                            "type": "number"
                          },
                          "total_cholesterol_mmol_l": {
                            "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.",
                            "type": "number"
                          },
                          "triglycerides_mg_dl": {
                            "description": "Triglycerides in mg/dL (10-800). Values above 800 are rejected; Sampson 2020 is not applied above 800 mg/dL.",
                            "type": "number"
                          },
                          "triglycerides_mmol_l": {
                            "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.",
                            "type": "number"
                          }
                        },
                        "required": [],
                        "type": "object"
                      },
                      "maxItems": 25,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "type": "object"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "method": {
                  "const": "POST",
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.magentlab.com",
    "manifest_name": "api.magentlab.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}