Soenneker.OpenRouter.OpenApiClient 11.0.116

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

Typed request builders and models for calling OpenRouter's unified AI API from .NET.

Installation

dotnet add package Soenneker.OpenRouter.OpenApiClient

Usage

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

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

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

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

The client defaults to https://openrouter.ai/api/v1. Its request builders cover models, chat completions, responses, embeddings, generation metadata, providers, credits, keys, and workspaces.

For configuration-based credentials and managed client reuse, use Soenneker.OpenRouter.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.OpenRouter.OpenApiClient:

Package Downloads
Soenneker.OpenRouter.OpenApiClientUtil

Provides a configured OpenRouter 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.128 0 11/26/2026
11.0.127 69 11/25/2026
11.0.126 111 11/24/2026
11.0.125 105 11/22/2026
11.0.124 109 11/21/2026
11.0.123 106 11/20/2026
11.0.122 131 11/19/2026
11.0.121 138 11/18/2026
11.0.120 99 11/18/2026
11.0.119 144 11/17/2026
11.0.118 113 11/17/2026
11.0.117 116 11/17/2026
11.0.116 135 11/15/2026
11.0.115 149 11/14/2026
11.0.114 160 11/13/2026
11.0.113 474 11/12/2026
11.0.112 167 11/12/2026
11.0.111 177 11/11/2026
11.0.110 103 11/10/2026
11.0.109 3,176 11/10/2026
Loading failed

Update Soenneker.OpenRouter.OpenApiClient