Portic.Client
0.1.0
dotnet add package Portic.Client --version 0.1.0
NuGet\Install-Package Portic.Client -Version 0.1.0
<PackageReference Include="Portic.Client" Version="0.1.0" />
<PackageVersion Include="Portic.Client" Version="0.1.0" />
<PackageReference Include="Portic.Client" />
paket add Portic.Client --version 0.1.0
#r "nuget: Portic.Client, 0.1.0"
#:package Portic.Client@0.1.0
#addin nuget:?package=Portic.Client&version=0.1.0
#tool nuget:?package=Portic.Client&version=0.1.0
Portic.Client
Thin .NET client for Portic's stable
POST /v1/messages HTTP surface. It builds on Portic.Sdk's normalized
ChatRequest / ChatCompletion contracts, so callers get one provider-neutral shape whether the
gateway routes to OpenAI, Anthropic, Ollama or a local adapter.
dotnet add package Portic.Client
What it does
- Wraps
HttpClientforPOST /v1/messages. - Serializes/deserializes the normalized contracts with web-default JSON (
camelCase). - Surfaces non-success responses as
PorticClientException, including Portic'sProblemDetailsreason code when available.
Basic usage
using Portic.Client;
using Portic.Sdk.Contracts;
var httpClient = new HttpClient
{
BaseAddress = new Uri("https://portic.example/")
};
var portic = new PorticClient(httpClient);
var completion = await portic.SendAsync(new ChatRequest
{
Model = "gpt-4o-mini",
Messages =
[
new ChatMessage { Role = "system", Content = "Answer tersely." },
new ChatMessage { Role = "user", Content = "Write a haiku about gateways." },
],
});
Console.WriteLine(completion.Message.Content);
OpenAI-style migration shape
If you already assemble a messages array for an OpenAI-compatible call, the Portic adoption path is
deliberately small: keep the conversation payload, point HttpClient.BaseAddress at Portic, and send
the normalized ChatRequest instead of a provider-specific request type.
var completion = await portic.SendAsync(new ChatRequest
{
Model = "gpt-4o-mini",
Provider = "openai",
Messages =
[
new ChatMessage { Role = "user", Content = "Summarize this repository strategy." },
],
});
Versioning and compatibility
Portic.Client tracks the gateway's stable /v1/messages surface. Within v1, compatibility is
additive: clients must ignore unknown response fields, and new optional request fields may appear.
Breaking transport changes require a new path version in the gateway and a corresponding major version
bump here.
Links
- Source and issues: https://github.com/Vev-software/portic-sdk
- Gateway runtime: https://github.com/Vev-software/portic-community
Licence
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net9.0
- Portic.Sdk (>= 0.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 143 | 8/22/2026 |