Skip to main content
POST
Ask the AI coach

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

Body

application/json

The chat history to answer, oldest message first.

Body for asking the coach; the client sends the full running history each turn.

messages
object[]
required

Conversation history, oldest message first (1–20 turns).

Required array length: 1 - 20 elements
Example:
date
string<date>

Optional calendar day (YYYY-MM-DD) whose logged intake grounds the reply; the server's current UTC date is used when omitted.

Example:

"2026-06-30"

Response

The coach's reply.

The coach's plain-text reply, grounded in the caller's targets, intake, and weight trend.

reply
string
required

The coach's answer — an estimate, a budget fit, a blunt verdict, and a better option if it's a poor fit.

Example:

"A meat pie runs about 550 kcal and 15 g protein. That eats a big chunk of your 1850 kcal budget for little protein — skip it. Have three eggs and Greek yogurt instead to hit protein without blowing the day."