AbstractProtectedcreateHelper method to create an error result with proper timing
ProtectedcreateHelper method to create a successful result with proper timing
AbstractCreateCreate variations of an existing image. Generates new images that are similar to the input but with variations.
Parameters for the variation operation
Result containing image variations
AbstractEditEdit an existing image using a text prompt and optional mask. Also known as inpainting. The mask specifies which areas to regenerate.
Parameters for the edit operation
Result containing edited image(s)
AbstractGenerateGenerate image(s) from a text prompt. This is the primary method for text-to-image generation.
Parameters controlling the image generation
Result containing generated image(s)
AbstractGetGet information about available image generation models from this provider.
Array of available model information
AbstractGetGet the list of methods supported by this provider. Use this to check capabilities before calling methods that may not be implemented.
Array of supported method names
ProtectednormalizeHelper method to convert image input (Buffer, base64, or URL) to the format required by the specific provider. Subclasses can override as needed.
Image as Buffer, base64 string, or URL
Normalized image data
Base class for all image generation models. Each AI provider will have a sub-class implementing the abstract methods. Not all sub-classes will support all methods - use GetSupportedMethods() to determine what methods are available for a specific provider.