> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kontext.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install @kontextso/sdk-js via npm or load it from CDN.

> [!NOTE]
>
> You'll need a [publisher account](https://docs.kontext.so/publishers.md#getting-started-is-easy) to obtain your `publisherToken` and placement codes.

## npm

```bash theme={null}
npm install @kontextso/sdk-js@4
```

## CDN

Or load the SDK from our CDN as a global script:

```html theme={null}
<script src="https://server.megabrain.co/sdk/js?type=global&publisherToken={publisherToken}"></script>
```

When loaded via CDN the API is available on `window.KontextSdk`. Replace `{publisherToken}` with your actual token.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.