generate_image
Generate images from text prompts using 47+ AI models. Supports model selection, aspect ratio options, and async generation for long tasks.
Instructions
Generate an image using kie.ai (47+ models). Downloads to kie/assets/raw/. MODEL GUIDE: Architecture/blueprints→gpt4o or nano-banana-2 (reasoning). Game art/3D→seedream/4.5 or 5-lite. Character sheets→ideogram/character. Text/logos→ideogram/v3 (best text). Photo editing→flux-kontext-pro. Anime→qwen (3cr cheapest). Fast drafts→nano-banana-2-lite (4cr, ~4s, NEW). Upscale→recraft/crisp-upscale (2cr). BG removal→recraft/remove-background. Cheapest→z-image,qwen (3cr). Best quality→nano-banana-pro (24cr), flux-kontext-max (100cr). Use list_models filter="use-case" to explore.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Set false to submit and return immediately with the task_id (async mode) — then poll with check_task and fetch with download_result. Recommended for long generations to avoid client-side watchdog timeouts. | |
| model | No | Model ID. Use list_models to see all available models and their options. | gpt4o |
| prompt | Yes | Text prompt describing the image to generate | |
| filename | No | Output filename (saved to kie/assets/raw/). Auto-generated if omitted. | |
| image_urls | No | Reference/input image URLs for image-to-image models | |
| aspect_ratio | No | Aspect ratio (valid values depend on model — see list_models). Common: 1:1, 2:3, 3:2, 16:9, 9:16, 4:3, 3:4 | 2:3 |
| download_dir | No | Absolute directory to save the file(s) into (created if missing). Defaults to the server's kie/assets/raw/. Must be absolute — the MCP server's working directory is not the caller's. | |
| model_options | No | Model-specific options (quality, resolution, seed, negative_prompt, etc). Use list_models to see available options per model. | |
| max_wait_seconds | No | Override the blocking-mode polling budget in seconds (defaults: image 600, video 900, audio 300, speech 300). Ignored when wait=false. |