Phaseo.Sdk
2.1.0
dotnet add package Phaseo.Sdk --version 2.1.0
NuGet\Install-Package Phaseo.Sdk -Version 2.1.0
<PackageReference Include="Phaseo.Sdk" Version="2.1.0" />
<PackageVersion Include="Phaseo.Sdk" Version="2.1.0" />
<PackageReference Include="Phaseo.Sdk" />
paket add Phaseo.Sdk --version 2.1.0
#r "nuget: Phaseo.Sdk, 2.1.0"
#:package Phaseo.Sdk@2.1.0
#addin nuget:?package=Phaseo.Sdk&version=2.1.0
#tool nuget:?package=Phaseo.Sdk&version=2.1.0
Phaseo C# SDK
Official .NET SDK for Phaseo Gateway.
Package ID: Phaseo.Sdk
Installation
dotnet add package Phaseo.Sdk --version 2.0.5
From this monorepo:
dotnet add ./packages/sdk/sdk-csharp/Phaseo.Sdk.csproj
Quick start
using PhaseoSdk;
var client = new Phaseo(
apiKey: Environment.GetEnvironmentVariable("PHASEO_API_KEY"),
basePath: Environment.GetEnvironmentVariable("PHASEO_BASE_URL") ?? "https://api.phaseo.app/v1"
);
var response = await client.CreateResponse(new Dictionary<string, object>
{
["model"] = "google/gemma-3-27b:free",
["input"] = "Reply with: C# SDK works",
});
Console.WriteLine(response?["id"]);
Common methods
CreateResponse(...)CreateChatCompletion(...)ListModels(...)ListOrganisations(...)for paginated/organisationsdiscoveryListPricingModels(...)for/pricing/modelscatalogue pricing discoveryCalculatePricing(...)for/pricing/calculateusage estimationListProviders(...),GetCredits(...),GetActivity(...), andGetAnalytics(...)for provider discovery and management-key usage surfacesListApiKeys(...)for management-key/keysdiscoveryCreateApiKey(...),UpdateApiKey(id, ...), andDeleteApiKey(id)for management-key API-key lifecycle changesGetApiKey(id)for management-key/keys/{id}lookupListWorkspaces(...),GetWorkspace(id),CreateWorkspace(...),UpdateWorkspace(id, ...), andDeleteWorkspace(id)for management-key workspace lifecycle managementGetCurrentApiKey()Health()GetModelDeprecationInfo(modelId)ValidateModel(modelId)
Model discovery supports the public /models filters, including provider, provider_status, provider_routing_status, model_routing_status, capability_status, provider_availability_status, provider_availability_reason, status, organisation, endpoints, input_types, output_types, params, availability, limit, and offset.
Use provider_availability_reason with availability = "all" when you want rollout-state entries such as preview_only, provider_not_ready, gated, access_limited, region_limited, project_limited, paused, or soft_blocked. Use capability_status with availability = "all" when you want non-routable endpoint mappings such as coming_soon or internal_testing.
var models = await client.ListModels(new Dictionary<string, string>
{
["provider"] = "anthropic",
["provider_status"] = "beta,not_ready",
["provider_availability_reason"] = "preview_only,provider_not_ready",
["capability_status"] = "coming_soon,internal_testing",
["availability"] = "all",
});
Async job websocket helpers
Batch and video operations can expose a websocket lifecycle stream at /v1/async/{kind}/{id}/ws.
var batchSocketUrl = client.GetBatchWebSocketUrl("batch_123", intervalMs: 1500);
var videoSocketUrl = client.GetVideoWebSocketUrl("video_123", closeOnTerminal: true);
var genericSocketUrl = client.GetAsyncJobWebSocketUrl("video", "video_123");
var resourceSocketUrl = client.AsyncJobs.WebSocketUrl("video", "video_123");
Console.WriteLine(batchSocketUrl);
Console.WriteLine(videoSocketUrl);
Console.WriteLine(genericSocketUrl);
Console.WriteLine(resourceSocketUrl);
Free and paid models
- Models with
:freein the model ID can be called with zero deposited credits. - Paid models require available wallet balance.
Environment variables
PHASEO_API_KEY(required unless passed in code)PHASEO_BASE_URL(optional, defaults tohttps://api.phaseo.app/v1)
Regeneration and local checks
- Regenerate generated client:
pnpm openapi:gen:csharp - Build:
pnpm --filter @phaseo/csharp-sdk build - Test:
pnpm --filter @phaseo/csharp-sdk test
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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. |
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Phaseo.Sdk:
| Package | Downloads |
|---|---|
|
Phaseo.AgentSdk
Official Phaseo Agent SDK for .NET. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.0 | 2,452 | 7/26/2026 |