Soenneker.OpenRouter.OpenApiClient
11.0.127
Prefix Reserved
dotnet add package Soenneker.OpenRouter.OpenApiClient --version 11.0.127
NuGet\Install-Package Soenneker.OpenRouter.OpenApiClient -Version 11.0.127
<PackageReference Include="Soenneker.OpenRouter.OpenApiClient" Version="11.0.127" />
<PackageVersion Include="Soenneker.OpenRouter.OpenApiClient" Version="11.0.127" />
<PackageReference Include="Soenneker.OpenRouter.OpenApiClient" />
paket add Soenneker.OpenRouter.OpenApiClient --version 11.0.127
#r "nuget: Soenneker.OpenRouter.OpenApiClient, 11.0.127"
#:package Soenneker.OpenRouter.OpenApiClient@11.0.127
#addin nuget:?package=Soenneker.OpenRouter.OpenApiClient&version=11.0.127
#tool nuget:?package=Soenneker.OpenRouter.OpenApiClient&version=11.0.127
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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Microsoft.Kiota.Http.HttpClientLibrary (>= 2.2.0)
- Microsoft.Kiota.Serialization.Form (>= 2.2.0)
- Microsoft.Kiota.Serialization.Json (>= 2.2.0)
- Microsoft.Kiota.Serialization.Multipart (>= 2.2.0)
- Microsoft.Kiota.Serialization.Text (>= 2.2.0)
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.127 | 0 | 11/25/2026 |
| 11.0.126 | 70 | 11/24/2026 |
| 11.0.125 | 81 | 11/22/2026 |
| 11.0.124 | 84 | 11/21/2026 |
| 11.0.123 | 82 | 11/20/2026 |
| 11.0.122 | 128 | 11/19/2026 |
| 11.0.121 | 132 | 11/18/2026 |
| 11.0.120 | 99 | 11/18/2026 |
| 11.0.119 | 137 | 11/17/2026 |
| 11.0.118 | 112 | 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 | 159 | 11/13/2026 |
| 11.0.113 | 473 | 11/12/2026 |
| 11.0.112 | 166 | 11/12/2026 |
| 11.0.111 | 177 | 11/11/2026 |
| 11.0.110 | 103 | 11/10/2026 |
| 11.0.109 | 3,175 | 11/10/2026 |
| 11.0.108 | 416 | 11/8/2026 |
Update Soenneker.OpenRouter.OpenApiClient