GeminiDotnet 0.30.0
dotnet add package GeminiDotnet --version 0.30.0
NuGet\Install-Package GeminiDotnet -Version 0.30.0
<PackageReference Include="GeminiDotnet" Version="0.30.0" />
<PackageVersion Include="GeminiDotnet" Version="0.30.0" />
<PackageReference Include="GeminiDotnet" />
paket add GeminiDotnet --version 0.30.0
#r "nuget: GeminiDotnet, 0.30.0"
#:package GeminiDotnet@0.30.0
#addin nuget:?package=GeminiDotnet&version=0.30.0
#tool nuget:?package=GeminiDotnet&version=0.30.0
GeminiDotnet
GeminiDotnet maps directly to Google's Gemini API and supports Native AOT through System.Text.Json source generation. For a common API across model providers, use GeminiDotnet.Extensions.AI.
Get started
dotnet add package GeminiDotnet
Create a GeminiClient and call the V1 models client to stream a response.
using GeminiDotnet;
using GeminiDotnet.V1;
var options = new GeminiClientOptions
{
ApiKey = "<your-api-key>"
};
var client = new GeminiClient(options);
var request = new GenerateContentRequest
{
Contents =
[
new Content
{
Role = ChatRoles.User,
Parts = [new Part { Text = "Who was the first person to walk on the moon?" }]
}
]
};
await foreach (var result in client.V1.Models.StreamGenerateContentAsync("models/gemini-3.7-flash", request, cancellationToken))
{
// Use the result as it is returned.
}
Use the client for the resource, such as client.V1.Models or client.V1.Files. Pass a full resource name such as models/gemini-3.7-flash or files/abc123. A malformed name throws ArgumentException.
client.V1Beta can change in any release. To use it, suppress the GEMINI001 diagnostic. See the V1Beta stability policy.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. net11.0 is compatible. |
-
net10.0
- No dependencies.
-
net11.0
- No dependencies.
-
net8.0
- System.Net.ServerSentEvents (>= 10.0.15)
- System.Text.Json (>= 10.0.15)
-
net9.0
- System.Net.ServerSentEvents (>= 10.0.15)
- System.Text.Json (>= 10.0.15)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on GeminiDotnet:
| Package | Downloads |
|---|---|
|
GeminiDotnet.Extensions.AI
A lightweight, modern implementation of the Microsoft.Extensions.AI.Abstractions APIs for interacting with Google Gemini models. |
|
|
AIKit.Clients.Gemini
Google Gemini client provider for AIKit, supporting chat. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.30.0 | 180 | 11/24/2026 |
| 0.29.0 | 11,814 | 11/5/2026 |
| 0.28.0 | 14,624 | 10/25/2026 |
| 0.27.0 | 67,073 | 10/3/2026 |
| 0.26.0 | 35,786 | 8/31/2026 |
| 0.25.0 | 27,912 | 5/4/2026 |
| 0.24.0 | 663 | 4/27/2026 |
| 0.23.0 | 15,850 | 3/11/2026 |
| 0.22.0 | 8,240 | 2/13/2026 |
| 0.21.0 | 18,953 | 1/22/2026 |
| 0.20.0 | 10,322 | 1/9/2026 |
| 0.19.7 | 1,277 | 1/2/2026 |
| 0.19.6-ge41ebb5b06 | 181 | 1/2/2026 |
| 0.19.4-g6c44932266 | 175 | 1/2/2026 |
| 0.19.3-alpha | 192 | 1/2/2026 |
| 0.19.2-alpha-g2f6eb372c3 | 189 | 1/2/2026 |
| 0.18.1 | 5,368 | 12/17/2025 |
| 0.18.0 | 2,124 | 12/10/2025 |
| 0.17.2 | 4,039 | 12/4/2025 |
| 0.17.0 | 3,022 | 11/18/2025 |