Soenneker.Cohere.OpenApiClient
11.0.82
Prefix Reserved
dotnet add package Soenneker.Cohere.OpenApiClient --version 11.0.82
NuGet\Install-Package Soenneker.Cohere.OpenApiClient -Version 11.0.82
<PackageReference Include="Soenneker.Cohere.OpenApiClient" Version="11.0.82" />
<PackageVersion Include="Soenneker.Cohere.OpenApiClient" Version="11.0.82" />
<PackageReference Include="Soenneker.Cohere.OpenApiClient" />
paket add Soenneker.Cohere.OpenApiClient --version 11.0.82
#r "nuget: Soenneker.Cohere.OpenApiClient, 11.0.82"
#:package Soenneker.Cohere.OpenApiClient@11.0.82
#addin nuget:?package=Soenneker.Cohere.OpenApiClient&version=11.0.82
#tool nuget:?package=Soenneker.Cohere.OpenApiClient&version=11.0.82
Soenneker.Cohere.OpenApiClient
A Kiota-generated .NET client exposing Cohere's typed chat, embedding, reranking, generation, and model-management APIs.
Installation
dotnet add package Soenneker.Cohere.OpenApiClient
Recommended setup
Most applications should use Soenneker.Cohere.OpenApiClientUtil, which configures bearer authentication, base URL, reuse, and dependency injection:
using Soenneker.Cohere.OpenApiClientUtil.Registrars;
services.AddCohereOpenApiClientUtilAsSingleton();
Resolve ICohereOpenApiClientUtil and call Get to obtain CohereOpenApiClient.
Direct construction
Use this package directly when the application already owns its Kiota authentication and HTTP pipeline:
using Microsoft.Kiota.Abstractions.Authentication;
using Microsoft.Kiota.Http.HttpClientLibrary;
using Soenneker.Cohere.OpenApiClient;
using System.Net.Http.Headers;
var httpClient = new HttpClient
{
BaseAddress = new Uri("https://api.cohere.com")
};
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", apiKey);
var adapter = new HttpClientRequestAdapter(
new AnonymousAuthenticationProvider(),
httpClient: httpClient)
{
BaseUrl = httpClient.BaseAddress.ToString().TrimEnd('/')
};
var client = new CohereOpenApiClient(adapter);
The root exposes V1 and V2 request builders. For example, client.V2.Chat, client.V2.Embed, and client.V2.Rerank accept their corresponding generated request models.
Generated request and response types mirror Cohere's schema. Nullable return values represent endpoints that may return no body, and API failures follow Kiota's generated exception behavior. Pass cancellation tokens to network operations and validate model-specific inputs before sending prompts, documents, or other potentially sensitive content.
Generated-code boundary
Prefer generated request builders and model properties over manually assembled URLs or JSON. Do not hand-edit generated source files; place retries, application policy, output validation, and data-handling controls around the client.
| 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.Cohere.OpenApiClient:
| Package | Downloads |
|---|---|
|
Soenneker.Cohere.OpenApiClientUtil
Provides a cached, bearer-authenticated Cohere OpenAPI client. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.82 | 144 | 12/2/2026 |
| 11.0.81 | 192 | 11/30/2026 |
| 11.0.80 | 186 | 11/20/2026 |
| 11.0.79 | 125 | 11/18/2026 |
| 11.0.78 | 123 | 11/18/2026 |
| 11.0.77 | 102 | 11/18/2026 |
| 11.0.76 | 109 | 11/17/2026 |
| 11.0.75 | 106 | 11/17/2026 |
| 11.0.74 | 134 | 11/14/2026 |
| 11.0.73 | 143 | 11/11/2026 |
| 11.0.72 | 148 | 11/3/2026 |
| 11.0.71 | 113 | 11/3/2026 |
| 11.0.70 | 144 | 11/3/2026 |
| 11.0.69 | 109 | 11/2/2026 |
| 11.0.68 | 126 | 11/2/2026 |
| 11.0.67 | 123 | 10/31/2026 |
| 11.0.66 | 124 | 10/31/2026 |
| 11.0.65 | 104 | 10/30/2026 |
| 11.0.64 | 124 | 10/30/2026 |
| 11.0.63 | 139 | 10/27/2026 |
Update Soenneker.Cohere.OpenApiClient