comfyui_get_image
Download generated images from ComfyUI as base64 data or direct URL, with optional server-side thumbnails to reduce payload.
Instructions
Download a generated image from ComfyUI or return a direct view URL.
Returns:
Base64-encoded image data with content type prefix, or a direct image URL.
When response_format='data_uri' and preview_format is set, ComfyUI re-encodes
the image server-side as a smaller webp or jpeg thumbnail.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filename": "<filename>"
},
"name": "comfyui_get_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Name of the image file to retrieve | |
| subfolder | No | Subfolder within ComfyUI's output directory. Use the subfolder value from comfyui_list_outputs or generation results. | |
| preview_format | No | If set with response_format='data_uri', request a server-rendered thumbnail in this format instead of the original (smaller payload, lossy). | |
| preview_quality | No | Encoder quality (1-100) for preview_format. Default: 90 when preview_format is set. | |
| response_format | No | 'data_uri' to inline the image, or 'url' to return a /view URL | data_uri |
| base_url_override | No | Optional override for URL responses; falls back to configured base URL |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |