---
title: "Working with ChatGPT Functions on Heroku"
description: "Menu Maker is a Node.js reference app with a React front end and Express back end that turns a user's ingredient list into a fine-dining dish description, ingredient list and recipe using OpenAI's Chat Completions API."
url: "https://swe.quest/articles/working-with-chatgpt-functions-on-heroku-40f46570b8427314"
canonical: "https://www.heroku.com/blog/working-with-chatgpt-functions-on-heroku/"
source: "Heroku Engineering"
published: "2024-01-30"
difficulty: "medium"
kind: "How-to"
reading_minutes: 11
tags: ["llms","javascript","react","cloud"]
---

# Working with ChatGPT Functions on Heroku

A post on [Heroku Engineering](https://swe.quest/sources/heroku.md), published 2024-01-30, 11 min read, How-to. Original: [https://www.heroku.com/blog/working-with-chatgpt-functions-on-heroku/](https://www.heroku.com/blog/working-with-chatgpt-functions-on-heroku/)

## Summary

Menu Maker is a Node.js reference app with a React front end and Express back end that turns a user's ingredient list into a fine-dining dish description, ingredient list and recipe using OpenAI's Chat Completions API. Function calling with a JSON-schema \`updateDish\` definition makes the model return structured arguments, so the front end can parse the response and pass it straight into React state instead of handling free-form prose. The walkthrough covers the prompt and function settings, the POST endpoint, testing with curl, and deploying to Heroku from GitHub with config vars. Development API costs were under $1, and an Eco dyno is enough for hosting.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [React](https://swe.quest/tags/react.md) (Web & mobile)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)

## Prerequisites

- Node.js and Express ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- React basics ([easy posts on React](https://swe.quest/tags/react.md?difficulty=easy))
- JSON Schema

## Keywords

OpenAI Chat Completions API, ChatGPT function calling, Heroku, Express, Node.js, Material UI

## Related posts

- [Building with the OpenAI Apps SDK: A Field Guide](https://swe.quest/articles/building-with-the-openai-apps-sdk-a-field-guide-4d32891d09b8bb2e.md): Render · 2025-10-29 · Medium · 8 min read · AI agents, LLMs, Developer tools, TypeScript, Debugging
  OpenAI's Apps SDK extends the Model Context Protocol with a widget layer: tools that return structuredContent with \`\_meta.openai/outputTemplate\` metadata get rendered as inline React components in ChatGPT.
- [Building a GPT Backed by a Heroku-Deployed API](https://swe.quest/articles/building-a-gpt-backed-by-a-heroku-deployed-api-48a6672b2eb1e607.md): Heroku Engineering · 2024-03-28 · Medium · 15 min read · AI agents, LLMs, JavaScript, PostgreSQL
  A custom OpenAI GPT can be backed by a simple Express API on Heroku that answers natural-language questions about an employee directory.
- [Making a web app generator with open ML models](https://swe.quest/articles/making-a-web-app-generator-with-open-ml-models-3da427bd1ac5acd0.md): Hugging Face · 2023-07-03 · Medium · 9 min read · LLMs, AI for coding, JavaScript, Inference & serving
  A Node.js/Express server can generate web apps from a text prompt by streaming tokens from a code LLM (WizardCoder-15B on Hugging Face Inference Endpoints) straight into the browser as HTML.
- [Building a VSCode Chat Extension to Order Lunch](https://swe.quest/articles/building-a-vscode-chat-extension-to-order-lunch-64da87e69c43d744.md): Neon · 2025-03-07 · Medium · 6 min read · AI agents, Developer tools, TypeScript, API design
  A VS Code Copilot chat participant can order Grubhub food by exposing reverse-engineered Grubhub endpoints as language model tools.
- [ReadMeAI: An AI-powered README Generator for Developers](https://swe.quest/articles/readmeai-an-ai-powered-readme-generator-for-developers-eb083158575e3617.md): Docker · 2024-06-28 · Medium · 10 min read · LLMs, Documentation, JavaScript, Containers
  ReadMeAI, an honorable mention from Docker's AI/ML Hackathon, generates a draft README from an uploaded code file and a short project description.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
