Skip to main content
POST
Log a meal from photos

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 against (YYYY-MM-DD). Defaults to the server's current UTC date.

Body

multipart/form-data

The meal photos (multipart field photos), plus an optional note caption for context.

photos
file[]
required

1–5 photos of a single meal, possibly from multiple angles (JPEG, PNG, WebP, or GIF; max 8MB each).

Example:
note
string

Optional caption to disambiguate the photo; passed to the model and stored as the meal note.

Maximum string length: 2000
Example:

"the white sauce is toum, and that's a 12oz steak"

Response

The meal 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: