Log a meal from a description
Sends a freeform meal description to Claude for per-item calorie and protein estimates, respecting stated portions and excluding anything the user says they skipped, then stores it as a meal.
/api/nutrition/describe__Secure-better-auth.session_tokenAPI key · cookierequiredBetter Auth session. Signing in (Google or email magic link) sets an HttpOnly session cookie that scopes every request to that account. The web app and CLI use this; agents use the OAuth 2.1 flow of the MCP server.
AuthorizationBearer token · headerrequiredPersonal API key sent as Authorization: Bearer skcal_…. Create and scope keys in the app under your profile → API keys. Keys default to full access; a scoped key is limited to its granted resource:action permissions and cannot manage other keys.
datestring<date>Day to log the described meal against (YYYY-MM-DD). Defaults to the server's current UTC date.
application/jsonThe freeform meal description to analyze.
textstringrequiredWhat you ate, in your own words. State anything you skipped so it is excluded.
The meal description was analyzed and logged.
okbooleanrequiredAlways true once analysis succeeds.
mealIdstring<uuid>requiredIdentifier of the created meal.
itemsAnalyzedItem[]requiredEstimated food items.
Show propertiesHide properties
AnalyzedItemnamestringrequiredEstimated food item name.
kcalintegerrequiredEstimated calories for the portion.
proteinGnumberrequiredEstimated protein in grams.
totalKcalintegerrequiredSummed calories across items.
totalProteinGintegerrequiredSummed protein in grams across items.
notestringrequiredThe model's one-line assumptions note.
photoKeysstring[]requiredR2 object keys of stored photos (empty for text descriptions).
The request body or parameters failed validation.
errorstringrequiredHuman-readable failure reason.
detailstringOptional extra context, present on upstream failures.
The upstream model call failed.
errorstringrequiredHuman-readable failure reason.
detailstringOptional extra context, present on upstream failures.
A required secret (model key or ingest token) is not configured.
errorstringrequiredHuman-readable failure reason.
detailstringOptional extra context, present on upstream failures.