batch_generate
Start non-blocking batch image generation from up to 20 text prompts and receive a batch ID immediately; poll batch progress to retrieve finished image file paths.
Instructions
Start a batch image generation (returns immediately, does NOT block).
Returns a batch_id immediately. Images generate in the background.
IMPORTANT WORKFLOW:
Call batch_generate → returns batch_id
WAIT 50 SECONDS before calling check_batch_progress (images need time to generate)
Call check_batch_progress(batch_id) — if still in_progress, WAIT another 50 seconds and repeat
When status is "completed", the response contains all results and file paths
Do NOT call check_batch_progress immediately — always wait 50 seconds between calls.
Each prompt should follow the same rules as generate_image: natural language prose, subject first, explicit lighting, 30-80 words each, no quality tags.
Args: prompts: List of natural language text prompts (max 20). Each prompt should be descriptive prose, not comma-separated tags. output_dir: Directory to save all images. Provide a path appropriate for the user's project. width: Width for all images in pixels. height: Height for all images in pixels. aspect_ratio: Aspect ratio shortcut for all images. FLUX Klein supports up to 4K (e.g. "16:9_4k"). num_inference_steps: Steps for all images. guidance_scale: CFG scale for all images. seeds: List of seeds (must match prompts length if provided). max_concurrent: Override concurrent limit (auto-detected if omitted). format: Output image format for all images. Options: "png" (default), "jpg", "webp". Choose based on context.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompts": "<prompts>",
"output_dir": "<output_dir>"
},
"name": "batch_generate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seeds | No | ||
| width | No | ||
| format | No | png | |
| height | No | ||
| prompts | Yes | ||
| output_dir | Yes | ||
| aspect_ratio | No | ||
| guidance_scale | No | ||
| max_concurrent | No | ||
| num_inference_steps | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |