Soenneker.OpenRouter.OpenApiClient 11.0.137

Prefix Reserved
dotnet add package Soenneker.OpenRouter.OpenApiClient --version 11.0.137
                    
NuGet\Install-Package Soenneker.OpenRouter.OpenApiClient -Version 11.0.137
                    
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.137" />
                    
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.137" />
                    
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.137
                    
#r "nuget: Soenneker.OpenRouter.OpenApiClient, 11.0.137"
                    
#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.137
                    
#: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.137
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.OpenRouter.OpenApiClient&version=11.0.137
                    
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.137 60 12/4/2026
11.0.136 4,136 12/3/2026
11.0.135 510 12/2/2026
11.0.134 93 12/2/2026
11.0.133 3,102 12/1/2026
11.0.132 1,712 12/1/2026
11.0.131 182 11/28/2026
11.0.130 133 11/28/2026
11.0.129 129 11/27/2026
11.0.128 121 11/26/2026
11.0.127 162 11/25/2026
11.0.126 143 11/24/2026
11.0.125 120 11/22/2026
11.0.124 123 11/21/2026
11.0.123 118 11/20/2026
11.0.122 143 11/19/2026
11.0.121 152 11/18/2026
11.0.120 117 11/18/2026
11.0.119 158 11/17/2026
11.0.118 124 11/17/2026
Loading failed

Update Soenneker.OpenRouter.OpenApiClient