Universal.Operative.Sdk.Google.Gemini
1.0.0
dotnet add package Universal.Operative.Sdk.Google.Gemini --version 1.0.0
NuGet\Install-Package Universal.Operative.Sdk.Google.Gemini -Version 1.0.0
<PackageReference Include="Universal.Operative.Sdk.Google.Gemini" Version="1.0.0" />
<PackageVersion Include="Universal.Operative.Sdk.Google.Gemini" Version="1.0.0" />
<PackageReference Include="Universal.Operative.Sdk.Google.Gemini" />
paket add Universal.Operative.Sdk.Google.Gemini --version 1.0.0
#r "nuget: Universal.Operative.Sdk.Google.Gemini, 1.0.0"
#:package Universal.Operative.Sdk.Google.Gemini@1.0.0
#addin nuget:?package=Universal.Operative.Sdk.Google.Gemini&version=1.0.0
#tool nuget:?package=Universal.Operative.Sdk.Google.Gemini&version=1.0.0
Universal.Operative.Sdk.Google.Gemini
Intent-focused Google Gemini tools for Universal.Operative.Sdk.
Default tools
gemini_imagegenerates and edits images. Its stablequalityprofiles map to the current Nano Banana family:fast,balanced, andpro(Nano Banana Pro).gemini_consultasks Gemini for analysis, reasoning, drafting, or a second opinion. Calls are stateless by default.
The lower-level gemini_api tool is available only from the advanced tool set. It allowlists supported operations and never accepts an arbitrary URL or HTTP method.
using Universal.Operative.Sdk.Google.Gemini.Tools;
IReadOnlyList<ITool> tools = GoogleGeminiToolSet.CreateDefault("YOUR_GEMINI_API_KEY");
To include the advanced API tool:
IReadOnlyList<ITool> tools = GoogleGeminiToolSet.CreateAdvanced("YOUR_GEMINI_API_KEY");
Image tool
gemini_image accepts a prompt, optional reference images, an aspect ratio, output size, JPEG output, and a quality profile. Generated images are returned as native Operative ImageBlock values instead of base64 JSON text.
Quality profiles currently map as follows:
| Profile | Gemini model |
|---|---|
fast |
Gemini 3.1 Flash-Lite Image |
balanced |
Gemini 3.1 Flash Image (Nano Banana 2) |
pro |
Gemini 3 Pro Image (Nano Banana Pro) |
Reference images may be HTTPS/Gemini file URIs or local file paths. Local files are uploaded for the request and removed from Gemini Files afterward.
Conversation storage
Both default tools use the Interactions API. Requests set store=false unless gemini_consult is explicitly called with store=true. A stored response's interaction_id can be passed as previous_interaction_id on the next consultation.
Custom model mappings
Applications can replace model mappings without changing the tool schemas:
var options = new GoogleGeminiToolOptions
{
ProImageModel = "gemini-3-pro-image",
ReasoningConsultModel = "gemini-3.7-flash",
};
var tools = GoogleGeminiToolSet.CreateDefault(apiKey, options);
Live tests
The test project shares the existing Google Gemini user-secret store. Its live tests call both the text tool and Nano Banana Pro through the real API:
dotnet user-secrets set "Google:Gemini:ApiKey" "<key>" --project Universal.Operative.Sdk.Google.Gemini.Tests
dotnet test Universal.Operative.Sdk.Google.Gemini.Tests --filter "TestCategory=GoogleGeminiLive"
| 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 was computed. 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. |
-
net10.0
- Newtonsoft.Json (>= 13.0.4)
- Universal.Google.Gemini.Client (>= 1.1.0)
- Universal.Operative.Sdk (>= 6.0.3)
-
net8.0
- Newtonsoft.Json (>= 13.0.4)
- Universal.Google.Gemini.Client (>= 1.1.0)
- Universal.Operative.Sdk (>= 6.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 100 | 9/4/2026 |
Initial release.