The TastyAPI food recognition API identifies the food in a photo and returns its full nutrition in a single step — no manual logging, no database lookups. Send an image, get the dish name plus calories, macros, vitamins, minerals, and allergens.
Most "food recognition" returns only a label — you still have to map that label to nutrition yourself. TastyAPI does both in one request: it recognizes the dish and returns the nutrition for the portion it sees, so a single call is enough to log a meal.
Upload a file as multipart form data, or pass a public image URL. Authenticate with a bearer token.
Upload a filecurl -X POST https://tastyapi.com/analyze-image \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "image=@lunch.jpg"
200 OK
{
"analysis": {
"foodName": "Margherita Pizza",
"servingSize": { "amount": 107, "unit": "g" },
"nutrients": {
"calories": { "amount": 285, "unit": "kcal" },
"protein": { "amount": 12, "unit": "g" },
"carbohydrates": { "amount": 36, "unit": "g" },
"fat": { "amount": 10, "unit": "g" }
},
"allergens": { "contains": ["gluten", "dairy"], "mayContain": [] },
"dietaryInfo": { "isVegetarian": true, "isVegan": false, "isGlutenFree": false },
"imageAnalysis": { "quality": 0.94, "multipleFoods": false, "needsClarification": false }
},
"language": "en"
}
The model is trained on tens of millions of food images and returns calibrated estimates, typically within 10–15% of laboratory analysis. Recognition is strongest on clear, well-lit photos where the whole dish is visible. Heavy occlusion, extreme angles, or very mixed plates lower confidence — for those, a follow-up text call to the Nutrition API with a short description can refine the result. Estimates are for tracking and information, not medical use.
Both. Post the image as multipart form data, or send a public image URL — whichever your stack makes easier.
Both, in one response: the identified dish and its full nutrition breakdown for the visible portion.
It estimates nutrition for the meal as photographed. For itemized control, capture items separately or refine with a text description.
Get a key and analyze your first food photo in minutes. 7-day free trial.
Get an API key