Hello everyone, I received an email telling me that the API could now generate DALL-E images. Very happy, I looked in the documentation how to do it. I simply wanted to copy paste into a test file… I got the following error:
Traceback (most recent call last):
File “test.py”, line 6, in
response = openai.Image.create(
AttributeError: module ‘openai’ has no attribute ‘Image’
Here is my Python code:
import os
import openai
openai.api_key = "myKey"
response = openai.Image.create(
prompt="a white siamese cat",
n=1,
size="1024x1024"
)
image_url = response['data'][0]['url']
print(str(image_url))
Anyone had the same error? I tried to update via PIP the “openai” module but it is not that apparently. Thanks for your help