Configuration
Explicit options win, then environment variables, then SDK defaults — same precedence as the JavaScript SDK.
| Option | Environment | Default |
|---|---|---|
ApiKey |
TYPESAFE_API_KEY |
required |
BaseUrl |
TYPESAFE_BASE_URL |
https://api.typesafe.ai |
DefaultModel |
TYPESAFE_DEFAULT_MODEL |
jev-latest |
LogLevel |
TYPESAFE_LOG_LEVEL |
warn |
TimeoutMs |
— | 10000 per attempt |
Retry |
— | 2 retries, 500–5000ms backoff, 25% jitter |
Compression |
— | true |
Client options
Section titled “Client options”using var client = new TypeSafeClient(new TypeSafeClientOptions{ ApiKey = "tsk_...", TimeoutMs = 20_000, Retry = new RetryPolicy { MaxRetries = 4 },});See TypeSafeClientOptions and RetryPolicy.
Retries
Section titled “Retries”Retryable HTTP statuses: 408, 429, 500–599. Connection errors and timeouts retry by default. Retry-After / retry-after-ms are honored up to 60 seconds. Timeout is per attempt — there is no total retry budget.
Compression
Section titled “Compression”Request bodies of 1 KiB or more are compressed with zstd and sent with Content-Encoding: zstd. Smaller bodies are sent as-is. Set Compression = false to send every body uncompressed, for example to an API that doesn’t accept compressed requests.
Per-call overrides
Section titled “Per-call overrides”Pass RequestOptions to override timeout, retry, or headers for a single SystemOneAsync call.
MIT · Copyright (c) Dario Kondratiuk. · not affiliated with TypeSafe beyond being a client of the public API