Daily targets

POST /v1/food/targets · $0.001 a call

The numbers a calorie tracker sets at onboarding. Resting energy uses the Mifflin-St Jeor equation, multiplied by a standard activity factor for maintenance, then adjusted for the goal: 10%, 20% or 25% below maintenance to lose and 5%, 10% or 15% above to gain, by pace. Protein is set per kg of body weight (2.0 g to lose, 1.6 g to maintain, 1.8 g to gain), fat is 30% of calories and carbs fill the rest. Targets never go below 1,200 kcal for women or 1,500 kcal for men, and the response says when that floor was applied.

For calorie trackers, fitness and diet coaching apps.

Request

Send these fields as a JSON body (or form fields) on POST /v1/food/targets. No photo is needed.

FieldTypeDescription
sexone of female, male, requiredUsed by the resting energy formula.
agenumber, 18 to 100, requiredAge in years. Adults only.
height_cmnumber, 120 to 230, requiredHeight in centimetres.
weight_kgnumber, 30 to 300, requiredBody weight in kilograms.
activityone of sedentary, light, moderate, active, very_active, requiredsedentary (desk job, little exercise), light (1 to 3 workouts a week), moderate (3 to 5), active (6 to 7), very_active (hard daily training or a physical job).
goalone of lose, maintain, gain, requiredLose fat, maintain, or gain muscle.
paceone of slow, normal, fastHow fast to lose or gain. Defaults to normal.

Photo tips. No photo. Send the fields as JSON.

curl https://truelens.keronlabs.com/v1/food/targets \
  -H "Authorization: Bearer $TRUELENS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sex":"female","age":32,"height_cm":168,"weight_kg":70,"activity":"moderate","goal":"lose"}'

Response

FieldDescription
summaryOne line, e.g. "1,820 kcal a day: 140 g protein, 190 g carbs, 61 g fat".
caloriesThe daily calorie target.
bmrResting energy, kcal a day, from the Mifflin-St Jeor equation.
maintenance_caloriesResting energy times the activity factor.
goal_adjustment_percentThe change from maintenance used for the goal and pace, e.g. -20.
macrosprotein_g, carbs_g and fat_g a day.
fiber_g14 g per 1,000 kcal.
water_mlAbout 35 ml per kg of body weight, from food and drink together.
notesExplains any change, such as the minimum calorie floor being applied.
method, disclaimerHow the numbers were worked out, and a short health disclaimer to show users.

Example

Output of this API’s own code on the sample request above.

{
  "metadata": {
    "id": "req_9cf4da08fe7f40dab71a",
    "engine": "food/targets",
    "status": "success",
    "cached": false,
    "credits_used": 0.1,
    "created_at": "2026-10-19T09:30:00.000Z",
    "processing_ms": 40
  },
  "summary": "1,770 kcal a day: 140 g protein, 170 g carbs, 59 g fat",
  "calories": 1770,
  "bmr": 1429,
  "maintenance_calories": 2215,
  "goal_adjustment_percent": -20,
  "macros": {
    "protein_g": 140,
    "carbs_g": 170,
    "fat_g": 59
  },
  "fiber_g": 25,
  "water_ml": 2450,
  "notes": [],
  "method": "Mifflin-St Jeor resting energy x 1.55 for moderate activity, -20% for the goal.",
  "disclaimer": "General guidance for healthy adults, not medical advice. People who are pregnant, under 18, or managing a health condition should ask a doctor or dietitian."
}