FirebaseAILogic Framework Reference

ImagenInlineImage

@available(*, deprecated, message: "All Imagen models are deprecated and will shut down as early as June 2026. As a replacement, you can migrate your apps to use Gemini Image models (the \"Nano Banana\" models﹚.")
public struct ImagenInlineImage : Sendable
extension ImagenInlineImage: Equatable
extension ImagenInlineImage: Decodable

An image generated by Imagen, represented as inline data.

  • The IANA standard MIME type of the image file; either "image/png" or "image/jpeg".

    Note

    To request a different format, set imageFormat in your ImagenGenerationConfig.

    Declaration

    Swift

    public let mimeType: String
  • The image data in PNG or JPEG format.

    Declaration

    Swift

    public let data: Data
  • Declaration

    Swift

    public init(from decoder: any Decoder) throws