As the title says, my Dall-E script ignores the n value I set in my code. Instead of generating the 4 images I specified, it only generates one. Can Dall-E only send one image URL at a time? Am I missing something?
Here’s the code:
import openai
# Your DALL-E API key
openai.api_key = "[REDACTED]"
input1 = input("Enter your input: ")
# Generate an image
response = openai.Image.create(
prompt=input1,
n=4,
model="image-alpha-001",
size="1024x1024",
response_format="url"
)
# Print the URL of the generated image
print(response["data"][0]["url"])
I think it has something to do with the print function at the bottom, but I’m not exactly sure