[AIWriteSupporter] Image Generation AI

Release 2.18.0+, 3.0.0+

Note: OpenAI DALL·E ('dalle') integration is discontinued (service ended). Switch to 'gpt-image-1'.

Integrates an image-generation AI (gpt-image-1 or a compatible image-generation API) to generate images for editor content.

1.00

UI

You can add the button that requests an image from the AI to the toolbar, balloon, quick insert, and menu areas. The button name is openImageAI.

Toolbar

// synapeditor.config.js
'editor.toolbar': [ /* ... */ 'openImageAI' ]

1.00

Quick Insert

// synapeditor.config.js
'editor.quickInsert': [ /* ... */ 'openImageAI' ]

1.00

Configuration

Image-AI settings live under the image key.

// URL + API key (unsafe — key visible in browser)
'aiWriteSupporter.config': {
  image: {
    url: 'https://api.openai.com/v1/images/generations',
    apiKey: 'sk-abc123...456xyz'
  }
}

// URL only (recommended — proxy through server)
'aiWriteSupporter.config': {
  image: { url: '/request' }
}

image Configuration Keys

KeyTypeRequiredDefaultDescription
urlstring✓''Sets the URL to send requests to: the OpenAI API address, or a URL you implemented to forward requests to the OpenAI API. If not set, the plugin button is not displayed in the toolbar.
apiKeystring
''Sets the API key issued by OpenAI (https://platform.openai.com/account/api-keys). Using this setting exposes the key in the browser, so it is safer to leave it unset and send requests through a server.
areaSizeobject
{ width: '300px', height: '340px' }Sets the default size of the prompt and preview window (unit: px). Values below the minimum size are displayed at the minimum size. Minimum size: { width: '230px', height: '120px' }.

Prompt / Preview Window Size

You can set the size at which the prompt and preview window appears. If not set, the default ({ width: '300px', height: '340px' }) is applied.

'aiWriteSupporter.config': {
  image: {
    url: '/request',
    areaSize: { width: '550px', height: '220px' }
  }
}
Default sizeCustom size (550px × 220px)
Without areaSize, the prompt and preview window appears at the default size ({ width: '300px', height: '340px' }).With areaSize, the prompt and preview window appears at the configured size ({ width: '550px', height: '220px' }).
areasize_default.pngareasize_custom.png