Install the AI Generation extension
This installation guide relies on using the Tiptap Content AI backend service, if you want to configure it with your own custom LLM you need to follow this guide instead.
Start your Content AI app
- Activate a plan: Begin a free trial or choose a subscription.
- Configure your AI app. Add your OpenAI API key to your Content AI app.
- Set up authentication: Sign a token with
aud: "AI"and theAI:Generationpermission, then pass it to the extension. See Authentication for how to sign a token.
Access the private registry
The AI Generation extension is published in Tiptap’s private npm registry. Integrate the extension by following the private registry guide. If you already authenticated your Tiptap account you can go straight to #Install.
Install
npm install @tiptap-pro/extension-aiThe integration into your editor instance is done like every other Tiptap extension. This is an example on how it could look like:
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 to customize your experience.
The previous App ID and secret (HS256) flow still works and is documented under Legacy authentication.
Privacy and data handling
Learn how Tiptap processes AI requests and handles your content data in our privacy documentation. This covers data retention, security practices, and compliance information for using Content AI features.