Soenneker.OpenAI.OpenApiClientUtil 11.0.336

Prefix Reserved
dotnet add package Soenneker.OpenAI.OpenApiClientUtil --version 11.0.336
                    
NuGet\Install-Package Soenneker.OpenAI.OpenApiClientUtil -Version 11.0.336
                    
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="Soenneker.OpenAI.OpenApiClientUtil" Version="11.0.336" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.OpenAI.OpenApiClientUtil" Version="11.0.336" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.OpenAI.OpenApiClientUtil" />
                    
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 Soenneker.OpenAI.OpenApiClientUtil --version 11.0.336
                    
#r "nuget: Soenneker.OpenAI.OpenApiClientUtil, 11.0.336"
                    
#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 Soenneker.OpenAI.OpenApiClientUtil@11.0.336
                    
#: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=Soenneker.OpenAI.OpenApiClientUtil&version=11.0.336
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.OpenAI.OpenApiClientUtil&version=11.0.336
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.OpenAI.OpenApiClientUtil

Provides a configured OpenAI REST API client and reuses it for the lifetime of the registered service.

Installation

dotnet add package Soenneker.OpenAI.OpenApiClientUtil

Configuration

{
  "OpenAI": {
    "ApiKey": "your-api-key"
  }
}

OpenAI:ClientBaseUrl and OpenAI:AuthHeaderValueTemplate can override the API base URL and authorization value format when needed.

Usage

using Soenneker.OpenAI.OpenApiClientUtil.Abstract;
using Soenneker.OpenAI.OpenApiClientUtil.Registrars;

services.AddOpenAIOpenApiClientUtilAsSingleton();

IOpenAIOpenApiClientUtil openAi = serviceProvider
    .GetRequiredService<IOpenAIOpenApiClientUtil>();

var client = await openAi.Get(cancellationToken);
var models = await client.Models.GetAsync(cancellationToken: cancellationToken);

Use AddOpenAIOpenApiClientUtilAsScoped() when each application scope should have its own generated client wrapper. The underlying authenticated HTTP provider remains shared and is disposed by the service container at shutdown.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
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 Soenneker.OpenAI.OpenApiClientUtil:

Package Downloads
Soenneker.OpenAI.Moderation

A .NET OpenAI content moderation utility using their OpenAPI client

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.336 97 12/3/2026
11.0.335 66 12/3/2026
11.0.334 73 12/3/2026
11.0.333 62 12/3/2026
11.0.332 64 12/3/2026
11.0.331 55 12/3/2026
11.0.330 59 12/2/2026
11.0.329 70 12/2/2026
11.0.328 63 12/2/2026
11.0.327 100 12/2/2026
11.0.326 73 12/2/2026
11.0.325 68 12/2/2026
11.0.324 99 12/1/2026
11.0.323 97 12/1/2026
11.0.322 104 12/1/2026
11.0.321 102 12/1/2026
11.0.320 101 12/1/2026
11.0.319 103 12/1/2026
11.0.318 114 11/30/2026
11.0.317 147 11/30/2026
Loading failed

Updated Multiple NuGet packages