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.
| Field | Type | Description |
|---|---|---|
sex | one of female, male, required | Used by the resting energy formula. |
age | number, 18 to 100, required | Age in years. Adults only. |
height_cm | number, 120 to 230, required | Height in centimetres. |
weight_kg | number, 30 to 300, required | Body weight in kilograms. |
activity | one of sedentary, light, moderate, active, very_active, required | sedentary (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). |
goal | one of lose, maintain, gain, required | Lose fat, maintain, or gain muscle. |
pace | one of slow, normal, fast | How 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
| Field | Description |
|---|---|
summary | One line, e.g. "1,820 kcal a day: 140 g protein, 190 g carbs, 61 g fat". |
calories | The daily calorie target. |
bmr | Resting energy, kcal a day, from the Mifflin-St Jeor equation. |
maintenance_calories | Resting energy times the activity factor. |
goal_adjustment_percent | The change from maintenance used for the goal and pace, e.g. -20. |
macros | protein_g, carbs_g and fat_g a day. |
fiber_g | 14 g per 1,000 kcal. |
water_ml | About 35 ml per kg of body weight, from food and drink together. |
notes | Explains any change, such as the minimum calorie floor being applied. |
method, disclaimer | How 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."
}