SDKs
Node.js SDK
There is no separate "Node.js SDK" package — it is @cognitiondesk/client, the same SDK the widget uses internally. Works in Node and any bundler.
Shell
npm install @cognitiondesk/clientJavaScript
import { createCognitionDeskClient } from '@cognitiondesk/client';
const client = createCognitionDeskClient({
apiKey: process.env.COGNITIONDESK_API_KEY, // backendUrl is optional, defaults to api.cognitiondesk.com
});
const text = await client.invokeAssistantText({
assistantId: 'YOUR_ASSISTANT_ID',
prompt: 'Summarize this document in 3 bullets',
});