From 999591b193a37d72f60c0f8d5c229ad8dfdf11ca Mon Sep 17 00:00:00 2001 From: moshferatu Date: Wed, 8 Nov 2023 10:25:55 -0800 Subject: [PATCH] Example request to generate an image using Dall-E 3 --- dall_e.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 dall_e.py diff --git a/dall_e.py b/dall_e.py new file mode 100644 index 0000000..e4441c2 --- /dev/null +++ b/dall_e.py @@ -0,0 +1,17 @@ +from dotenv import load_dotenv +from openai import OpenAI + +load_dotenv() + +client = OpenAI() + +response = client.images.generate( + model='dall-e-3', + prompt='cthulhu, paper craft art, minimal detail', + size='1024x1024', + quality='standard', + n=1, +) + +image_url = response.data[0].url +print(image_url) \ No newline at end of file