TypeScript SDKReference
Client Types
TypeScript types for Skytells client configuration, retry options, and runtime modes.
SDK-Specific Configuration: All client types are SDK-specific — they control SDK behavior, not API request parameters. See Client for initialization and configuration.
ClientOptions
interface ClientOptions {
baseUrl?: string;
timeout?: number;
headers?: Record<string, string>;
retry?: RetryOptions;
fetch?: typeof fetch;
runtime?: SkytellsRuntime;
orchestratorApiKey?: string;
orchestratorBaseUrl?: string;
}| Parameter | Type | Default | Description |
|---|---|---|---|
baseUrl | string | 'https://api.skytells.ai/v1' | Override the Inference API base URL. |
timeout | number | 60000 | Request timeout in ms. Defaults to 25000 in edge mode. |
headers | Record<string, string> | — | Custom headers merged into every request. |
retry | RetryOptions | — | Retry config for non-streaming requests. See Reliability. |
fetch | typeof fetch | — | Custom fetch implementation. |
runtime | SkytellsRuntime | 'default' | Runtime mode: 'default' · 'edge' · 'node' · 'browser'. |
orchestratorApiKey | string | — | Orchestrator wfb_… key. Required for client.orchestrator. See Orchestrator. |
orchestratorBaseUrl | string | 'https://orchestrator.skytells.ai' | Override the Orchestrator base URL. |
RetryOptions
interface RetryOptions {
retries?: number;
retryDelay?: number;
retryOn?: number[];
}| Parameter | Type | Default | Description |
|---|---|---|---|
retries | number | 0 | Retry attempts after first failure. |
retryDelay | number | 1000 | Base delay (ms). Linear backoff: delay × (attempt + 1). |
retryOn | number[] | [429, 500, 502, 503, 504] | HTTP status codes that trigger retry. |
SkytellsRuntime
type SkytellsRuntime = 'default' | 'edge' | 'node' | 'browser'Determines SDK behavior for timeouts, caching, and environment detection.
| Mode | Description |
|---|---|
'default' | Auto-detects environment. |
'edge' | Optimized for edge runtimes (Vercel, Cloudflare Workers). Reduces timeout to 25s, smaller model cache. |
'node' | Forces Node.js-specific optimizations. |
'browser' | Browser-only mode (no Node.js APIs). |
See Reliability for runtime configuration.
How is this guide?