FirebaseVertexAI Framework Reference

ImagenModel

@available(iOS15.0,macOS12.0,tvOS15.0,watchOS8.0,*)publicfinalclassImagenModel

Represents a remote Imagen model with the ability to generate images using text prompts.

See thegenerate imagesdocumentationfor more details about the image generation capabilities offered by the Imagen model in theVertex AI in Firebase SDK.

Warning

For Vertex AI in Firebase, image generation using Imagen 3 models is in PublicPreview, which means that the feature is not subject to any SLA or deprecation policy andcould change in backwards-incompatible ways.

  • [Public Preview] Generates images using the Imagen model and returns them as inline data.

    The individualdata is provided for each of the generatedimages.

    Note

    By default, 1 image sample is generated; seenumberOfImagesto configure the number of images that are generated.

    Warning: For Vertex AI in Firebase, image generation using Imagen 3 models is in PublicPreview, which means that the feature is not subject to any SLA or deprecation policy andcould change in backwards-incompatible ways.

    Declaration

    Swift

    publicfuncgenerateImages(prompt:String)asyncthrows->ImagenGenerationResponse<ImagenInlineImage>

    Parameters

    prompt

    A text prompt describing the image(s) to generate.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-03-17 UTC.