> ## 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.

# JavaScript SDK

> A lightweight JavaScript SDK that lets you integrate Kontext ads into any web app.

<Card title="JavaScript Demo" icon="github" href="https://github.com/kontextso/sdk-js-demo">
  See how easy it is to integrate high-performance ads into your web app using our lightweight SDK.
</Card>

## Requirements

* A modern browser environment (the SDK is framework-agnostic — works in static pages, custom chat UIs, or any SPA).

<Note>
  You'll need a [publisher account](/publishers#getting-started-is-easy) to obtain your `publisherToken` and placement codes.
</Note>

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/sdk/js/installation">
    Install via npm or load from CDN.
  </Card>

  <Card title="Showing your first ad" icon="rocket" href="/sdk/js/first-ad">
    Create a session, feed messages, mount an ad — the 5-minute integration.
  </Card>

  <Card title="API reference" icon="book" href="/sdk/js/api">
    `createSession`, `Session`, `Ad`, and the full event list.
  </Card>

  <Card title="Guides" icon="signs-post" href="/sdk/js/guides">
    Patterns and recipes: no-fill, character switching, restoring history, and more.
  </Card>

  <Card title="Example app" icon="github" href="/sdk/js/example">
    Run the Vite demo end-to-end against your own publisher token.
  </Card>
</CardGroup>
