Configuration for the TypeSafe API client.
Options can be passed directly to ExTypesafe.Client.new/1 or set via environment variables:
| Variable | Configures | Default |
|---|---|---|
TYPESAFE_API_KEY | API key (required) | — |
TYPESAFE_BASE_URL | API root URL | https://api.typesafe.ai |
TYPESAFE_DEFAULT_MODEL | Default model | jev-latest |
Summary
Types
@type t() :: %ExTypesafe.Config{ api_key: String.t(), base_url: String.t(), max_retries: non_neg_integer(), max_retry_delay_ms: non_neg_integer(), model: String.t(), retry_delay_ms: non_neg_integer() }
Functions
Builds a Config from keyword options, falling back to environment variables and then defaults.
Options
:api_key— TypeSafe API key. Falls back toTYPESAFE_API_KEYenv var. Required.:base_url— Base URL for the API. Falls back toTYPESAFE_BASE_URLenv var.:model— Default model to use. Falls back toTYPESAFE_DEFAULT_MODELenv var.:max_retries— Max retry attempts on retryable responses and transport failures (default: 3).:retry_delay_ms— Initial retry delay in ms, doubles each attempt (default: 500).:max_retry_delay_ms— Maximum exponential-backoff delay and acceptedRetry-Aftervalue in ms (default: 5000).