@@ -46,7 +46,7 @@ Complete configuration reference for the Image Generation API.
4646** ` SAVE_IMAGES_LOCALLY ` **
4747- Save images to local disk
4848- Default: ` true `
49- - Set to ` false ` when using ` MARKDOWN_EMBED_IMAGES =true` with Open WebUI
49+ - Set to ` false ` when using ` OPENWEBUI_MODE =true` or ` MARKDOWN_EMBED_IMAGES=true `
5050- When ` false ` , images are temporarily written for base64 conversion then deleted
5151
5252### Model Defaults
@@ -58,12 +58,24 @@ Complete configuration reference for the Image Generation API.
5858
5959### Response Configuration
6060
61+ ** ` OPENWEBUI_MODE ` **
62+ - Enable Open WebUI tool integration mode
63+ - Default: ` false `
64+ - When ` true ` :
65+ - Returns ` ["data:image/png;base64,..."] ` (list with data URI)
66+ - OpenWebUI extracts this as a file and displays the image
67+ - Overrides ` response_format ` parameter and ` MARKDOWN_EMBED_IMAGES `
68+ - Works with OpenWebUI's tool response handling
69+ - When ` false ` :
70+ - Normal API behavior based on ` response_format ` parameter
71+ - Requires: OpenWebUI with ` ENABLE_CHAT_RESPONSE_BASE64_IMAGE_URL_CONVERSION=true `
72+
6173** ` MARKDOWN_EMBED_IMAGES ` **
6274- Embed images as base64 data URI in markdown responses
6375- Default: ` false `
64- - When ` true ` : Returns `  `
65- - When ` false ` : Returns `  `
66- - Set to ` true ` for Open WebUI integration with ` ENABLE_CHAT_RESPONSE_BASE64_IMAGE_URL_CONVERSION `
76+ - When ` true ` and ` response_format="markdown" ` : Returns ` {"markdown": " "} `
77+ - When ` false ` and ` response_format="markdown" ` : Returns ` {"markdown": " "} `
78+ - Note: Ignored when ` OPENWEBUI_MODE=true `
6779
6880### Security
6981
@@ -341,3 +353,13 @@ Use after LiteLLM configuration changes.
341353- Verify ` STORAGE_PATH ` has write permissions
342354- Check ` BASE_URL ` matches your deployment
343355- For Docker, ensure volume is mounted correctly
356+
357+ ## Response Format Reference
358+
359+ | ` OPENWEBUI_MODE ` | ` MARKDOWN_EMBED_IMAGES ` | ` response_format ` | Response |
360+ | ------------------| -------------------------| -------------------| ----------|
361+ | ` true ` | (ignored) | (ignored) | ` ["data:image/png;base64,..."] ` |
362+ | ` false ` | ` false ` | ` url ` (default) | ` {"image_url": "http://..."} ` |
363+ | ` false ` | ` false ` | ` base64 ` | ` {"image_base64": "...", "mime_type": "..."} ` |
364+ | ` false ` | ` false ` | ` markdown ` | ` {"markdown": ""} ` |
365+ | ` false ` | ` true ` | ` markdown ` | ` {"markdown": ""} ` |
0 commit comments