[Public Preview] Initializes an ImagenModel with the given parameters.
Warning
For Vertex AI in Firebase, image generation using Imagen 3 models is in Public
Preview, which means that the feature is not subject to any SLA or deprecation policy and
could change in backwards-incompatible ways.
Important: Only Imagen 3 models (named imagen-3.0-*) are supported.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-17 UTC."],[],[],null,["# FirebaseVertexAI Framework Reference\n\nVertexAI\n========\n\n @available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)\n public class VertexAI\n\nThe Vertex AI for Firebase SDK provides access to Gemini models directly from your app.\n[Public APIs\n-----------](#/Public-APIs)\n\n- `\n ``\n ``\n `\n\n ### [vertexAI(app:location:)](#/s:16FirebaseVertexAI0bC0C06vertexC03app8locationACSo6FIRAppCSg_SStFZ)\n\n `\n ` \n Creates an instance of `VertexAI`. \n\n #### Declaration\n\n Swift \n\n public static func vertexAI(app: FirebaseApp? = nil,\n location: String = \"us-central1\") -\u003e VertexAI\n\n #### Return Value\n\n A `VertexAI` instance, configured with the custom `FirebaseApp`.\n- `\n ``\n ``\n `\n\n ### [generativeModel(modelName:generationConfig:safetySettings:tools:toolConfig:systemInstruction:requestOptions:)](#/s:16FirebaseVertexAI0bC0C15generativeModel9modelName16generationConfig14safetySettings5tools04toolI017systemInstruction14requestOptionsAA010GenerativeE0CSS_AA010GenerationI0VSgSayAA13SafetySettingVGSgSayAA4ToolVGSgAA0vI0VSgAA0E7ContentVSgAA07RequestQ0VtF)\n\n `\n ` \n Initializes a generative model with the given parameters. \n Note\n\n Refer to [Gemini models](https://firebase.google.com/docs/vertex-ai/gemini-models) for\n guidance on choosing an appropriate model for your use case. \n\n #### Declaration\n\n Swift \n\n public func generativeModel(modelName: String,\n generationConfig: ../Structs/GenerationConfig.html? = nil,\n safetySettings: [../Structs/SafetySetting.html]? = nil,\n tools: [../Structs/Tool.html]? = nil,\n toolConfig: ../Structs/ToolConfig.html? = nil,\n systemInstruction: ../Structs/ModelContent.html? = nil,\n requestOptions: ../Structs/RequestOptions.html = ../Structs/RequestOptions.html())\n -\u003e ../Classes/GenerativeModel.html\n\n #### Parameters\n\n |---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*modelName*` ` | The name of the model to use, for example `\"gemini-1.5-flash\"`; see [available model names](https://firebase.google.com/docs/vertex-ai/gemini-models#available-model-names) for a list of supported model names. |\n | ` `*generationConfig*` ` | The content generation parameters your model should use. |\n | ` `*safetySettings*` ` | A value describing what types of harmful content your model should allow. |\n | ` `*tools*` ` | A list of [Tool](../Structs/Tool.html) objects that the model may use to generate the next response. |\n | ` `*toolConfig*` ` | Tool configuration for any [Tool](../Structs/Tool.html) specified in the request. |\n | ` `*systemInstruction*` ` | Instructions that direct the model to behave a certain way; currently only text content is supported. |\n | ` `*requestOptions*` ` | Configuration parameters for sending requests to the backend. |\n\n- `\n ``\n ``\n `\n\n ### [imagenModel(modelName:generationConfig:safetySettings:requestOptions:)](#/s:16FirebaseVertexAI0bC0C11imagenModel9modelName16generationConfig14safetySettings14requestOptionsAA06ImagenE0CSS_AA0n10GenerationI0VSgAA0n6SafetyK0VSgAA07RequestM0VtF)\n\n `\n ` \n **\\[Public Preview\\]** Initializes an [ImagenModel](../Classes/ImagenModel.html) with the given parameters. \n Warning\n\n For Vertex AI in Firebase, image generation using Imagen 3 models is in Public\n Preview, which means that the feature is not subject to any SLA or deprecation policy and\n could change in backwards-incompatible ways.\n\n Important: Only Imagen 3 models (named `imagen-3.0-*`) are supported. \n\n #### Declaration\n\n Swift \n\n public func imagenModel(modelName: String, generationConfig: ../Structs/ImagenGenerationConfig.html? = nil,\n safetySettings: ../Structs/ImagenSafetySettings.html? = nil,\n requestOptions: ../Structs/RequestOptions.html = ../Structs/RequestOptions.html()) -\u003e ../Classes/ImagenModel.html\n\n #### Parameters\n\n |--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*modelName*` ` | The name of the Imagen 3 model to use, for example `\"imagen-3.0-generate-002\"`; see [model versions](https://firebase.google.com/docs/vertex-ai/models) for a list of supported Imagen 3 models. |\n | ` `*generationConfig*` ` | Configuration options for generating images with Imagen. |\n | ` `*safetySettings*` ` | Settings describing what types of potentially harmful content your model should allow. |\n | ` `*requestOptions*` ` | Configuration parameters for sending requests to the backend. |"]]