Soenneker.OpenRouter.OpenApiClientUtil 11.0.287

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

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

Installation

dotnet add package Soenneker.OpenRouter.OpenApiClientUtil

Configuration

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

Usage

using Soenneker.OpenRouter.OpenApiClientUtil.Abstract;
using Soenneker.OpenRouter.OpenApiClientUtil.Registrars;

services.AddOpenRouterOpenApiClientUtilAsSingleton();

IOpenRouterOpenApiClientUtil openRouter = serviceProvider
    .GetRequiredService<IOpenRouterOpenApiClientUtil>();

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

Use AddOpenRouterOpenApiClientUtilAsScoped() 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

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
11.0.287 53 12/5/2026
11.0.286 4,104 12/3/2026
11.0.285 53 12/3/2026
11.0.284 56 12/3/2026
11.0.283 59 12/3/2026
11.0.282 56 12/3/2026
11.0.281 220 12/3/2026
11.0.280 235 12/2/2026
11.0.279 90 12/2/2026
11.0.278 55 12/2/2026
11.0.276 58 12/2/2026
11.0.275 65 12/2/2026
11.0.274 320 12/2/2026
11.0.273 2,335 12/2/2026
11.0.272 2,134 12/1/2026
11.0.271 98 12/1/2026
11.0.270 91 12/1/2026
11.0.269 92 12/1/2026
11.0.268 92 12/1/2026
11.0.267 102 11/30/2026
Loading failed

Update dependency Soenneker.OpenRouter.OpenApiClient to 11.0.137 (#394)