Skip to content

Adaptive TDEE

POST
/v1/tools/adaptive-tdee

Measure actual TDEE from a logged history of daily weight and/or calorie intake. Default method (kalman) is a joint Kalman filter over true weight and TDEE — handles missing days, gates outliers, and reports uncertainty (CI95) alongside denoised true weight; regression/endpoints are simple window-based estimates kept for comparison. Use instead of formula TDEE once real logged data exists. Each entry needs at least one of weight/kcal (not necessarily both). Entry dates must span 10 years or less (earliest to latest). Note: all methods need at least one weigh-in (kalman) or two (regression/endpoints) — a history with zero weight entries throws under the kalman default; pass methods:‘all’ to get a graceful empty/skipped result instead.

object
entries
required
Array<object>
>= 10 items <= 400 items
object
date
required
string
/^\d{4}-\d{2}-\d{2}$/
weight
object
value
required
number
unit
string
default: kg
Allowed values: kg lb
kcal
number
<= 20000
window_days
integer
default: 7 >= 3 <= 14
prior_tdee_kcal

Optional starting TDEE estimate, e.g. from the tdee tool; speeds early convergence.

number
>= 500 <= 10000
methods
Any of:
Array<string>
Example
{
"entries": [
{
"date": "2026-01-01",
"weight": {
"value": 80,
"unit": "kg"
},
"kcal": 2500
},
{
"date": "2026-01-02",
"weight": {
"value": 79.95,
"unit": "kg"
},
"kcal": 2500
},
{
"date": "2026-01-03",
"weight": {
"value": 79.9,
"unit": "kg"
},
"kcal": 2500
},
{
"date": "2026-01-04",
"weight": {
"value": 79.85,
"unit": "kg"
},
"kcal": 2500
},
{
"date": "2026-01-05",
"weight": {
"value": 79.8,
"unit": "kg"
},
"kcal": 2500
},
{
"date": "2026-01-06",
"weight": {
"value": 79.75,
"unit": "kg"
},
"kcal": 2500
},
{
"date": "2026-01-07",
"weight": {
"value": 79.7,
"unit": "kg"
},
"kcal": 2500
},
{
"date": "2026-01-08",
"weight": {
"value": 79.65,
"unit": "kg"
},
"kcal": 2500
},
{
"date": "2026-01-09",
"weight": {
"value": 79.6,
"unit": "kg"
},
"kcal": 2500
},
{
"date": "2026-01-10",
"weight": {
"value": 79.55,
"unit": "kg"
},
"kcal": 2500
},
{
"date": "2026-01-11",
"weight": {
"value": 79.5,
"unit": "kg"
},
"kcal": 2500
},
{
"date": "2026-01-12",
"weight": {
"value": 79.45,
"unit": "kg"
},
"kcal": 2500
},
{
"date": "2026-01-13",
"weight": {
"value": 79.4,
"unit": "kg"
},
"kcal": 2500
},
{
"date": "2026-01-14",
"weight": {
"value": 79.35,
"unit": "kg"
},
"kcal": 2500
}
]
}

Adaptive TDEE result

object
results
required
Array<object>
object
method
required
string
value
required
number
unit
required
string
detail
object
key
additional properties
consensus
required
object
mean
required
number
median
required
number
min
required
number
max
required
number
n
required
integer
skipped
required
Array<object>
object
method
required
string
reason
required
string

Inputs valid but semantically impossible, or a required method’s inputs are missing.

object
error
required
object
type
required
string
message
required
string
details

Input failed validation (Zod).

object
error
required
object
type
required
string
message
required
string
details