This Vite project was spun up quickly using yarn create vite openai-dalle-demo --template react
- Go to the OpenAI overview page
- Log in and go to Personal (top-right corner)
- Click on View API keys
- Click on the Create new secret key button
- Save it somewhere safe because you won't see the full key again
Here is a link to the OpenAI API Reference Docs
Duplicate the .env.example
file that is in the root of this project and name the new file .env
Paste in the API key you obtained from OpenAI for the value of VITE_OPENAI_API_KEY
Once you have your OpenAI API Key, you can simply run yarn && yarn dev
to install dependencies and spin up the development server