Skip to content

TypeSafeClientOptions

Namespace: TypeSafe.AI.Sdk

public sealed class TypeSafeClientOptions

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

Inheritance: object

View source

public string? ApiKey { get; set; }

Required API key; falls back to TYPESAFE_API_KEY.

Value: string

View source

public string? BaseUrl { get; set; }

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

Value: string

View source

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

View source

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

Additional request headers; per-call headers take precedence.

Value: IDictionary<string, string>

View source

public string? DefaultModel { get; set; }

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

Value: string

View source

public HttpMessageHandler? HttpMessageHandler { get; set; }

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

Value: HttpMessageHandler

View source

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?

View source

public string? LogLevelText { get; set; }

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

Value: string

View source

public ITypeSafeLogger? Logger { get; set; }

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

Value: ITypeSafeLogger

View source

public RetryPolicy? Retry { get; set; }

Retry overrides; omitted fields use the defaults in RetryPolicy.

Value: RetryPolicy

View source

public int? TimeoutMs { get; set; }

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

Value: int?

View source

MIT · Copyright (c) Dario Kondratiuk. · not affiliated with TypeSafe beyond being a client of the public API