Function: createClient()
function createClient(opts?): NlqClient;Defined in: packages/sdk/src/index.ts:1119
Build the typed NlqClient — the only entrypoint consumers call
directly, and the only HTTP surface per GLOBAL-001. Pick exactly one auth
mode at construction (SK-SDK-001): { apiKey } for a server-side bearer
(never ship to a browser bundle — it leaks) or { withCredentials: true }
for a browser cookie session; passing both throws. Omitting both leaves
calls anonymous. The session-only verbs (setByollm / getByollmStatus /
clearByollm) and the byollm option require withCredentials: true and
throw otherwise (SK-SDK-010 / SK-SDK-011). Optional baseUrl and a custom
fetch round out the options.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts |
ClientOptions |