TypeSafeClientOptions
Namespace: TypeSafe.AI.Sdk
public sealed class TypeSafeClientOptionsClient options. Explicit values take precedence over environment variables, then SDK defaults.
Inheritance: object
Properties
Section titled “Properties”ApiKey
Section titled “ApiKey”public string? ApiKey { get; set; }Required API key; falls back to TYPESAFE_API_KEY.
Value: string
BaseUrl
Section titled “BaseUrl”public string? BaseUrl { get; set; }API root; falls back to TYPESAFE_BASE_URL, then https://api.typesafe.ai.
Value: string
Compression
Section titled “Compression”public bool Compression { get; set; }Compress request bodies of 1 KiB or more with zstd. Default: true.
Set to false to send all bodies uncompressed, for example to an API that doesn’t accept compressed requests.
Value: bool
DefaultHeaders
Section titled “DefaultHeaders”public IDictionary<string, string>? DefaultHeaders { get; set; }Additional request headers; per-call headers take precedence.
Value: IDictionary<string, string>
DefaultModel
Section titled “DefaultModel”public string? DefaultModel { get; set; }Default model; falls back to TYPESAFE_DEFAULT_MODEL, then jev-latest.
Value: string
HttpMessageHandler
Section titled “HttpMessageHandler”public HttpMessageHandler? HttpMessageHandler { get; set; }Optional HttpMessageHandler used when the client creates its own HttpClient. Useful for tests.
Value: HttpMessageHandler
LogLevel
Section titled “LogLevel”public TypeSafeLogLevel? LogLevel { get; set; }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.
Value: TypeSafeLogLevel?
LogLevelText
Section titled “LogLevelText”public string? LogLevelText { get; set; }Raw log-level string (for env-style values such as off).
Value: string
Logger
Section titled “Logger”public ITypeSafeLogger? Logger { get; set; }Logger filtered to LogLevel and above. Default: prefixed console.
Value: ITypeSafeLogger
public RetryPolicy? Retry { get; set; }Retry overrides; omitted fields use the defaults in RetryPolicy.
Value: RetryPolicy
TimeoutMs
Section titled “TimeoutMs”public int? TimeoutMs { get; set; }Timeout per attempt in milliseconds, without a total retry budget. Default: 10000.
Value: int?
MIT · Copyright (c) Dario Kondratiuk. · not affiliated with TypeSafe beyond being a client of the public API