Caffeine Calculator API
Caffeine metabolism maths as an API, computed locally and deterministically with a first-order (exponential) decay model. The level endpoint computes how much caffeine remains in the body after a given time from a dose and a half-life (about 5 hours by default), as milligrams and a percentage, and how long until it falls to a chosen threshold. The timeline endpoint returns an hour-by-hour decay curve and the time until caffeine is "sleep safe" — below a threshold (50 mg by default) — handy for working out a coffee cut-off before bed. The sources endpoint gives the typical caffeine content of common drinks (brewed coffee, espresso, tea, energy drinks, cola and more) for a single drink, or totals a list such as two coffees and a cola. Everything is computed locally and deterministically, so it is instant and private. This is informational only: real caffeine half-life varies widely between people (roughly 3–7 hours, and much longer in pregnancy or with certain medications) — it is not medical advice. Ideal for coffee, sleep and wellbeing apps, energy-drink and habit trackers, and quantified-self tools. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is caffeine pharmacokinetics; for a drug reference database use a drug API.
api.oanor.com/caffeine-api