Build a custom GPT that answers food questions with live Dietly data
A Custom GPT can use Dietly as a live food lookup instead of guessing nutrition values, by importing Dietly's OpenAPI schema as an Action. The whole job is to give the GPT one narrow retrieval task: when a user asks about a specific food, search Dietly, then report the returned product name with its per-100 g values and say when a field is missing. This page covers the setup, the instruction that keeps answers grounded, and the tests to run before you share it.
How the pieces fit
A Custom GPT with an Action is a thin layer over an HTTP API. You import an OpenAPI schema, the editor turns each described operation into a callable action, and the model decides when to call it. For Dietly the useful operation is GET /search, which returns a JSON array of foods. Nothing about the model changes; you are giving it a reliable way to fetch real numbers.
1. Create an Action from the schema
In the GPT editor, open Configure, then Actions, choose to create a new action, and import for current editor rules and any workspace restrictions.
2. Pick the least-privileged authentication
Dietly's public read endpoints can be tested with no key at all, which is the simplest starting point. If you do attach a key, configure bearer authentication and use a read-only key with a rate cap from the refreshes the action. Watch for two failure modes over time: the model quietly stops calling the action for questions it thinks it already knows, and it over-reports precision on a low-confidence record. The grounding instruction addresses both, but re-run the five test prompts whenever you change the instructions, since a small wording change can shift when the model decides to search. Treat the instruction block as the real product here; the action is plumbing, and the instruction is what keeps answers tied to real data.
When an Action is not the right tool
Use a normal Custom GPT with curated knowledge when the information should be static and reviewed by you. Use an Action when freshness matters, as it does for a catalog of hundreds of thousands of products. For a real application that needs user accounts, saved logs or multi-step tool flows, build a server-side integration instead of asking a GPT Action to carry application logic. The cover those paths.
Next: read the , and use . Data from the Dietly Nutrition API — 850k+ foods, free tier available.
SOCIAL SHARE CARD GENERATOR