OptionalbaseOptionalbaseAPI origin. Defaults to production.
OptionalfetchReplacement for the global fetch, e.g. for tests or instrumentation.
OptionalrefreshRefreshes the bearer token proactively before it expires and once more when a request comes back 401, then retries that request.
OptionaltimeoutMilliseconds each request, including refresh waits, retries, and reading
its body, may take before it is aborted with a TimeoutError. Defaults
to 30 000; pass Infinity to disable.
Bearer token: an OAuth access token for an agent, or a workspace API token.
Extra defaults applied to every request (headers, credentials, ...).