DeeplClient

constructor(authKey: String, httpClientEngine: HttpClientEngine = defaultHttpClientEngine, apiUrl: String? = null, retryConfig: RetryConfig.() -> Unit? = null)(source)

Parameters

authKey

Your DeepL API auth token (including the “:fx” suffix for free tokens!).

httpClientEngine

Ktor HttpClientEngine to use for web requests. Default varies per build target.

apiUrl

The base URL where the DeepL API is hosted. Default is the official endpoint and auto-selects between free or pro endpoints.

retryConfig

Builder function for changing the way DeeplClient retries failed requests. Requests with a status < 400 are never retried. See RetryConfig for more info.