generate_image
Generate an image from a text prompt via MeiGen, local ComfyUI, or OpenAI-compatible APIs, optionally using public reference image URLs for style guidance.
Instructions
Generate an image using AI. Supports MeiGen platform, local ComfyUI, or OpenAI-compatible APIs. Tip: get prompts from get_inspiration() or enhance_prompt(), and use gallery image URLs as referenceImages for style guidance.
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 |
|---|---|---|---|
| size | No | Image size for OpenAI-compatible providers: "1024x1024", "1536x1024", "auto". MeiGen/ComfyUI: use aspectRatio instead. | |
| model | No | Model name. For OpenAI-compatible: gpt-image-1.5, dall-e-3, etc. For MeiGen: use model IDs from list_models. | |
| prompt | Yes | The image generation prompt | |
| quality | No | Image quality for OpenAI-compatible providers: "low", "medium", "high" | |
| provider | No | Which provider to use. Auto-detected from configuration if not specified. | |
| workflow | No | ComfyUI workflow name to use (from comfyui_workflow list). Uses default workflow if not specified. | |
| aspectRatio | No | Aspect ratio: "1:1", "3:4", "4:3", "16:9", "9:16". For MeiGen provider. ComfyUI: use comfyui_workflow modify to adjust dimensions before generating. | |
| negativePrompt | No | Negative prompt for OpenAI-compatible providers. ComfyUI: use comfyui_workflow modify to set negative prompt in the workflow before generating. | |
| referenceImages | No | Public image URLs (http/https) for style/content guidance. Sources: gallery image URLs from search_gallery/get_inspiration, Image URLs from previous generate_image results, or URLs from upload_reference_image. Local file paths are NOT supported — use upload_reference_image to convert local files to URLs first. Works with all providers: MeiGen, OpenAI (gpt-image-1.5), ComfyUI (requires LoadImage node in workflow). |