Soenneker.OpenRouter.OpenApiClientUtil 11.0.259

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.OpenRouter.OpenApiClientUtil --version 11.0.259
                    
NuGet\Install-Package Soenneker.OpenRouter.OpenApiClientUtil -Version 11.0.259
                    
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.259" />
                    
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.259" />
                    
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.259
                    
#r "nuget: Soenneker.OpenRouter.OpenApiClientUtil, 11.0.259"
                    
#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.259
                    
#: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.259
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.OpenRouter.OpenApiClientUtil&version=11.0.259
                    
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.261 50 11/25/2026
11.0.260 91 11/24/2026
11.0.259 109 11/23/2026
11.0.258 95 11/22/2026
11.0.257 97 11/21/2026
11.0.256 110 11/20/2026
11.0.255 118 11/19/2026
11.0.254 93 11/19/2026
11.0.253 93 11/19/2026
11.0.252 91 11/18/2026
11.0.251 93 11/18/2026
11.0.250 96 11/18/2026
11.0.249 112 11/17/2026
11.0.248 102 11/17/2026
11.0.247 117 11/16/2026
11.0.246 104 11/15/2026
11.0.245 95 11/15/2026
11.0.244 116 11/15/2026
11.0.243 150 11/14/2026
11.0.242 415 11/13/2026
Loading failed

Update dependency Soenneker.OpenRouter.OpenApiClient to 11.0.125 (#382)