What do I eat tonight?
“What Do I Eat Tonight?” — Solving the Most Human Problem with AI and a Self-Hosted Kitchen
We’ve put humans on the moon. We’ve mapped the human genome. We’ve built systems that can beat grandmasters at chess and write poetry indistinguishable from Keats.
And yet, every single evening, millions of people stand in front of an open fridge and think: I have no idea what to cook.
This is the problem we set out to solve — not with a subscription app, not with a cloud service that harvests your meal preferences to sell you ads, but with a small, elegant pipeline built from open tools, a self-hosted recipe manager, and a privacy-respecting AI gateway. The result: one command, one idea, one fully detailed recipe with a generated photograph, living permanently in your own infrastructure.
The Stack: Three Components, One Purpose
The solution sits at the intersection of three technologies that each solve a different part of the problem.
Mealie — Your Kitchen, Your Data
Mealie is a self-hosted recipe manager. You run it on your own server, your own network, your own hardware. It stores your recipes, your meal plans, your shopping lists — and none of that ever leaves your home unless you choose to share it.
This matters more than it might seem. Every time you search for a recipe on a major platform, you are feeding a profile. What you cook, when you cook it, how often you repeat a dish — these are signals. Self-hosting Mealie breaks that loop entirely. Your kitchen habits are yours.
Mealie exposes a clean REST API, which is what makes programmatic integration possible. It speaks JSON-LD via the schema.org/Recipe standard — a structured, semantic format that search engines, smart home devices, and recipe tools all understand. It is not a proprietary format. It is the web’s own language for food.
PPQ.AI — AI Without Compromise
The AI layer runs through PPQ.AI, a model gateway that provides access to leading AI models — including Claude — through a single OpenAI-compatible API. The key word here is compatible: any tool built for OpenAI’s API works with PPQ.AI without modification.
PPQ.AI’s value proposition in this context is privacy by design. Rather than sending prompts to multiple first-party cloud endpoints under different terms and data policies, you work through a single, controlled gateway. Your API key is yours, your usage is yours, and your prompts — your dinner ideas — are not training data for anyone.
For the language model, we chose Claude Haiku 4.5. The reasoning is deliberate: recipe generation is a structured, well-defined task. You are not asking for deep philosophical reasoning or complex code synthesis. You are asking for a list of ingredients and steps in a known format. Haiku is fast, cheap, and more than capable of producing restaurant-quality recipes on demand. Using a heavier model here would be like hiring an executive chef to boil an egg.
For image generation, we use gpt-image-1.5 — OpenAI’s latest image model, available through PPQ.AI at $0.023 per generation. It produces styled food photography from a text description: the dish name, the cuisine, the texture and feel of the meal. The result is an image that makes the recipe feel real before you even start cooking.
The Pipeline — Where It All Comes Together
The glue is two Python scripts totalling under 250 lines, split deliberately into two stages.
Stage one — recipe.py takes a natural language prompt and does two things locally:
- Calls Claude via PPQ.AI with a strict system prompt that enforces valid JSON-LD output — no markdown, no prose, just structured data — and saves the result to
data/recipes/ - Generates a food photograph via PPQ.AI’s image endpoint and saves it to
data/images/
Nothing is sent to Mealie yet. You can generate a dozen recipes in a row, inspect the JSON, edit if needed, and build up a queue.
Stage two — upload.py reads everything waiting in data/recipes/, pushes each one to Mealie alongside its matching image, then archives the processed files to data/uploaded/. Re-running it is safe — already-uploaded files are gone from the queue.
The separation is intentional. Generation costs API credits. Upload is free. Running them independently means you never pay to regenerate something that failed at the Mealie step, and you always have a local archive of everything you have ever created.
The Philosophy: Infrastructure as Opinion
There is a quiet but growing movement in the technology space around the idea that the tools you use reflect the values you hold. Running your own services is not just a technical choice — it is a statement about where data lives, who benefits from it, and what relationship you want to have with the software in your life.
This project sits squarely in that tradition. Every component was chosen not just because it works, but because of what it represents:
- Self-hosting Mealie means your meal history, preferences, and plans are not a product. They are just yours.
- Using PPQ.AI as a gateway means you interact with frontier AI models through a single, transparent interface — not through half a dozen cloud services, each with their own data policies.
- Choosing Claude Haiku over a larger model is a statement about proportionality: use the right tool for the job, not the most impressive one available.
- Decoupling generation from upload means you are always in control. Generate a batch, review it, publish when ready. Nothing goes to your kitchen until you say so.
- Outputting JSON-LD means the data is interoperable and portable. If Mealie is replaced tomorrow by something better, the recipes move with you. No lock-in.
The result is a system that respects its user. It does not require a subscription. It does not profile your eating habits. It does not send your kitchen queries to a marketing engine. It generates a recipe, takes a photo, and puts it in your cookbook. That’s it.
What It Looks Like in Practice
venv/bin/python recipe.py "a simple chocolate lava cake for 2"
venv/bin/python recipe.py "spicy Korean fried chicken"
venv/bin/python recipe.py "a light summer pasta with lemon and courgette"
🤖 Generating recipe for: 'a simple chocolate lava cake for 2' ...
✅ Recipe generated: Chocolate Lava Cake for Two
💾 Recipe saved: data/recipes/chocolate_lava_cake_for_two.json
🎨 Generating image for: 'Chocolate Lava Cake for Two' ...
✅ Image generated.
💾 Image saved: data/images/chocolate_lava_cake_for_two.jpg
✅ Done. Run upload.py to push to Mealie.
Then, when you are ready:
venv/bin/python upload.py
📦 Found 3 recipe(s) to upload.
📤 Uploading: chocolate_lava_cake_for_two.json
✅ Recipe imported → http://your-server:9000/recipe/chocolate-lava-cake-for-two
✅ Image uploaded.
📤 Uploading: spicy_korean_fried_chicken.json
✅ Recipe imported → http://your-server:9000/recipe/spicy-korean-fried-chicken
✅ Image uploaded.
📤 Uploading: light_summer_pasta_with_lemon.json
✅ Recipe imported → http://your-server:9000/recipe/light-summer-pasta-with-lemon
✅ Image uploaded.
✅ All done.
Two commands. A batch of ideas. A shelf of recipe cards in your kitchen, each with a photograph, ready to cook from.
The next time someone in your household stands in front of the fridge and says “I don’t know what to eat tonight” — the answer is a sentence away.
What Comes Next
The core pipeline is intentionally minimal. The interesting directions are not more complexity — they are more naturalness:
- Ingredient-based prompts: “I have chicken, lemons, and capers” → a recipe that uses what you already have
- Cuisine or dietary filters: “something vegan and Vietnamese”
- Scraping inspiration: paste a URL or a block of text and let Claude parse and reformat it into your library
- A simple web UI: a form instead of a terminal command, accessible to anyone in the household
Each of these is an extension of the same idea: lower the friction between having an idea about food and having a recipe to cook from.
Closing Thought
The best technology is invisible. It does not ask you to understand it, subscribe to it, or trust it with more than it needs. It just works, in the background, in service of something that matters to you.
Cooking is one of the most human things we do. It is nourishment, creativity, care, and ritual all at once. The tools that support it should be worthy of that. They should be open, honest, private, and yours.
That is what this project is. Not a product. A pipeline. Built in an afternoon, running on your own hardware, solving a question as old as the kitchen itself.
What do I eat tonight?
Now you have an answer.
Write a comment