Getting started
Install the package and ask your first System One question.
Install
dotnet add package TypeSafe.AI.Sdk
Targets net10.0 and netstandard2.0. Building the library itself requires the .NET 10 SDK.
API key
Set TYPESAFE_API_KEY in your environment, or pass apiKey / TypeSafeClientOptions.ApiKey explicitly.
export TYPESAFE_API_KEY=tsk_...
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
export TYPESAFE_API_KEY=tsk_...
dotnet run --project samples/TypeSafe.AI.Sdk.Sample