generate_image
Creates images from text prompts using AI models, returning base64-encoded image data with MIME type for display or saving. Supports custom dimensions, styles, quality, and negative prompts.
Instructions
Generate images from text prompts using various AI models. Returns base64-encoded image data with MIME type information.
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": {
"prompt": "<prompt>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Seed for reproducible generation | |
| model | No | Model to use (default: auto-select based on prompt) | |
| style | No | Style modifier (e.g., "photorealistic", "anime", "oil painting") | |
| width | No | Image width (must be multiple of 8) | |
| height | No | Image height (must be multiple of 8) | |
| prompt | Yes | Text prompt describing the image to generate | |
| quality | No | Quality preset | standard |
| num_images | No | Number of images to generate | |
| display_mode | No | How to return the image: display (show image), save (return base64 for saving), both (show image and provide base64) | display |
| negative_prompt | No | What to avoid in the generation |