Soenneker.OpenRouter.OpenApiClientUtil 11.0.255

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.255
                    
NuGet\Install-Package Soenneker.OpenRouter.OpenApiClientUtil -Version 11.0.255
                    
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.255" />
                    
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.255" />
                    
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.255
                    
#r "nuget: Soenneker.OpenRouter.OpenApiClientUtil, 11.0.255"
                    
#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.255
                    
#: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.255
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.OpenRouter.OpenApiClientUtil&version=11.0.255
                    
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.259 51 11/23/2026
11.0.258 57 11/22/2026
11.0.257 56 11/21/2026
11.0.256 72 11/20/2026
11.0.255 80 11/19/2026
11.0.254 54 11/19/2026
11.0.253 55 11/19/2026
11.0.252 52 11/18/2026
11.0.251 54 11/18/2026
11.0.250 58 11/18/2026
11.0.249 103 11/17/2026
11.0.248 94 11/17/2026
11.0.247 113 11/16/2026
11.0.246 101 11/15/2026
11.0.245 92 11/15/2026
11.0.244 112 11/15/2026
11.0.243 147 11/14/2026
11.0.242 414 11/13/2026
11.0.241 201 11/12/2026
11.0.240 108 11/11/2026
Loading failed

Updated Soenneker.OpenRouter.HttpClients to 11.0.180