Skip to main content
POST
Log a meal from a description

Authorizations

__Secure-better-auth.session_token
string
cookie
required

Better 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.

Query Parameters

date
string<date>

Day to log the described meal against (YYYY-MM-DD). Defaults to the server's current UTC date.

Body

application/json

The freeform meal description to analyze.

Body for logging a meal from a freeform text description.

text
string
required

What you ate, in your own words. State anything you skipped so it is excluded.

Maximum string length: 2000
Example:

"two scrambled eggs, a slice of sourdough, and black coffee"

Response

The meal description was analyzed and logged.

Result of logging a meal from photos or a text description.

ok
boolean
required

Always true once analysis succeeds.

Example:

true

mealId
string<uuid>
required

Identifier of the created meal.

Example:

"3f8b1c2a-5d6e-4f70-8a1b-2c3d4e5f6071"

items
object[]
required

Estimated food items.

Example:
totalKcal
integer
required

Summed calories across items.

Example:

374

totalProteinG
integer
required

Summed protein in grams across items.

Example:

54

note
string
required

The model's one-line assumptions note.

Example:

"assumed a single chicken breast and one tablespoon of toum"

photoKeys
string[]
required

R2 object keys of stored photos (empty for text descriptions).

Example: