Package com.google.genai.types
Class GeneratedImage
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.GeneratedImage
An output image.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GeneratedImage.Builder
builder()
Instantiates a builder for GeneratedImage.The rewritten prompt used for the image generation if the prompt enhancer is enabled.static GeneratedImage
Deserializes a JSON string to a GeneratedImage object.image()
The output image data.Responsible AI filter reason if the image is filtered out of the response.abstract Optional<SafetyAttributes>
Safety attributes of the image.abstract GeneratedImage.Builder
Creates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
toJson
-
Constructor Details
-
GeneratedImage
public GeneratedImage()
-
-
Method Details
-
image
The output image data. -
raiFilteredReason
Responsible AI filter reason if the image is filtered out of the response. -
safetyAttributes
Safety attributes of the image. Lists of RAI categories and their scores of each content. -
enhancedPrompt
The rewritten prompt used for the image generation if the prompt enhancer is enabled. -
builder
Instantiates a builder for GeneratedImage. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a GeneratedImage object.
-