generate_image
Generate images with automatic provider selection for text-heavy graphics or photorealistic output. Supports custom sizes, reference images, and real-time data grounding.
Instructions
Generate an image using the best available provider.
Automatic Provider Selection: The server analyzes your prompt and automatically selects the best provider:
OpenAI GPT-Image-1 is auto-selected for:
Text-heavy images (menus, posters, infographics)
Comics with dialogue or speech bubbles
Technical diagrams with labels
Marketing materials requiring precise text
Gemini Nano Banana Pro is auto-selected for:
Photorealistic portraits and headshots
Product photography
High resolution (4K) output
Images using reference images for consistency
Real-time data visualization (weather, stocks)
Examples:
"Create a menu card for an Italian restaurant" → OpenAI (text rendering)
"Professional headshot with studio lighting" → Gemini (photorealism)
"Infographic explaining photosynthesis" → OpenAI (diagram + text)
"Product shot of perfume floating on water" → Gemini (product photography)
Override Selection:
Set provider to 'openai' or 'gemini' to override auto-selection.
Args: params: Image generation parameters including prompt and optional settings.
Returns: Formatted response with image path and metadata.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |