Food & calories
POST /v1/food · $0.01 a call
Send a meal photo. A vision model lists every food and drink, splits mixed dishes into parts, and estimates each weight from the plate and cutlery in frame. Each item is then matched to an entry in our reference nutrition database, and its per-gram values are scaled to the portion.
For calorie trackers, meal loggers, diet coaches.
Request
Send the photo as image (multipart), image_base64 or image_url, as described in the overview. These optional fields go alongside it:
| Field | Type | Description |
|---|---|---|
context | string, up to 500 characters | What the user tells you about the meal, e.g. "I ate about half" or "cooked in butter". Trusted over the photo. |
Photo tips. Shoot from above with the whole plate in frame. A fork, a hand or a standard plate helps judge size.
curl https://truelens.keronlabs.com/v1/food \
-H "Authorization: Bearer $TRUELENS_KEY" \
-F image=@lunch.jpg \
-F context="I ate about half"Response
| Field | Description |
|---|---|
summary | One line for a list view, e.g. "736 kcal across 2 items". |
is_food | false when the photo has no food or drink; items is then empty. |
items[].name | What the food is, as the model saw it. |
items[].grams | Estimated edible weight. |
items[].confidence | 0 to 1, covering both what the food is and how much of it there is. |
items[].nutrition | calories, protein_g, carbs_g, fat_g, fiber_g for that weight. |
items[].estimated | true when the food was not found in our reference nutrition data and the values are the model's own estimate. |
totals | Sum of all items. |
follow_up_questions | Up to three questions whose answers would change the total most. Send the answer back as context. |
Example
Output of this API's own code on a sample photo. Values will differ for your photos.
{
"metadata": {
"id": "req_9cf4da08fe7f40dab71a",
"engine": "food",
"status": "success",
"cached": false,
"credits_used": 1,
"created_at": "2026-10-19T09:30:00.000Z",
"processing_ms": 3400
},
"summary": "775 kcal across 1 item",
"is_food": true,
"items": [
{
"name": "Margherita pizza, whole",
"grams": 289,
"confidence": 0.7,
"cooking_method": "baked",
"nutrition": {
"calories": 775,
"protein_g": 35,
"carbs_g": 91.6,
"fat_g": 29.8,
"fiber_g": 6.4
},
"estimated": false
}
],
"totals": {
"calories": 775,
"protein_g": 35,
"carbs_g": 91.6,
"fat_g": 29.8,
"fiber_g": 6.4
},
"follow_up_questions": [
"Did you eat the whole pizza or only part of it?"
]
}