Interface: TypeSafeClientConfig¶
Client options. Explicit values take precedence over environment variables, then SDK defaults.
Properties¶
apiKey?¶
Required API key; falls back to TYPESAFE_API_KEY.
baseURL?¶
API root; falls back to TYPESAFE_BASE_URL, then https://api.typesafe.ai.
dangerouslyAllowBrowser?¶
Allow browser use, exposing the API key to page users. Default: false.
defaultHeaders?¶
Additional request headers; per-call headers take precedence.
defaultModel?¶
Default model; falls back to TYPESAFE_DEFAULT_MODEL, then jev-latest.
fetch?¶
Custom HTTP fetch implementation for transport configuration or tests. Default: global fetch.
logger?¶
Logger filtered to logLevel and above. Default: prefixed console.
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.
retry?¶
Retry overrides; omitted fields use the defaults in RetryPolicy.
timeout?¶
Timeout per attempt in milliseconds, without a total retry budget. Default: 10000.