Skip to main content

Nuclia JavaScript SDK guide


Vanilla JS

The Nuclia SDK is provided as a UMD module. It exposes a NucliaSDK object, giving access to its different classes.

<script src=""></script>
<script src=""></script>
const nuclia = new NucliaSDK.Nuclia({
backend: '',
zone: 'europe-1',

With a build tool

The Nuclia SDK is also provided as an ESM module that you can load as an NPM dependency in your project:

npm install @nuclia/core


yarn add @nuclia/core

Then you can import it into your JavaScript or TypeScript code:

import { Nuclia } from '@nuclia/core';


const Nuclia = require('@nuclia/sdk');

With NodeJS

This SDK can work in NodeJS by providing some polyfills for localStorage and fetch:

const { Nuclia } = require('@nuclia/core');

const nuclia = new Nuclia({
backend: '',
zone: 'europe-1',
knowledgeBox: '<YOUR-KB-ID>',