One way to connect Open AI with your projects is using plane javascript.
In this tutorial, I show you a simple way to do that and create images with Dall-E.
If you plan to use it in production there are many steps that you should take, including hide the API key, but to start and get the first feel on you local pc you can check this tutorial