Eat My Words

Developers

A REST API for your own data.

Read daily totals, log food from plain text, and ask an assistant about your diet history β€” programmatically.

Swagger UI ReDoc reference

Authentication

Api-Key header

The API uses per-user API keys. Create a key from your account profile, then send it in the Authorization header on every request. Keys are secrets β€” use them server-side, never in a browser.

Sign in to create a key
curl https://words.my/api/v1/daily-summary/ \
  -H "Authorization: Api-Key <your-key>"

Quickstart

Four steps

01

Create a key

Go to your account profile and create a key. You will see it once β€” store it somewhere safe.

02

Read today's totals

curl https://words.my/api/v1/daily-summary/ \
  -H "Authorization: Api-Key $EMW_API_KEY"
03

Log food from text

curl https://words.my/api/v1/logs/ \
  -H "Authorization: Api-Key $EMW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "a cup of coffee and a banana"}'
04

Handle the AI budget

The chat and text-to-log endpoints use AI. When a user reaches their monthly budget they return 429 Too Many Requests β€” treat that as "out of budget until next month", not a transient error. Check the remaining budget at /api/v1/chat/usage/.

Endpoints

/api/v1/

Resource Path Methods Description
Daily summary /api/v1/daily-summary/ GET Consumed totals and goals for a day. Supports ?date= and ?timezone=.
Food logs /api/v1/logs/ GET, POST List your logs, or POST natural-language text to log food.
Nutrition chat /api/v1/chat/ POST Ask the assistant about your diet history. Pass chat_id to continue a conversation.
AI usage /api/v1/chat/usage/ GET Your current-month AI usage and remaining budget.
OpenAPI schema /api/schema/ GET Machine-readable schema for every endpoint.

See the Swagger or ReDoc reference for full request and response schemas, query parameters, and pagination details.

For AI agents

Skill files

Drop-in skill files describing how an agent should call the API. Each is a single Markdown document β€” fetch it, hand it to your agent, and it will know how to call the endpoint and format results.

log-food.md
Log a meal from a description; return calorie and macro totals.
daily-summary.md
Read consumed totals and goals for a day (free, no AI).
chat.md
Ask about diet history, with multi-turn conversations.