generate_image
Create images from text prompts with configurable size, aspect ratio, and seed. Returns PNGs or base64 output for easy integration.
Instructions
Generate new image(s) from a text prompt.
model: which image model to use; omit for the configured default. Currently available: "qwen21"
(Qwen Image 2.1). list_models shows what is installed and ready.
Canvas: give width and height (multiples of 32, default 1024×1024) or an aspect preset:
square, landscape (1344×768), portrait (768×1344), wide (1536×640), tall (640×1536).
seed: omit for random; the seed used is always returned so a result can be reproduced.
steps default 25, cfg default 1.0 (Qwen 2.1 works best at cfg 1.0; a negative prompt only
matters when cfg > 1). count 1-4 images in one run.
save=true writes full-size PNGs to the configured output folder and returns their paths plus
a small preview of each; save=false returns base64 PNG in the text instead of writing files.
Blocks until done (typically 20-60 s). If it returns JSON with a job_id, the server was busy:
use wait_for_job(job_id).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cfg | No | ||
| save | No | ||
| seed | No | ||
| count | No | ||
| model | No | ||
| steps | No | ||
| width | No | ||
| aspect | No | ||
| height | No | ||
| prompt | Yes | ||
| negative | No |