Soenneker.OpenAI.OpenApiClient 11.0.185

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.OpenAI.OpenApiClient --version 11.0.185
                    
NuGet\Install-Package Soenneker.OpenAI.OpenApiClient -Version 11.0.185
                    
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.OpenApiClient" Version="11.0.185" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.OpenAI.OpenApiClient" Version="11.0.185" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.OpenAI.OpenApiClient" />
                    
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.OpenApiClient --version 11.0.185
                    
#r "nuget: Soenneker.OpenAI.OpenApiClient, 11.0.185"
                    
#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.OpenApiClient@11.0.185
                    
#: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.OpenApiClient&version=11.0.185
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.OpenAI.OpenApiClient&version=11.0.185
                    
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.OpenApiClient

Typed request builders and models for calling OpenAI's REST API from .NET.

Installation

dotnet add package Soenneker.OpenAI.OpenApiClient

Usage

using System.Net.Http.Headers;
using Microsoft.Kiota.Abstractions.Authentication;
using Microsoft.Kiota.Http.HttpClientLibrary;
using Soenneker.OpenAI.OpenApiClient;

var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Authorization =
    new AuthenticationHeaderValue("Bearer", apiKey);

var adapter = new HttpClientRequestAdapter(
    new AnonymousAuthenticationProvider(),
    httpClient: httpClient);

var client = new OpenAIOpenApiClient(adapter);
var models = await client.Models.GetAsync(cancellationToken: cancellationToken);

The client defaults to https://api.openai.com/v1. It exposes the API as Kiota request builders, including models, responses, chat completions, files, images, audio, and batches.

For application registration, configuration-based credentials, and managed client reuse, use Soenneker.OpenAI.OpenApiClientUtil.

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.OpenApiClient:

Package Downloads
Soenneker.OpenAI.OpenApiClientUtil

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

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.188 255 11/17/2026
11.0.187 124 11/17/2026
11.0.186 340 11/11/2026
11.0.185 343 11/5/2026
11.0.184 151 11/4/2026
11.0.183 173 11/3/2026
11.0.182 224 11/3/2026
11.0.181 123 11/2/2026
11.0.180 125 11/2/2026
11.0.179 111 11/2/2026
11.0.178 126 11/2/2026
11.0.177 134 10/31/2026
11.0.176 126 10/31/2026
11.0.175 118 10/31/2026
11.0.174 107 10/30/2026
11.0.173 124 10/30/2026
11.0.172 147 10/29/2026
11.0.171 148 10/28/2026
11.0.170 150 10/27/2026
11.0.169 133 10/27/2026
Loading failed

Update Soenneker.OpenAI.OpenApiClient