Eat My Words API

Programmatic access to your nutrition data: read daily totals, log food from plain text, and chat with an assistant about your diet history.

Authentication

The API uses per-user API keys. Create a key from your account profile, then send it in the Authorization header on every request.

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

Quickstart

  1. Create an API key

    Go to your account profile and create a key. You'll see it once β€” store it somewhere safe. Send it as Authorization: Api-Key <key> on every request. Keys are secrets; use them server-side, not in a browser.

  2. Read today's totals
    curl https://words.my/api/v1/daily-summary/ \
      -H "Authorization: Api-Key $EMW_API_KEY"
  3. Log food from plain 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"}'
  4. Handle the AI budget

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

Endpoints

The public API lives under /api/v1/. All endpoints accept an API key and return JSON.

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.
The chat and text-to-log endpoints use AI and are capped by a monthly per-user budget. Once you reach it, those endpoints return 429 Too Many Requests until the next month. Check /api/v1/chat/usage/ for your remaining budget.

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

For AI Agents

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