BetaBetaConstructs a new instance of the ImagenModel class.
an AI instance.
Parameters to use when making requests to Imagen.
OptionalrequestOptions: RequestOptionsAdditional options to use when making requests.
BetaGenerates images using the Imagen model and returns them as base64-encoded strings.
A text prompt describing the image(s) to generate.
A promise that resolves to an ImagenGenerationResponse object containing the generated images.
InternalGenerates images to Cloud Storage for Firebase using the Imagen model.
This method is temporarily internal.
A text prompt describing the image(s) to generate.
The URI of file stored in a Cloud Storage for Firebase bucket.
This should be a directory. For example, gs://my-bucket/my-directory/.
A promise that resolves to an ImagenGenerationResponse object containing the URLs of the generated images.
StaticnormalizeInternalNormalizes the given model name to a fully qualified model resource name.
The model name to normalize.
The fully qualified model resource name.
Protected Internal_Optional BetagenerationThe Imagen generation configuration.
ReadonlymodelThe fully qualified model resource name to use for generating images
(for example, publishers/google/models/imagen-3.0-generate-002).
Optional BetarequestAdditional options to use when making requests.
Optional BetasafetySafety settings for filtering inappropriate content.
Class for Imagen model APIs.
This class provides methods for generating images using the Imagen model.
Example