AI image generation editor command
Available in Start plan
Requirements
Start a free trial or subscribe to the Start plan in your account.
Configure OpenAI in your AI settings or review the Custom LLM guides.
To install the frontend extensions, authenticate to Tiptap’s private npm registry by following the setup guide.
The aiImagePrompt command in Tiptap Content AI enables you to generate images directly within the editor. You can use different OpenAI models and customize the style of the generated images.
To see how this command is used, check out the notion-like template.
Integrate aiImagePrompt
Generates an image based on your prompt and the desired style.
Make sure to load the image extension ('@tiptap/extension-image') in your editor instance.
editor.chain().focus().aiImagePrompt(options: ImageOptions).run()Image command options
With these settings you can control how the image is generated:
| Setting | Type | Default | Definition |
|---|---|---|---|
| modelName | dall-e-2, dall-e-3, null | dall-e-3 | The model used at OpenAI |
| style | photorealistic, digital_art, comic_book, neon_punk, isometric, line_art, 3d_model | photorealistic | Define the image style |
| size | 256x256, 512x512, 1024x1024 | null |