Creates a new ImageGenerator instance
The authenticated OpenAI client
Logger instance for debugging
Private Readonly loggerLogger instance for debugging
Private Readonly openaiThe authenticated OpenAI client
Generates a single image from a text prompt
The text prompt describing the image to generate
Optional, the size of the image. Defaults to "1024x1024"
Optional, the GPT image model to use. Defaults to "gpt-image-1-mini"
A Promise that resolves to the PNG data URL of the generated image
Generates multiple images from a text prompt
The text prompt describing the images to generate
The number of images to generate (1-5)
Optional, the size of the images. Defaults to "1024x1024"
Optional, the GPT image model to use. Defaults to "gpt-image-1-mini"
A Promise that resolves to an array of PNG data URLs for the generated images
Class used to generate images using OpenAI's GPT image models