Soenneker.OpenAI.OpenApiClient 11.0.191

Prefix Reserved
dotnet add package Soenneker.OpenAI.OpenApiClient --version 11.0.191
                    
NuGet\Install-Package Soenneker.OpenAI.OpenApiClient -Version 11.0.191
                    
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.191" />
                    
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.191" />
                    
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.191
                    
#r "nuget: Soenneker.OpenAI.OpenApiClient, 11.0.191"
                    
#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.191
                    
#: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.191
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.OpenAI.OpenApiClient&version=11.0.191
                    
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.191 234 12/2/2026
11.0.190 345 11/30/2026
11.0.189 223 11/29/2026
11.0.188 452 11/17/2026
11.0.187 157 11/17/2026
11.0.186 354 11/11/2026
11.0.185 353 11/5/2026
11.0.184 157 11/4/2026
11.0.183 183 11/3/2026
11.0.182 231 11/3/2026
11.0.181 129 11/2/2026
11.0.180 130 11/2/2026
11.0.179 116 11/2/2026
11.0.178 136 11/2/2026
11.0.177 141 10/31/2026
11.0.176 133 10/31/2026
11.0.175 127 10/31/2026
11.0.174 114 10/30/2026
11.0.173 131 10/30/2026
11.0.172 152 10/29/2026
Loading failed

Update NuGet resilient publish to v6