GoogleImages class

Google Images capability implementation

Supports both Gemini 2.0 Flash Preview Image Generation and Imagen 3 models.

Gemini Image Generation:

  • Uses conversational approach with responseModalities: 'TEXT', 'IMAGE'
  • Supports text-to-image and image editing
  • Model: gemini-2.0-flash-preview-image-generation

Imagen 3:

  • Dedicated image generation model
  • Higher quality, specialized for image generation
  • Model: imagen-3.0-generate-002

Reference: https://ai.google.dev/gemini-api/docs/image-generation

Implemented types

Constructors

GoogleImages.new(GoogleClient _client, GoogleConfig _config)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportsImageEditing bool
Check if the provider supports image editing
no setteroverride
supportsImageVariations bool
Check if the provider supports image variations
no setteroverride

Methods

createVariation(ImageVariationRequest request) Future<ImageGenerationResponse>
Create variations of an existing image
override
editImage(ImageEditRequest request) Future<ImageGenerationResponse>
Edit an existing image based on a prompt
override
generateImage({required String prompt, String? model, String? negativePrompt, String? imageSize, int? batchSize, String? seed, int? numInferenceSteps, double? guidanceScale, bool? promptEnhancement}) Future<List<String>>
Simple image generation (convenience method)
override
generateImages(ImageGenerationRequest request) Future<ImageGenerationResponse>
Generate images from text prompts
override
getSupportedFormats() List<String>
Get supported response formats for this provider
override
getSupportedSizes() List<String>
Get supported image sizes for this provider
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited