Image generation editor command

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:

SettingTypeDefaultDefinition
modelNamedall-e-2, dall-e-3, nulldall-e-3The model used at OpenAI
stylephotorealistic, digital_art, comic_book, neon_punk, isometric, line_art, 3d_modelphotorealisticDefine the image style
size256x256, 512x512, 1024x1024null