{"uid":"cap_P2Ckj3etplYAvQqiKLhtb","slug":"a1c-to-eag-bidirectional-converter-0fb8de8b","name":"A1C to eAG Bidirectional Converter","description":"Nathan/ADAG A1C to estimated average glucose conversion, or the reverse. Provide exactly one of a1c_percent or eAG. Deterministic published equation with citation.","url":"https://api.magentlab.com/api/calc/a1c_eag","method":"GET","headers":{},"bodySchema":{"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":{"eag_mg_dl":{"type":"number","description":"Estimated average glucose in mg/dL (50-500)."},"eag_mmol_l":{"type":"number","description":"Estimated average glucose in mmol/L. Converted as mg/dL = mmol/L * 18."},"a1c_percent":{"type":"number","description":"HbA1c in percent (4-15). Provide this or an eAG, not both."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"path":"/api/calc/a1c_eag","count":2,"items":[{"formula":"nathan_adag","citation":{"id":"nathan-2008","doi":"10.2337/dc08-0545","title":"Translating the A1C assay into estimated average glucose values","source":"Diabetes Care. 2008;31(8):1473-1478","authors":"Nathan DM, Kuenen J, Borg R, Zheng H, Schoenfeld D, Heine RJ"},"direction":"a1c_to_eag","eag_mg_dl":154.2,"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.","eag_mmol_l":8.6,"a1c_percent":7,"formula_expression":"eAG_mg_dl = 28.7 * A1C_percent - 46.7"},{"formula":"nathan_adag","citation":{"id":"nathan-2008","doi":"10.2337/dc08-0545","title":"Translating the A1C assay into estimated average glucose values","source":"Diabetes Care. 2008;31(8):1473-1478","authors":"Nathan DM, Kuenen J, Borg R, Zheng H, Schoenfeld D, Heine RJ"},"direction":"a1c_to_eag","eag_mg_dl":154.2,"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.","eag_mmol_l":8.6,"a1c_percent":7,"formula_expression":"eAG_mg_dl = 28.7 * A1C_percent - 46.7"}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_WeSAmxS0coNOvBKirRF7x","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts HbA1c percentage to estimated average glucose (eAG) or eAG back to HbA1c using the Nathan/ADAG published deterministic equation.","exampleAgentPrompt":"What is the estimated average glucose in mg/dL for an A1C of 7.2%?","exampleUseCases":[{"title":"Patient A1C lab result interpretation","prompt":"My patient's HbA1c just came back at 8.5% — what does that translate to in estimated average glucose in mg/dL so I can explain it to them in plain terms?"},{"title":"Reverse eAG to A1C lookup","prompt":"My continuous glucose monitor shows an average glucose of 183 mg/dL over the past 3 months — what would that correspond to as an A1C percentage?"},{"title":"Metric unit eAG conversion","prompt":"Convert an eAG of 9.5 mmol/L to its equivalent A1C percentage using the Nathan/ADAG equation."}],"resultDescription":"Returns the converted value — either the estimated average glucose (in mg/dL and possibly mmol/L) corresponding to the provided A1C percentage, or the A1C percentage corresponding to the provided eAG — computed via the deterministic Nathan/ADAG published equation with citation metadata.","failureModes":["Both a1c_percent and an eAG parameter provided simultaneously — endpoint requires exactly one","A1C value outside valid range (4–15%) returns an error","eAG in mg/dL outside valid range (50–500) returns an error","Missing required input (neither a1c_percent nor eAG provided) returns validation error","Non-numeric input for numeric fields causes a 400-level error"],"whenToPreferThis":"Use this endpoint when you need a standards-compliant, citation-backed bidirectional conversion between HbA1c and estimated average glucose for clinical or patient-facing applications. Prefer it over manual formula application to ensure use of the correct Nathan/ADAG coefficients. Ideal for embedding in diabetes management tools, EHR integrations, or clinical decision support agents.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:11:44.772Z","isFirstParty":false}