Skip to main content

Interface: LibreTranslateClientOptions

Defined in: src/client.ts:20

Properties​

apiKey?​

optional apiKey?: string

Defined in: src/client.ts:24

The API key, for instances that issue keys (e.g. libretranslate.com). Sent in every request body.


baseUrl​

baseUrl: string

Defined in: src/client.ts:22

The instance URL, with its base path if any (e.g. http://localhost:5000, https://example.com/lt).


fetch?​

optional fetch?: (input, init?) => Promise<Response>

Defined in: src/client.ts:28

An alternative fetch (tests, proxy).

Parameters​

input​

string | URL | Request

init?​

RequestInit

Returns​

Promise<Response>


timeoutMs?​

optional timeoutMs?: number

Defined in: src/client.ts:26

Timeout per request, in ms (default 60000; 0 or Infinity turn it off).