Repository navigation
Supported Models
The SDK ships model ID constants in two static classes in the GenerativeAI namespace:
-
GoogleAIModels: Gemini API (Google AI Studio) model IDs, most with themodels/prefix. -
VertexAIModels: Vertex AI model IDs, without a prefix.
You can always pass any model ID string yourself. The constants are a convenience and follow Google's models and deprecations pages as of the v4.0.0 release.
var model = new GenerativeModel(apiKey, GoogleAIModels.Gemini38Flash);GoogleAIModels.DefaultGeminiModel is Gemini38Flash (models/gemini-3.8-flash). It was gemini-2.5-flash in v3.x.
The SDK uses it when you don't pass a model and the GOOGLE_AI_MODEL environment variable is not set.
Vertex AI and the
globallocation: Google serves the newest Gemini models on Vertex AI from thegloballocation. Withregion: "global", the SDK uses thehttps://aiplatform.googleapis.comendpoint instead ofhttps://{region}-aiplatform.googleapis.com. If a new model returns "not found" in a regional location, tryglobal:var vertex = new VertexAI(projectId: "my-project", region: "global"); var model = vertex.CreateGenerativeModel(VertexAIModels.Gemini.Gemini38Flash);
| Constant | Model ID | Notes |
|---|---|---|
Gemini4Hydrogen |
models/gemini-4-hydrogen |
Gemini 4, GA |
Gemini4Carbon |
models/gemini-4-carbon |
Gemini 4, GA |
Gemini4Argon |
models/gemini-4-argon |
Gemini 4, GA |
Gemini38Flash |
models/gemini-3.8-flash |
Stable; default model |
Gemini37Flash |
models/gemini-3.7-flash |
Stable |
Gemini36Flash |
models/gemini-3.6-flash |
Stable |
Gemini35Flash |
models/gemini-3.5-flash |
Stable |
Gemini35FlashLite |
models/gemini-3.5-flash-lite |
Stable |
Gemini31FlashLite |
models/gemini-3.1-flash-lite |
Stable; shutdown scheduled May 7, 2027 |
Gemini31ProPreview |
models/gemini-3.1-pro-preview |
Preview |
Gemini31ProPreviewCustomTools |
models/gemini-3.1-pro-preview-customtools |
Preview, tuned for custom tools |
Gemini3FlashPreview |
gemini-3-flash-preview |
Preview; Google recommends Gemini36Flash instead |
Gemini25FlashLite |
models/gemini-2.5-flash-lite |
Stable |
GeminiFlashLatest |
models/gemini-flash-latest |
Alias that Google moves to the latest Flash release |
GeminiFlashLiteLatest |
models/gemini-flash-lite-latest |
Alias that Google moves to the latest Flash-Lite release |
GeminiProLatest |
models/gemini-pro-latest |
Alias that Google moves to the latest Pro release |
Google deprecated
temperature,topPandtopKfor Gemini 3.6 and later models. The SDK never sets them on its own. TheGenerationConfigproperties are still there for older models and Vertex AI.
| Constant | Model ID |
|---|---|
Gemma4_26B_A4B |
models/gemma-4-26b-a4b-it |
Gemma4_31B |
models/gemma-4-31b-it |
| Constant | Model ID | Notes |
|---|---|---|
Gemini38Live |
models/gemini-3.8-live |
Live API, GA |
Gemini38LiveExtendedThinking |
models/gemini-3.8-live-extended-thinking |
Live API with extended thinking, GA |
Gemini35LiveTranslatePreview |
models/gemini-3.5-live-translate-preview |
Real-time speech translation |
Gemini31FlashLivePreview |
models/gemini-3.1-flash-live-preview |
Preview |
Gemini25FlashNativeAudioPreview122025 |
models/gemini-2.5-flash-native-audio-preview-12-2025 |
Shutdown scheduled March 31, 2027 |
Gemini35Transcribe |
models/gemini-3.5-transcribe |
Speech-to-text |
Gemini35TranscribeLive |
models/gemini-3.5-transcribe-live |
Streaming speech-to-text |
Gemini38FlashTts |
models/gemini-3.8-flash-tts |
Text-to-speech, GA |
Gemini38FlashLiteTts |
models/gemini-3.8-flash-lite-tts |
Text-to-speech, GA |
Gemini31FlashTtsPreview |
models/gemini-3.1-flash-tts-preview |
Shutdown scheduled December 18, 2026 |
See Multimodal Live API.
| Constant | Model ID | Notes |
|---|---|---|
GeminiNanoBanana21 |
models/gemini-nano-banana-2.1 |
GA; default for GenerativeAIImageGenerator
|
Gemini31FlashImage |
models/gemini-3.1-flash-image |
GA |
Gemini31FlashLiteImage |
models/gemini-3.1-flash-lite-image |
GA |
Gemini3ProImage |
models/gemini-3-pro-image |
GA |
Gemini25FlashImage |
models/gemini-2.5-flash-image |
Shutdown scheduled March 15, 2027 |
All Imagen models are retired, on the Gemini API and (since June 30, 2026) on Vertex AI, so use the Gemini image models above. See Image Generation.
| Constant | Model ID | Notes |
|---|---|---|
Video.GeminiOmni12Flash |
models/gemini-omni-1.2-flash |
GA |
Video.GeminiOmni11Flash |
models/gemini-omni-1.1-flash |
Routed to Omni 1.2 Flash from December 3, 2026 |
Veo is retired on the Gemini API. VideoGenerationModel now throws NotSupportedException on the Gemini API.
To generate video there, use Gemini Omni through the Interactions API, or use Veo on Vertex AI.
See Video Generation.
| Constant | Model ID | Notes |
|---|---|---|
Music.Lyria35 |
models/lyria-3.5 |
Stable |
Music.Lyria3ProPreview |
models/lyria-3-pro-preview |
Preview |
Music.Lyria3ClipPreview |
models/lyria-3-clip-preview |
Short clips |
Music.LyriaRealtimeExp |
models/lyria-realtime-exp |
Streaming music; default for LiveMusicClient
|
| Constant | Model ID | Notes |
|---|---|---|
GeminiEmbedding2 |
models/gemini-embedding-2 |
Stable |
GeminiEmbedding |
models/gemini-embedding-001 |
Stable; shutdown scheduled May 14, 2028. Default for the MEAI embedding generator |
TextEmbedding005 |
text-embedding-005 |
Vertex AI text embedding model |
EmbeddingModel checks the model against SupportedEmbedingModels.All. In v4 the check compares bare model IDs, so
models/gemini-embedding-001, publishers/google/models/gemini-embedding-001 and gemini-embedding-001 all pass.
See Embeddings.
| Constant | Model ID | Notes |
|---|---|---|
Agents.DeepResearchPreview042026 |
deep-research-preview-04-2026 |
Deep Research agent (Interactions API) |
Agents.DeepResearchMaxPreview042026 |
deep-research-max-preview-04-2026 |
Deep Research Max agent |
Agents.AntigravityPreview092026 |
antigravity-preview-09-2026 |
Antigravity agent |
GeminiDecision1 |
models/gemini-decision-1 |
Used by the Decisions API |
GeminiRoboticsEr2Preview |
models/gemini-robotics-er-2-preview |
Robotics-ER 2 |
GeminiRoboticsEr2StreamingPreview |
models/gemini-robotics-er-2-streaming-preview |
Robotics-ER 2, streaming |
See Interactions API and Agent APIs.
| Constant | Model ID |
|---|---|
Gemini4Hydrogen |
gemini-4-hydrogen |
Gemini4Carbon |
gemini-4-carbon |
Gemini4Argon |
gemini-4-argon |
Gemini4CarbonCyberPermissive |
gemini-4-carbon-cyber-permissive (allowlist) |
Gemini4ArgonCyberPermissive |
gemini-4-argon-cyber-permissive (allowlist) |
Gemini38Flash |
gemini-3.8-flash |
Gemini38FlashCyber |
gemini-3.8-flash-cyber |
Gemini37Flash |
gemini-3.7-flash (retires Jan 28, 2027) |
Gemini36Flash |
gemini-3.6-flash (retires Nov 19, 2026) |
Gemini35Flash |
gemini-3.5-flash |
Gemini35FlashLite |
gemini-3.5-flash-lite |
Gemini31FlashLite |
gemini-3.1-flash-lite |
Gemini31ProPreview |
gemini-3.1-pro-preview |
Gemini3FlashPreview |
gemini-3-flash-preview |
Gemini38Live |
gemini-3.8-live |
Gemini38FlashTts |
gemini-3.8-flash-tts |
Gemini38FlashLiteTts |
gemini-3.8-flash-lite-tts |
GeminiNanoBanana21 |
gemini-nano-banana-2.1 |
Gemini3ProImage |
gemini-3-pro-image |
Gemini31FlashImage |
gemini-3.1-flash-image |
Gemini31FlashLiteImage |
gemini-3.1-flash-lite-image |
Gemini25FlashImage |
gemini-2.5-flash-image (retires Mar 15, 2027) |
Gemini25Pro |
gemini-2.5-pro |
Gemini25Flash |
gemini-2.5-flash |
Gemini25FlashLite |
gemini-2.5-flash-lite |
TextEmbedding005 |
text-embedding-005 |
Gemma3_1B / Gemma3_4B / Gemma3_12B / Gemmma3_27B
|
gemma-3-1b-it / gemma-3-4b-it / gemma-3-12b-it / gemma-3-27b-it
|
Gemma3n_E4B / Gemma3n_E2B
|
gemma-3n-e4b-it / gemma-3n-e2b-it
|
VertexAIModels.Gemini also keeps a few preview IDs (Gemini25FlashPreviewTTS, Gemini25ProPreviewTTS,
Gemini25FlashImagePreview, Gemini3FlashPreview, Gemini3ProPreview, Gemini3ProImagePreview). Prefer the GA
IDs above. Retired 2.0 and old 2.5 preview IDs were removed in 4.0.1.
| Constant | Model ID |
|---|---|
GeminiEmbedding001 |
gemini-embedding-001 |
TextMultilingualEmbedding002 |
text-multilingual-embedding-002 |
TextEmbedding004 |
text-embedding-004 |
MultimodalEmbedding |
multimodalembedding |
On Vertex AI, the SDK sends Gemini and model-as-a-service embedding models to embedContent/batchEmbedContents.
It sends other text embedding models, such as text-embedding-005, text-embedding-004 and text-multilingual-embedding-002, to predict.
| Constant | Model ID |
|---|---|
GeminiOmni12Flash |
gemini-omni-1.2-flash (video generation and editing) |
Veo31Generate001 |
veo-3.1-generate-001 (default for VideoGenerationModel) |
Veo31FastGenerate001 |
veo-3.1-fast-generate-001 |
-
VertexAIModels.Gemma:GemmaModel(gemma),CodeGemma(codegemma),PaliGemma(paligemma) -
VertexAIModels.MedLM:MedLMMedium(medlm-medium),MedLMLarge(medlm-large)
These constants still work, but they are marked [Obsolete(..., false)], so using one gives compiler warning
CS0618. The replacement is in the warning message.
| Constant | Status | Use instead |
|---|---|---|
Gemini25Flash |
Deprecated; from Dec 1, 2026 requests are routed to gemini-3.5-flash-lite |
Gemini38Flash or Gemini35FlashLite
|
Gemini25Pro |
Deprecated; from Dec 1, 2026 requests are routed to gemini-3.8-flash |
Gemini38Flash or a Gemini 4 model |
Gemini25FlashPreviewTts, Gemini25ProPreviewTts
|
Shutdown Dec 18, 2026 | Gemini38FlashTts |
Gemini3ProImagePreview |
Shut down Jun 25, 2026 (still listed by the API) | Gemini3ProImage |
Gemini25ComputerUsePreview102025 |
Shut down Jul 28, 2026 (still listed by the API) | Computer Use is now a GA tool on current Gemini models |
Gemini25FlashNativeAudioLatest, Gemini25FlashNativeAudioPreview092025
|
No longer in Google's docs | Gemini38Live |
Aqa |
No longer in Google's docs | See Legacy Semantic Retrieval (AQA) |
VertexAIModels.Gemini.Gemini36Flash |
Retires on Vertex AI Nov 19, 2026 | VertexAIModels.Gemini.Gemini38Flash |
VertexAIModels.Gemini.Gemini25Flash, Gemini25Pro, Gemini25FlashLite
|
Listed by Google as retired on Vertex AI since Oct 20, 2026 |
Gemini38Flash, Gemini35Flash or Gemini35FlashLite
|
Constants for models that Google has shut down were removed in version 4.0.1, so code that uses them no longer compiles. Replace them as follows. If you need one of these IDs anyway, pass the model ID as a string.
Gemini API (GoogleAIModels)
| Removed constant(s) | Use instead |
|---|---|
Gemini2Flash, Gemini2FlashLatest, Gemini2FlashExp, Gemini2FlashThinkingExp0121, Gemini25FlashPreview0417, Gemini25ProPreview0520, Gemini25FlashPreview092025
|
Gemini38Flash |
Gemini2FlashLite, Gemini2FlashLitePreview, Gemini25FlashLitePreview092025, Gemini25FlashLitePreview0617
|
Gemini35FlashLite |
Gemini3ProPreview, Gemini25ProExp0325, Gemini25ProPreview0325, Gemini25ProPreview0506, Gemini25ProPreview0605
|
Gemini31ProPreview or a Gemini 4 model |
Gemini2FlashLive001, GeminiLive25FlashPreview, Gemini25FlashLivePreview, Gemini25FlashPreviewNativeAudioDialog
|
Gemini38Live |
Gemini25FlashPreviewNativeAudioThinkingDialog |
Gemini38LiveExtendedThinking |
Gemini25FlashImagePreview, Gemini2FlashExpImageGeneration, Gemini2FlashPreviewImageGeneration
|
GeminiNanoBanana21 or Gemini31FlashImage
|
GeminiRoboticsEr15Preview |
GeminiRoboticsEr2Preview |
TextEmbedding (text-embedding-004), Embedding (embedding-001), GeminiEmbeddingExp
|
GeminiEmbedding2 or GeminiEmbedding
|
Gemma3_1B, Gemma3_4B, Gemma3_12B, Gemmma3_27B, Gemma3n_E4B, Gemma3n_E2B (Gemma 3 is still on Vertex AI through VertexAIModels.Gemini) |
Gemma4_26B_A4B or Gemma4_31B
|
Experimental.LearnLM2FlashExp |
— |
The whole Imagen class |
GeminiNanoBanana21, Gemini3ProImage or Gemini31FlashLiteImage (see Image Generation) |
Video.Veo2Generate001, Video.Veo3Generate001, Video.Veo3FastGenerate001, Video.Veo3GeneratePreview, Video.Veo3FastGeneratePreview, Video.Veo31GeneratePreview, Video.Veo31FastGeneratePreview
|
Video.GeminiOmni12Flash |
Vertex AI (VertexAIModels)
Based on Google's retired models table.
| Removed constant(s) | Use instead |
|---|---|
Gemini.Gemini2Flash, Gemini2FlashLatest, Gemini2ProExp, Gemini25ProExp0325, Gemini25ProPreview0325, Gemini25ProPreview0506, Gemini25FlashPreview0417, Gemini25FlashPreview0520
|
Gemini.Gemini38Flash |
Gemini.Gemini2FlashLite |
Gemini.Gemini35FlashLite |
Gemini.Gemini2FlashLive001 |
Gemini.Gemini38Live |
Embeddings.TextEmbeddingGecko001, TextEmbeddingGecko002, TextEmbeddingGecko003, TextEmbeddingGeckoMultilingual001
|
Embeddings.GeminiEmbedding001 |
Codey.CodeGecko (and the Codey class) |
Gemini.Gemini35FlashLite |
The whole Imagen class (all Imagen and imagegeneration@ models, retired Jun 30, 2026) |
Gemini.GeminiNanoBanana21, Gemini3ProImage, Gemini31FlashImage or Gemini25FlashImage
|
Video.Veo2Generate001, Video.Veo3Generate001, Video.Veo3FastGenerate001 (retired Jun 30, 2026), Video.Veo3GeneratePreview, Video.Veo3FastGeneratePreview, Video.Veo31GeneratePreview, Video.Veo31FastGeneratePreview
|
Video.Veo31Generate001 or Video.Veo31FastGenerate001
|
VideoGenerationModel and VertexAI.CreateVideoGenerationModel() now default to Video.Veo31Generate001.
Getting Started
- Initialization
- Authentication
- Configuration & Error Handling
- Supported Models
- Migration Guide (v4)
- Release Notes (v4)
Core Features
- Generate Content
- Chat Session
- Streaming
- Multimodal Features
- JSON Mode
- Function Calling
- Embeddings
- Context Caching
Gemini APIs
- Interactions API
- Multimodal Live API
- File Search
- Batch API
- Model Tuning
- Webhooks
- Agent APIs
- Image Generation
- Video Generation
- Speech Generation
- Files Client
- Model Client
Vertex AI
Integrations
Guides
Legacy