Getting started
Install the package and ask your first System One question.
Install
Section titled “Install”dotnet add package TypeSafe.AI.SdkTargets net10.0 and netstandard2.0. Building the library itself requires the .NET 10 SDK.
API key
Section titled “API key”Set TYPESAFE_API_KEY in your environment, or pass apiKey / TypeSafeClientOptions.ApiKey explicitly.
export TYPESAFE_API_KEY=tsk_...Quickstart
Section titled “Quickstart”using TypeSafe.AI.Sdk;
using var client = new TypeSafeClient();var response = await client.SystemOneAsync( new { document = "I was charged twice. Please fix this ASAP." }, ("category", Question.Choice("What is this ticket about?", ("billing", null), ("technical", null), ("other", null))));
Console.WriteLine(response.GetChoice("category").Choice);That mirrors the JavaScript quickstart. Batch independent questions in one SystemOneAsync call.
Sample project
Section titled “Sample project”export TYPESAFE_API_KEY=tsk_...dotnet run --project samples/TypeSafe.AI.Sdk.SampleSee also
Section titled “See also”MIT · Copyright (c) Dario Kondratiuk. · not affiliated with TypeSafe beyond being a client of the public API