How to Build a Custom GPT That Fetches Real Nutrition Data via Dietly API
Developers can build a Custom GPT that retrieves live nutrition data by importing Dietly's OpenAPI schema as an Action in the GPT editor. The integration uses Dietly's GET /search endpoint to return per-100g nutritional values for packaged foods, rather than relying on the model's internal knowledge. A tightly worded system instruction is essential to force the GPT to call the API before responding and to prevent it from fabricating nutrition figures. Authentication is optional for public Dietly endpoints, but if a key is used, bearer authentication with a read-only, rate-capped key is recommended, and credentials must never appear in prompts or instruction files. Before publishing, OpenAI advises testing edge cases in Preview mode, and any publicly listed GPT must include a valid privacy policy URL in the action configuration.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in