Google_Gemini 0.10.2-dev.35

This is a prerelease version of Google_Gemini.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Google_Gemini --version 0.10.2-dev.35
                    
NuGet\Install-Package Google_Gemini -Version 0.10.2-dev.35
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Google_Gemini" Version="0.10.2-dev.35" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Google_Gemini" Version="0.10.2-dev.35" />
                    
Directory.Packages.props
<PackageReference Include="Google_Gemini" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Google_Gemini --version 0.10.2-dev.35
                    
#r "nuget: Google_Gemini, 0.10.2-dev.35"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Google_Gemini@0.10.2-dev.35
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Google_Gemini&version=0.10.2-dev.35&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Google_Gemini&version=0.10.2-dev.35&prerelease
                    
Install as a Cake Tool

Google.Gemini

Nuget package dotnet License: MIT Discord

Features 🔥

  • Fully generated C# SDK based on official Google.Gemini OpenAPI specification using AutoSDK
  • Same day update to support new features
  • Updated and supported automatically if there are no breaking changes
  • All modern .NET features - nullability, trimming, NativeAOT, etc.
  • Support .Net Framework/.Net Standard 2.0
  • Microsoft.Extensions.AI IChatClient and IEmbeddingGenerator support

Usage

using Google.Gemini;

using var client = new GeminiClient(apiKey);

Microsoft.Extensions.AI

The SDK implements IChatClient and IEmbeddingGenerator:

using Google.Gemini;
using Microsoft.Extensions.AI;

// IChatClient
IChatClient chatClient = new GeminiClient(apiKey);
var response = await chatClient.GetResponseAsync(
    [new ChatMessage(ChatRole.User, "Hello!")],
    new ChatOptions { ModelId = "gemini-2.0-flash" });

// IEmbeddingGenerator
IEmbeddingGenerator<string, Embedding<float>> generator = new GeminiClient(apiKey);
var embeddings = await generator.GenerateAsync(
    ["Hello, world!"],
    new EmbeddingGenerationOptions { ModelId = "gemini-embedding-001" });

Embedding Models

Model Dimensions Description
gemini-embedding-001 768 (default) Stable text embedding model
gemini-embedding-2-preview 3072 (default) Latest multimodal model — text, images, video, audio, PDFs. Matryoshka dimensions support

The SDK defaults to gemini-embedding-001. For best retrieval quality, use gemini-embedding-2-preview (note: embedding spaces are incompatible between the two models). See Google's embedding guide for details.

API Version

This SDK targets the v1beta API, which is the full-featured version used by Google's own SDKs (Python, JS, Go). The v1 (stable) API only exposes ~30 of the 70+ available endpoints and lacks critical features like tool calling, file upload, context caching, and grounding.

Support

Priority place for bugs: https://github.com/tryAGI/Google_Generative_AI/issues
Priority place for ideas and general questions: https://github.com/tryAGI/Google_Generative_AI/discussions
Discord: https://discord.gg/Ca2xhfBf3v

Acknowledgments

JetBrains logo

This project is supported by JetBrains through the Open Source Support Program.

CodeRabbit logo

This project is supported by CodeRabbit through the Open Source Support Program.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Google_Gemini:

Package Downloads
LangChain

LangChain meta-package with the most used things.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.10.2-dev.85 2 3/22/2026
0.10.2-dev.64 27 3/20/2026
0.10.2-dev.58 28 3/20/2026
0.10.2-dev.57 27 3/20/2026
0.10.2-dev.55 24 3/19/2026
0.10.2-dev.54 26 3/19/2026
0.10.2-dev.53 22 3/19/2026
0.10.2-dev.52 22 3/19/2026
0.10.2-dev.51 28 3/19/2026
0.10.2-dev.44 34 3/19/2026
0.10.2-dev.43 27 3/19/2026
0.10.2-dev.42 23 3/19/2026
0.10.2-dev.41 22 3/19/2026
0.10.2-dev.40 26 3/19/2026
0.10.2-dev.39 26 3/19/2026
0.10.2-dev.38 27 3/19/2026
0.10.2-dev.37 25 3/19/2026
0.10.2-dev.36 27 3/19/2026
0.10.2-dev.35 23 3/19/2026
0.10.1 94 3/18/2026
Loading failed