Image Generation
Theimage_generate tool lets the agent create and edit images using your configured providers. Generated images are delivered automatically as media attachments in the agent’s reply.
The tool only appears when at least one image generation provider is available. If you don’t see
image_generate in your agent’s tools, configure agents.defaults.imageGenerationModel or set up a provider API key.Quick start
- Set an API key for at least one provider (for example
OPENAI_API_KEYorGEMINI_API_KEY). - Optionally set your preferred model:
- Ask the agent: “Generate an image of a friendly lobster mascot.”
image_generate automatically. No tool allow-listing needed — it’s enabled by default when a provider is available.
Supported providers
Use
action: "list" to inspect available providers and models at runtime:
Tool parameters
Not all providers support all parameters. When a fallback provider supports a nearby geometry option instead of the exact requested one, Velaclaw remaps to the closest supported size, aspect ratio, or resolution before submission. Truly unsupported overrides are still reported in the tool result.
Tool results report the applied settings. When Velaclaw remaps geometry during provider fallback, the returned
size, aspectRatio, and resolution values reflect what was actually sent, and details.normalization captures the requested-to-applied translation.
Configuration
Model selection
Provider selection order
When generating an image, Velaclaw tries providers in this order:modelparameter from the tool call (if the agent specifies one)imageGenerationModel.primaryfrom configimageGenerationModel.fallbacksin order- Auto-detection — uses auth-backed provider defaults only:
- current default provider first
- remaining registered image-generation providers in provider-id order
- Auto-detection is auth-aware. A provider default only enters the candidate list when Velaclaw can actually authenticate that provider.
- Auto-detection is enabled by default. Set
agents.defaults.mediaGenerationAutoProviderFallback: falseif you want image generation to use only the explicitmodel,primary, andfallbacksentries. - Use
action: "list"to inspect the currently registered providers, their default models, and auth env-var hints.
Image editing
OpenAI, Google, fal, MiniMax, and ComfyUI support editing reference images. Pass a reference image path or URL:images parameter. fal, MiniMax, and ComfyUI support 1.
MiniMax image generation is available through both bundled MiniMax auth paths:
minimax/image-01for API-key setupsminimax-portal/image-01for OAuth setups
Provider capabilities
Related
- Tools Overview — all available agent tools
- fal — fal image and video provider setup
- ComfyUI — local ComfyUI and Comfy Cloud workflow setup
- Google (Gemini) — Gemini image provider setup
- MiniMax — MiniMax image provider setup
- OpenAI — OpenAI Images provider setup
- Vydra — Vydra image, video, and speech setup
- Configuration Reference —
imageGenerationModelconfig - Models — model configuration and failover