RequestDALL_EImages
Description
This function initiates a request to the OpenAI DALL-E Images API to generate images based on a given prompt.
Parameters
apiKey (String): The API key for authentication.
model (String): (Optional) The model to use for image generation, defaults to βdall-e-2β.
prompt (String): A text description of the desired image(s) (Required). The maximum length is 1000 characters for dall-e-2 and 4000 characters for dall-e-3.
n (int): (Optional) The number of images to generate, defaults to 1. Must be between 1 and 10. For dall-e-3, only n=1 is supported.
size (String): (Optional) The size of the generated images, defaults to β1024x1024β. Must be one of β256x256β, β512x512β, or β1024x1024β for dall-e-2. Must be one of β1024x1024β, β1792x1024β, or β1024x1792β for dall-e-3 models.
Events

DALL_EImagesGenerated (List imageUrls): Fired when the DALL-E Images API successfully generates images. Returns a list of image URLs.

DALL_EImagesError (String errorMessage): Fired when an error occurs during the DALL-E Images API request. Returns an error message.
preview :