The Splot API is a JSON REST API over HTTPS. It follows the same rules as the app and connected assistants, so a meal saved through the API looks the same everywhere.
https://app.splot.health/v1The whole API is also described as an OpenAPI spec, for tools and AI assistants: openapi.json.
Splot adds endpoints and fields to /v1 over time, so ignore any you don’t use. A change that would break existing code comes as a new version beside this one, announced well before /v1 stops working.
Your journal
Section titled “Your journal”Your Splot journal is a timeline. Every meal you log or plan is an entry on it, placed at the moment it was eaten, or will be, and on that day in the timezone it was eaten in. The app shows the timeline day by day, and the API reads and writes the same entries.
- A logged meal is food you ate. A planned meal is one you mean to eat: it sits on the timeline beside eaten meals, and only eaten meals count toward the day’s totals.
- Each meal holds items, one food and a portion each. Splot works out the nutrition from them.
Create a key
Section titled “Create a key”In the app, open Account → API Keys and create a key with the Read and write permission. The key is shown once, so copy it straight away and keep it out of your code:
export SPLOT_API_KEY="splot_pat_…"Read your journal
Section titled “Read your journal”List meals returns your latest meals, newest first:
curl "https://app.splot.health/v1/meals?limit=3" \ -H "Authorization: Bearer $SPLOT_API_KEY"Find a food
Section titled “Find a food”A meal is made of foods. Search foods finds one to log, here a product from Open Food Facts by its barcode:
curl "https://app.splot.health/v1/foods?library=off&query=3017620422003" \ -H "Authorization: Bearer $SPLOT_API_KEY"Each result has a library and a key. Together they point at that food.
Log a meal
Section titled “Log a meal”Create a meal with the food and the portion eaten:
curl https://app.splot.health/v1/meals \ -H "Authorization: Bearer $SPLOT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "eatenAt": "2026-10-02T08:30:00+02:00", "timezone": "Europe/Berlin", "name": "Breakfast", "items": [ { "food": { "library": "off", "key": "3017620422003" }, "quantity": 15, "unit": "g" } ] }'Splot works out the nutrition from the food and the portion, and the meal appears in the app straight away.
Use this page
Last updated