Soenneker.OpenAI.OpenApiClientUtil 11.0.314

Prefix Reserved
dotnet add package Soenneker.OpenAI.OpenApiClientUtil --version 11.0.314
                    
NuGet\Install-Package Soenneker.OpenAI.OpenApiClientUtil -Version 11.0.314
                    
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.314" />
                    
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.314" />
                    
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.314
                    
#r "nuget: Soenneker.OpenAI.OpenApiClientUtil, 11.0.314"
                    
#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.314
                    
#: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.314
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.OpenAI.OpenApiClientUtil&version=11.0.314
                    
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.314 121 11/19/2026
11.0.313 50 11/19/2026
11.0.312 59 11/18/2026
11.0.309 59 11/18/2026
11.0.308 99 11/17/2026
11.0.307 84 11/17/2026
11.0.306 123 11/15/2026
11.0.305 104 11/15/2026
11.0.304 212 11/11/2026
11.0.303 113 11/11/2026
11.0.302 100 11/11/2026
11.0.301 120 11/11/2026
11.0.300 113 11/11/2026
11.0.299 250 11/6/2026
11.0.298 131 11/5/2026
11.0.297 165 11/3/2026
11.0.296 115 11/3/2026
11.0.295 110 11/3/2026
11.0.294 115 11/3/2026
11.0.293 112 11/3/2026
Loading failed

Updated Soenneker.OpenAI.HttpClients to 11.0.183