API Reference
The AI Toolkit provides a set of methods that are the building blocks for your AI integrations. You can call these methods from the AI Toolkit instance:
import { Editor } from '@tiptap/core'
import { AiToolkit, getAiToolkit } from '@tiptap-pro/client-ai-toolkit'
// Get the AI Toolkit instance
const editor = new Editor({ extensions: [AiToolkit] })
const toolkit = getAiToolkit(editor)
// Call an AI Toolkit method
const text = toolkit.getTextRange({ from: 0, to: 100 })Below is a list of the available methods:
Read the document
Extract document content in JSON, HTML, or text formats with support for selections, ranges, and chunked reads.
Edit the document
Insert, stream, and patch AI-generated content in text, HTML, or JSON formats with review options.
Execute tool
Execute AI agent tool calls against a Tiptap editor using the AI Toolkit.
Workflows
API reference for the built-in workflows of the AI Toolkit.
Suggestions
Manage and render AI suggestions with preview and review modes.
Schema awareness
Provide schema awareness to AI models so they understand nodes, marks, and attributes.
Diff utility
Compute changes between two documents programmatically.
Split view
API reference for createSplitView and the SplitView instance methods.