Skip to Content

CreateAdminClientConfig

type CreateAdminClientConfig = AdminAppLocation & object;

Everything an AdminClient is configured with. Every field is optional.

Type Declaration

apiKey?

apiKey?: | string | AdminApiKeyProvider;

The admin API key, sent as Authorization: Bearer, or a function that returns it for each request. Defaults to the PRETERNATURAL_MODEM_ADMIN_API_KEY environment variable.

gatewayBaseUrl?

gatewayBaseUrl?: string;

Gateway base URL used by models.list() and logs.stream(). Defaults to the PRETERNATURAL_MODEM_GATEWAY_URL env var, then to the environment preset.

onApiKeyExpiry?

onApiKeyExpiry?: AdminApiKeyExpiryObserver;

Called with the key’s expiry whenever a response reports an expiry different from the last one reported. An error it throws is logged and never fails the request.

transport?

transport?: TransportConfig;
Last updated on