Skip to content
skcal
Esc
↑↓navigate↵open⌘Jpreview

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.

POST/api/nutrition/describe
Authorization
__Secure-better-auth.session_tokenAPI key · cookierequired

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.

or
AuthorizationBearer token · headerrequired

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

Query parameters
datestring<date>

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

Request body
requiredapplication/json

The freeform meal description to analyze.

textstringrequired

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

max length 2000
Responses
200

The meal description was analyzed and logged.

okbooleanrequired

Always true once analysis succeeds.

mealIdstring<uuid>required

Identifier of the created meal.

itemsAnalyzedItem[]required

Estimated food items.

Show properties
Array of AnalyzedItem
namestringrequired

Estimated food item name.

kcalintegerrequired

Estimated calories for the portion.

proteinGnumberrequired

Estimated protein in grams.

totalKcalintegerrequired

Summed calories across items.

totalProteinGintegerrequired

Summed protein in grams across items.

notestringrequired

The model's one-line assumptions note.

photoKeysstring[]required

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

400

The request body or parameters failed validation.

errorstringrequired

Human-readable failure reason.

detailstring

Optional extra context, present on upstream failures.

502

The upstream model call failed.

errorstringrequired

Human-readable failure reason.

detailstring

Optional extra context, present on upstream failures.

503

A required secret (model key or ingest token) is not configured.

errorstringrequired

Human-readable failure reason.

detailstring

Optional extra context, present on upstream failures.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://app.skcal.fit/api/nutrition/describe' \
  -H 'Cookie: __Secure-better-auth.session_token=YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "text": "two scrambled eggs, a slice of sourdough, and black coffee"
}'
Response
{
  "ok": true,
  "mealId": "3f8b1c2a-5d6e-4f70-8a1b-2c3d4e5f6071",
  "items": [
    {
      "name": "grilled chicken breast",
      "kcal": 284,
      "proteinG": 53.4
    },
    {
      "name": "toum",
      "kcal": 90,
      "proteinG": 0.4
    }
  ],
  "totalKcal": 374,
  "totalProteinG": 54,
  "note": "assumed a single chicken breast and one tablespoon of toum",
  "photoKeys": [
    "nick@mintlify.com/2026-06-29/3f8b1c2a-5d6e-4f70-8a1b-2c3d4e5f6071"
  ]
}

Was this page helpful?