{
  "x402Version": 2,
  "id": 39367,
  "slug": "39367",
  "resource": "https://api.magentlab.com/api/calc/aap_tsb",
  "description": "AAP 2022 Kemper KAS 10 intensive phototherapy threshold from Supplemental Tables 1 and 2 by completed GA, age in hours, TSB, and caller-assigned extra neurotoxicity risk factors. Linear interpolation between tabulated hours. Do not subtract conjugated bilirubin. Not a phototherapy order. magent does not assay TSB.",
  "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": [
              {
                "age_hours": 48,
                "albumin_lt_3": false,
                "clinical_instability_24h": false,
                "g6pd_deficiency": false,
                "gestational_age_weeks": 40,
                "isoimmune_hemolytic_disease": false,
                "other_hemolytic_condition": false,
                "sepsis": false,
                "tsb_mg_dl": 17
              },
              {
                "age_hours": 48,
                "albumin_lt_3": false,
                "clinical_instability_24h": false,
                "g6pd_deficiency": false,
                "gestational_age_weeks": 40,
                "isoimmune_hemolytic_disease": false,
                "other_hemolytic_condition": false,
                "sepsis": false,
                "tsb_mg_dl": 17
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "above_phototherapy_threshold": true,
                "age_hours": 48,
                "albumin_lt_3": false,
                "any_neurotoxicity_risk_factor": false,
                "citation": {
                  "authors": "Kemper AR, Newman TB, Slaughter JL, et al.",
                  "doi": "10.1542/peds.2022-058859",
                  "id": "kemper-2022-aap-hyperbilirubinemia",
                  "pmid": "35927462",
                  "source": "Pediatrics. 2022;150(3):e2022058859",
                  "title": "Clinical Practice Guideline Revision: Management of Hyperbilirubinemia in the Newborn Infant 35 or More Weeks of Gestation"
                },
                "clinical_instability_24h": false,
                "components": [
                  {
                    "factor": "any_neurotoxicity_risk_factor",
                    "met": false
                  },
                  {
                    "factor": "above_phototherapy_threshold",
                    "met": true,
                    "value": 17
                  }
                ],
                "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": "aap_tsb",
                "formula_expression": "Kemper 2022 KAS 10 intensive phototherapy threshold (mg/dL) from Supplemental Table 1 when the caller assigns no neurotoxicity risk factors other than gestational age, or Supplemental Table 2 when any additional listed factor is assigned. Table 1 curves are completed GA 35, 36, 37, 38, 39, and ≥40 weeks. Table 2 curves are 35, 36, 37, and ≥38 weeks. Age is in hours (tabulated hourly from 1 through 336); interpolate linearly between adjacent tabulated hours. Use total serum bilirubin; do not subtract direct-reacting or conjugated bilirubin. Gestational age <38 weeks is already in the GA-specific curve — do not apply Table 2 solely for prematurity. Not a phototherapy or exchange order. magent does not assay TSB",
                "g6pd_deficiency": false,
                "gestational_age_group": "40_or_more",
                "gestational_age_weeks": 40,
                "isoimmune_hemolytic_disease": false,
                "other_hemolytic_condition": false,
                "phototherapy_threshold_mg_dl": 17,
                "sepsis": false,
                "supplemental_table": 1,
                "tsb_mg_dl": 17,
                "tsb_minus_threshold": 0
              },
              {
                "above_phototherapy_threshold": true,
                "age_hours": 48,
                "albumin_lt_3": false,
                "any_neurotoxicity_risk_factor": false,
                "citation": {
                  "authors": "Kemper AR, Newman TB, Slaughter JL, et al.",
                  "doi": "10.1542/peds.2022-058859",
                  "id": "kemper-2022-aap-hyperbilirubinemia",
                  "pmid": "35927462",
                  "source": "Pediatrics. 2022;150(3):e2022058859",
                  "title": "Clinical Practice Guideline Revision: Management of Hyperbilirubinemia in the Newborn Infant 35 or More Weeks of Gestation"
                },
                "clinical_instability_24h": false,
                "components": [
                  {
                    "factor": "any_neurotoxicity_risk_factor",
                    "met": false
                  },
                  {
                    "factor": "above_phototherapy_threshold",
                    "met": true,
                    "value": 17
                  }
                ],
                "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": "aap_tsb",
                "formula_expression": "Kemper 2022 KAS 10 intensive phototherapy threshold (mg/dL) from Supplemental Table 1 when the caller assigns no neurotoxicity risk factors other than gestational age, or Supplemental Table 2 when any additional listed factor is assigned. Table 1 curves are completed GA 35, 36, 37, 38, 39, and ≥40 weeks. Table 2 curves are 35, 36, 37, and ≥38 weeks. Age is in hours (tabulated hourly from 1 through 336); interpolate linearly between adjacent tabulated hours. Use total serum bilirubin; do not subtract direct-reacting or conjugated bilirubin. Gestational age <38 weeks is already in the GA-specific curve — do not apply Table 2 solely for prematurity. Not a phototherapy or exchange order. magent does not assay TSB",
                "g6pd_deficiency": false,
                "gestational_age_group": "40_or_more",
                "gestational_age_weeks": 40,
                "isoimmune_hemolytic_disease": false,
                "other_hemolytic_condition": false,
                "phototherapy_threshold_mg_dl": 17,
                "sepsis": false,
                "supplemental_table": 1,
                "tsb_mg_dl": 17,
                "tsb_minus_threshold": 0
              }
            ],
            "path": "/api/calc/aap_tsb"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "age_hours": {
                          "description": "Chronologic age in hours (1-336). Supplemental Tables 1 and 2 are tabulated hourly; ages between adjacent hours are linearly interpolated. Hour 0 is not tabulated. magent does not convert days.",
                          "type": "number"
                        },
                        "albumin_lt_3": {
                          "description": "Caller-assigned albumin <3.0 g/dL from Kemper 2022 Table 2. true or false. magent does not assay albumin.",
                          "type": "boolean"
                        },
                        "clinical_instability_24h": {
                          "description": "Caller-assigned significant clinical instability in the previous 24 hours from Kemper 2022 Table 2. true or false. magent does not examine the infant.",
                          "type": "boolean"
                        },
                        "g6pd_deficiency": {
                          "description": "Caller-assigned glucose-6-phosphate dehydrogenase (G6PD) deficiency from Kemper 2022 Table 2. true or false. magent does not assay G6PD.",
                          "type": "boolean"
                        },
                        "gestational_age_weeks": {
                          "description": "Completed gestational age in weeks, integer 35-45. Table 1 uses distinct curves for 35, 36, 37, 38, 39, and ≥40. Table 2 groups ≥38 together. magent does not convert days.",
                          "type": "integer"
                        },
                        "isoimmune_hemolytic_disease": {
                          "description": "Caller-assigned isoimmune hemolytic disease (positive direct antiglobulin test) from Kemper 2022 Table 2. true or false. magent does not interpret DAT.",
                          "type": "boolean"
                        },
                        "other_hemolytic_condition": {
                          "description": "Caller-assigned other hemolytic condition (Kemper 2022 Table 2, same neurotoxicity-risk row as isoimmune disease and G6PD deficiency). true or false.",
                          "type": "boolean"
                        },
                        "sepsis": {
                          "description": "Caller-assigned sepsis or suspected sepsis from Kemper 2022 Table 2. true or false. magent does not diagnose sepsis.",
                          "type": "boolean"
                        },
                        "tsb_mg_dl": {
                          "description": "Total serum bilirubin in mg/dL (0-40). Use TSB; do not subtract direct-reacting or conjugated bilirubin. magent does not assay TSB.",
                          "type": "number"
                        }
                      },
                      "required": [
                        "gestational_age_weeks",
                        "age_hours",
                        "tsb_mg_dl",
                        "isoimmune_hemolytic_disease",
                        "g6pd_deficiency",
                        "other_hemolytic_condition",
                        "sepsis",
                        "albumin_lt_3",
                        "clinical_instability_24h"
                      ],
                      "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": [
    "aap-2022",
    "phototherapy",
    "neonatal",
    "bilirubin",
    "hyperbilirubinemia",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-12T15:04:08.913Z",
  "quality": {
    "calls30d": 4,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-12T15:04:08.763Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "age_hours": 48,
                  "albumin_lt_3": false,
                  "clinical_instability_24h": false,
                  "g6pd_deficiency": false,
                  "gestational_age_weeks": 40,
                  "isoimmune_hemolytic_disease": false,
                  "other_hemolytic_condition": false,
                  "sepsis": false,
                  "tsb_mg_dl": 17
                },
                {
                  "age_hours": 48,
                  "albumin_lt_3": false,
                  "clinical_instability_24h": false,
                  "g6pd_deficiency": false,
                  "gestational_age_weeks": 40,
                  "isoimmune_hemolytic_disease": false,
                  "other_hemolytic_condition": false,
                  "sepsis": false,
                  "tsb_mg_dl": 17
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "above_phototherapy_threshold": true,
                  "age_hours": 48,
                  "albumin_lt_3": false,
                  "any_neurotoxicity_risk_factor": false,
                  "citation": {
                    "authors": "Kemper AR, Newman TB, Slaughter JL, et al.",
                    "doi": "10.1542/peds.2022-058859",
                    "id": "kemper-2022-aap-hyperbilirubinemia",
                    "pmid": "35927462",
                    "source": "Pediatrics. 2022;150(3):e2022058859",
                    "title": "Clinical Practice Guideline Revision: Management of Hyperbilirubinemia in the Newborn Infant 35 or More Weeks of Gestation"
                  },
                  "clinical_instability_24h": false,
                  "components": [
                    {
                      "factor": "any_neurotoxicity_risk_factor",
                      "met": false
                    },
                    {
                      "factor": "above_phototherapy_threshold",
                      "met": true,
                      "value": 17
                    }
                  ],
                  "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": "aap_tsb",
                  "formula_expression": "Kemper 2022 KAS 10 intensive phototherapy threshold (mg/dL) from Supplemental Table 1 when the caller assigns no neurotoxicity risk factors other than gestational age, or Supplemental Table 2 when any additional listed factor is assigned. Table 1 curves are completed GA 35, 36, 37, 38, 39, and ≥40 weeks. Table 2 curves are 35, 36, 37, and ≥38 weeks. Age is in hours (tabulated hourly from 1 through 336); interpolate linearly between adjacent tabulated hours. Use total serum bilirubin; do not subtract direct-reacting or conjugated bilirubin. Gestational age <38 weeks is already in the GA-specific curve — do not apply Table 2 solely for prematurity. Not a phototherapy or exchange order. magent does not assay TSB",
                  "g6pd_deficiency": false,
                  "gestational_age_group": "40_or_more",
                  "gestational_age_weeks": 40,
                  "isoimmune_hemolytic_disease": false,
                  "other_hemolytic_condition": false,
                  "phototherapy_threshold_mg_dl": 17,
                  "sepsis": false,
                  "supplemental_table": 1,
                  "tsb_mg_dl": 17,
                  "tsb_minus_threshold": 0
                },
                {
                  "above_phototherapy_threshold": true,
                  "age_hours": 48,
                  "albumin_lt_3": false,
                  "any_neurotoxicity_risk_factor": false,
                  "citation": {
                    "authors": "Kemper AR, Newman TB, Slaughter JL, et al.",
                    "doi": "10.1542/peds.2022-058859",
                    "id": "kemper-2022-aap-hyperbilirubinemia",
                    "pmid": "35927462",
                    "source": "Pediatrics. 2022;150(3):e2022058859",
                    "title": "Clinical Practice Guideline Revision: Management of Hyperbilirubinemia in the Newborn Infant 35 or More Weeks of Gestation"
                  },
                  "clinical_instability_24h": false,
                  "components": [
                    {
                      "factor": "any_neurotoxicity_risk_factor",
                      "met": false
                    },
                    {
                      "factor": "above_phototherapy_threshold",
                      "met": true,
                      "value": 17
                    }
                  ],
                  "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": "aap_tsb",
                  "formula_expression": "Kemper 2022 KAS 10 intensive phototherapy threshold (mg/dL) from Supplemental Table 1 when the caller assigns no neurotoxicity risk factors other than gestational age, or Supplemental Table 2 when any additional listed factor is assigned. Table 1 curves are completed GA 35, 36, 37, 38, 39, and ≥40 weeks. Table 2 curves are 35, 36, 37, and ≥38 weeks. Age is in hours (tabulated hourly from 1 through 336); interpolate linearly between adjacent tabulated hours. Use total serum bilirubin; do not subtract direct-reacting or conjugated bilirubin. Gestational age <38 weeks is already in the GA-specific curve — do not apply Table 2 solely for prematurity. Not a phototherapy or exchange order. magent does not assay TSB",
                  "g6pd_deficiency": false,
                  "gestational_age_group": "40_or_more",
                  "gestational_age_weeks": 40,
                  "isoimmune_hemolytic_disease": false,
                  "other_hemolytic_condition": false,
                  "phototherapy_threshold_mg_dl": 17,
                  "sepsis": false,
                  "supplemental_table": 1,
                  "tsb_mg_dl": 17,
                  "tsb_minus_threshold": 0
                }
              ],
              "path": "/api/calc/aap_tsb"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "age_hours": {
                            "description": "Chronologic age in hours (1-336). Supplemental Tables 1 and 2 are tabulated hourly; ages between adjacent hours are linearly interpolated. Hour 0 is not tabulated. magent does not convert days.",
                            "type": "number"
                          },
                          "albumin_lt_3": {
                            "description": "Caller-assigned albumin <3.0 g/dL from Kemper 2022 Table 2. true or false. magent does not assay albumin.",
                            "type": "boolean"
                          },
                          "clinical_instability_24h": {
                            "description": "Caller-assigned significant clinical instability in the previous 24 hours from Kemper 2022 Table 2. true or false. magent does not examine the infant.",
                            "type": "boolean"
                          },
                          "g6pd_deficiency": {
                            "description": "Caller-assigned glucose-6-phosphate dehydrogenase (G6PD) deficiency from Kemper 2022 Table 2. true or false. magent does not assay G6PD.",
                            "type": "boolean"
                          },
                          "gestational_age_weeks": {
                            "description": "Completed gestational age in weeks, integer 35-45. Table 1 uses distinct curves for 35, 36, 37, 38, 39, and ≥40. Table 2 groups ≥38 together. magent does not convert days.",
                            "type": "integer"
                          },
                          "isoimmune_hemolytic_disease": {
                            "description": "Caller-assigned isoimmune hemolytic disease (positive direct antiglobulin test) from Kemper 2022 Table 2. true or false. magent does not interpret DAT.",
                            "type": "boolean"
                          },
                          "other_hemolytic_condition": {
                            "description": "Caller-assigned other hemolytic condition (Kemper 2022 Table 2, same neurotoxicity-risk row as isoimmune disease and G6PD deficiency). true or false.",
                            "type": "boolean"
                          },
                          "sepsis": {
                            "description": "Caller-assigned sepsis or suspected sepsis from Kemper 2022 Table 2. true or false. magent does not diagnose sepsis.",
                            "type": "boolean"
                          },
                          "tsb_mg_dl": {
                            "description": "Total serum bilirubin in mg/dL (0-40). Use TSB; do not subtract direct-reacting or conjugated bilirubin. magent does not assay TSB.",
                            "type": "number"
                          }
                        },
                        "required": [
                          "gestational_age_weeks",
                          "age_hours",
                          "tsb_mg_dl",
                          "isoimmune_hemolytic_disease",
                          "g6pd_deficiency",
                          "other_hemolytic_condition",
                          "sepsis",
                          "albumin_lt_3",
                          "clinical_instability_24h"
                        ],
                        "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"
  }
}