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