---
title: "Install the Basic AI Generation extension"
description: "Set up Tiptap Basic AI Generation in your editor, including configuring OpenAI keys and JWT authentication for secure AI integration."
canonical_url: "https://tiptap.dev/docs/ai/basic/install"
---

# Install the Basic AI Generation extension

Set up Tiptap Basic AI Generation in your editor, including configuring OpenAI keys and JWT authentication for secure AI integration.

- **1. Activate trial or subscribe**

  Start a [free trial](https://cloud.tiptap.dev/v2?trial=true) or [subscribe to the Start plan](https://cloud.tiptap.dev/v2/billing) in your account.
- **2. Integrate an AI provider**

  Configure OpenAI in your [AI settings](https://cloud.tiptap.dev/v2/cloud/ai) or review the [Custom LLM guide](https://tiptap.dev/docs/ai/basic/custom-llms.md).
- **3. Install from private registry**

  To install the frontend extensions, authenticate to Tiptap’s private npm registry by following the [setup guide](https://tiptap.dev/docs/guides/pro-extensions.md).

This installation guide relies on using the [Tiptap AI backend service](https://cloud.tiptap.dev/v2/cloud/ai). If you want to configure it with your own custom LLM you need to follow [this guide](https://tiptap.dev/docs/ai/basic/custom-llms.md) instead.

## Start your Basic AI Generation app

1. **Activate a plan:** Begin a [free trial or choose a subscription](https://cloud.tiptap.dev/v2/billing).
2. **Configure your AI app.** Add your OpenAI API key to [your app](https://cloud.tiptap.dev/v2/cloud/ai).
3. **Set up authentication:** Sign a token with `aud: "AI"` and the `AI:Generation` permission, then pass it to the extension. See [Authentication](https://tiptap.dev/docs/authentication.md) for how to sign a token.

## Access the private registry

The Basic AI Generation extension is published in Tiptap’s private npm registry. Integrate the extension by following the [private registry guide](https://tiptap.dev/docs/guides/pro-extensions.md). If you already authenticated your Tiptap account you can go straight to [#Install](#install).

## Install

```bash
npm install @tiptap-pro/extension-ai
```

The integration into your editor instance is done like every other Tiptap extension. This is an example on how it could look like:

```js
import { Editor } from '@tiptap/core'
import StarterKit from '@tiptap/starter-kit'
import Ai from '@tiptap-pro/extension-ai'

const editor = new Editor({
  extensions: [
    StarterKit,
    Ai.configure({
      // This needs to be your signed token and MUST NOT be the OpenAI API key!
      token: 'TOKEN_HERE',
      autocompletion: true,
      // … other options (see below)
    }),
    // … more extensions
  ],
})
```

At this point you're good to go to use OpenAI in your Tiptap editor. Have a look at the [configuration options](https://tiptap.dev/docs/ai/basic/configure.md) to customize your experience.

The previous App ID and secret (HS256) flow still works and is documented under [Legacy authentication](https://tiptap.dev/docs/authentication/legacy.md).

## Privacy and data handling

Learn how Tiptap processes AI requests and handles your content data in our [privacy documentation](https://tiptap.dev/docs/ai/basic/privacy.md). This covers data retention, security practices, and compliance information for using Basic AI Generation features.
