[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.

UI
The button name is openImageAI.
Toolbar
// synapeditor.config.js
'editor.toolbar': [ /* ... */ 'openImageAI' ]
Quick Insert
// synapeditor.config.js
'editor.quickInsert': [ /* ... */ 'openImageAI' ]
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
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | ✓ | '' | OpenAI image-generation URL or your wrapper. Button hidden when empty. |
apiKey | string | '' | OpenAI key. Browser-exposed — prefer server proxy. | |
areaSize | object | { width: '300px', height: '340px' } | Prompt / preview window size. Min { width: '230px', height: '120px' }. |
Prompt / Preview Window Size
'aiWriteSupporter.config': {
image: {
url: '/request',
areaSize: { width: '550px', height: '220px' }
}
}
| Default size | Custom size (550px × 220px) |
|---|---|