This project is the final result from Chapter 6 Overview of the OpenAI APIs where we build a basic site to learn how to use the OpenAI APIs. It contains two forms, one to generate text using the Chat API, and another to generate images using the Images API.
First install all required packages by running:
npm install
Then rename .env.template
to .env
and in the file paste in your OpenAI API key:
OPENAI_API_KEY=<paste key here>
Then run the development server:
npm run dev
Open http://localhost:3000 with your browser to view the website.