generate_image
Create PNG images from text prompts, optionally guided by reference images, and save them to disk. Uses OpenAI Images API with automatic fallback to local ComfyUI when rate-limited or unavailable.
Instructions
Generates a PNG image and saves it to disk. Tries the OpenAI Images API first (when OPENAI_API_KEY is set); when it is rate-limited or unavailable, falls back automatically to Qwen-Image 2.1 on the local ComfyUI server. Returns the file paths and the backend used.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | portrait (default): 1024x1536 on OpenAI, 768x1376 on ComfyUI. square: 1:1. landscape: the portrait sizes rotated. | |
| output | No | Folder or .png file to save to. Default: the image folder, in a subfolder per day. | |
| prompt | Yes | What the image must contain. English works best. | |
| backend | No | auto (default): OpenAI, then ComfyUI when OpenAI is rate-limited or unavailable. openai / comfyui: only that backend. | |
| quality | No | OpenAI only. Default: the model default. | |
| variants | No | How many variants (default 1). | |
| references | No | Paths to reference images (character, place, style); with them the image is made by editing. |