- Download UnityDalle2API.cs file from above
- Move file to the Unity's Assets folder
- Add UnityDalle2API.cs on a plane (or any 3D object you want)
- Go to https://beta.openai.com/account/api-keys and create a new OpenAi API key
- Paste the secret key to the "Your Api Key" field on the object
- "Your Prompt" is the prompt that will be generated
- "Image Size" is an image's size that can be 256x256, 512x512, or 1024x1024
- Hit play and your prompt's generated image will be applied as an object's texture
Thanks to cemahseri for help