Table of Contents

Class TypeSafeClientOptions

Namespace
TypeSafe.AI.Sdk
Assembly
TypeSafe.AI.Sdk.dll

Client options. Explicit values take precedence over environment variables, then SDK defaults.

public sealed class TypeSafeClientOptions
Inheritance
TypeSafeClientOptions
Inherited Members

Properties

ApiKey

Required API key; falls back to TYPESAFE_API_KEY.

public string? ApiKey { get; set; }

Property Value

string

BaseUrl

API root; falls back to TYPESAFE_BASE_URL, then https://api.typesafe.ai.

public string? BaseUrl { get; set; }

Property Value

string

DefaultHeaders

Additional request headers; per-call headers take precedence.

public IDictionary<string, string>? DefaultHeaders { get; set; }

Property Value

IDictionary<string, string>

DefaultModel

Default model; falls back to TYPESAFE_DEFAULT_MODEL, then jev-latest.

public string? DefaultModel { get; set; }

Property Value

string

HttpMessageHandler

Optional HttpMessageHandler used when the client creates its own HttpClient. Useful for tests.

public HttpMessageHandler? HttpMessageHandler { get; set; }

Property Value

HttpMessageHandler

LogLevel

Log level; falls back to TYPESAFE_LOG_LEVEL, then warn. info logs request summaries; debug adds headers and bodies. Known credential headers are redacted; bodies are not.

public TypeSafeLogLevel? LogLevel { get; set; }

Property Value

TypeSafeLogLevel?

LogLevelText

Raw log-level string (for env-style values such as off).

public string? LogLevelText { get; set; }

Property Value

string

Logger

Logger filtered to LogLevel and above. Default: prefixed console.

public ITypeSafeLogger? Logger { get; set; }

Property Value

ITypeSafeLogger

Retry

Retry overrides; omitted fields use the defaults in RetryPolicy.

public RetryPolicy? Retry { get; set; }

Property Value

RetryPolicy

TimeoutMs

Timeout per attempt in milliseconds, without a total retry budget. Default: 10000.

public int? TimeoutMs { get; set; }

Property Value

int?