Soenneker.OpenRouter.OpenApiClient
4.0.84
Prefix Reserved
dotnet add package Soenneker.OpenRouter.OpenApiClient --version 4.0.84
NuGet\Install-Package Soenneker.OpenRouter.OpenApiClient -Version 4.0.84
<PackageReference Include="Soenneker.OpenRouter.OpenApiClient" Version="4.0.84" />
<PackageVersion Include="Soenneker.OpenRouter.OpenApiClient" Version="4.0.84" />
<PackageReference Include="Soenneker.OpenRouter.OpenApiClient" />
paket add Soenneker.OpenRouter.OpenApiClient --version 4.0.84
#r "nuget: Soenneker.OpenRouter.OpenApiClient, 4.0.84"
#:package Soenneker.OpenRouter.OpenApiClient@4.0.84
#addin nuget:?package=Soenneker.OpenRouter.OpenApiClient&version=4.0.84
#tool nuget:?package=Soenneker.OpenRouter.OpenApiClient&version=4.0.84
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 | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Kiota.Http.HttpClientLibrary (>= 2.1.2)
- Microsoft.Kiota.Serialization.Form (>= 2.1.2)
- Microsoft.Kiota.Serialization.Json (>= 2.1.2)
- Microsoft.Kiota.Serialization.Multipart (>= 2.1.2)
- Microsoft.Kiota.Serialization.Text (>= 2.1.2)
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 |
|---|---|---|
| 4.0.84 | 162 | 10/14/2026 |
| 4.0.83 | 97 | 10/14/2026 |
| 4.0.78 | 112 | 10/13/2026 |
| 4.0.77 | 100 | 10/12/2026 |
| 4.0.76 | 135 | 10/11/2026 |
| 4.0.75 | 91,704 | 9/24/2026 |
| 4.0.74 | 183 | 9/15/2026 |
| 4.0.73 | 200 | 9/12/2026 |
| 4.0.72 | 183 | 9/8/2026 |
| 4.0.71 | 232 | 9/4/2026 |
| 4.0.70 | 182 | 9/3/2026 |
| 4.0.69 | 132 | 9/3/2026 |
| 4.0.68 | 127 | 9/3/2026 |
| 4.0.67 | 207 | 8/31/2026 |
| 4.0.66 | 525 | 7/27/2026 |
| 4.0.65 | 179 | 7/20/2026 |
| 4.0.64 | 272 | 7/16/2026 |
| 4.0.63 | 357 | 6/18/2026 |
| 4.0.62 | 430 | 6/5/2026 |
| 4.0.61 | 226 | 6/1/2026 |
Update dependency dotnet-sdk to v10.0.402 (#233)
Automatically merged