Overview
TheClientOptions interface defines all configuration options available when creating a new Dedalus client instance. These options control authentication, API endpoints, network behavior, and logging.
Type Definition
Properties
Authentication Options
API key for Bearer token authentication.Environment Variable:
DEDALUS_API_KEYAPI key for X-API-Key header authentication.Environment Variable:
DEDALUS_X_API_KEYOrganization ID for request scoping.Environment Variable:
DEDALUS_ORG_IDBYOK (Bring Your Own Key) Options
Provider name for BYOK mode (e.g., “openai”, “anthropic”).Environment Variable:
DEDALUS_PROVIDERProvider API key for BYOK mode.Environment Variable:
DEDALUS_PROVIDER_KEYModel identifier for BYOK provider.Environment Variable:
DEDALUS_PROVIDER_MODELAPI Endpoint Configuration
Specifies the environment to use for the API.Each environment maps to a different base URL:
production→https://api.dedaluslabs.aidevelopment→http://localhost:8080
productionOverride the default base URL for the API.Example:
"https://api.example.com/v2/"Environment Variable: DEDALUS_BASE_URLCannot be used together with
environment. If you want to use the environment setting, pass baseURL: null.Network Configuration
The maximum amount of time (in milliseconds) that the client should wait for a response from the server before timing out a single request.Default:
60000 (1 minute)Unit: millisecondsRequest timeouts are retried by default, so in a worst-case scenario you may wait much longer than this timeout before the promise succeeds or fails.
The maximum number of times that the client will retry a request in case of a temporary failure, like a network error or a 5XX error from the server.Default:
2Additional
RequestInit options to be passed to fetch calls. Properties will be overridden by per-request fetchOptions.Specify a custom
fetch function implementation.If not provided, the client expects that fetch is defined globally.Default Request Options
Default headers to include with every request to the API.These can be removed in individual requests by explicitly setting the header to
null in request options.Default query parameters to include with every request to the API.These can be removed in individual requests by explicitly setting the param to
undefined in request options.Logging Options
Set the log level.Environment Variable:
DEDALUS_LOGDefault: 'warn'Valid Values: 'debug' | 'info' | 'warn' | 'error'Set the logger instance.Default:
globalThis.consoleUsage Example
Environment Variables
The following environment variables are automatically read if the corresponding options are not provided:| Environment Variable | Maps to Option | Description |
|---|---|---|
DEDALUS_API_KEY | apiKey | Bearer token authentication |
DEDALUS_X_API_KEY | xAPIKey | X-API-Key header authentication |
DEDALUS_ORG_ID | organization | Organization ID |
DEDALUS_PROVIDER | provider | BYOK provider name |
DEDALUS_PROVIDER_KEY | providerKey | BYOK provider API key |
DEDALUS_PROVIDER_MODEL | providerModel | BYOK model identifier |
DEDALUS_BASE_URL | baseURL | Custom base URL |
DEDALUS_LOG | logLevel | Logging level |