Generate Multiple AI Images in Parallel
antix_generate_image_batchSubmit N image generations in ONE tool call so they run IN PARALLEL on fal.ai. Use this whenever the user asks for multiple different scenes / poses / variations at once (e.g. 'generate 5 different Aurora photos: beach, café, gym, library, sunset'). The user composes their list of distinct prompts in chat, you compose final prompts for each, then send them all at once via this tool.
Why this over N sequential generate_image calls:
• Faster — fal processes all items concurrently, so wall time ≈ slowest single item (~15-30s), not N×T.
• Atomic billing — credits for ALL items are charged in a single Firestore transaction. Either every item queues or nothing is charged. No partial charges if credit balance is tight.
• One batchId to track — poll the whole batch with antix_check_batch instead of juggling N taskIds.
• One inline render — antix_check_batch returns a single markdownEmbed string with all N image URLs, so you paste it once and the user sees every result inline.
Inputs:
• items — array of 1-10 generation specs. Each MUST include prompt. Each MAY override aspectRatio, count, model, quality, resolution, style, referenceImage independently.
• Top-level shared params (model, aspectRatio, resolution, quality, style, characterId, referenceImage) — apply to every item that doesn't override. This is the 80% case: 'use gpt-image-2 + 9:16 + Aurora's characterId for all 5 prompts.'
Same reference-resolution priority as generate_image per item:
Explicit per-item
referenceImage→ winsBatch-level
referenceImage→ winsNewest entry in
characterId's gallery (antix_list_character_gallery)character.avatar(legacy)Text-to-image
Returns: batchId, tasks[] (with per-item taskId, prompt, model, cost), totalCredits, creditsRemaining, estimatedSeconds (worst-case wall time), nextStep. Tell the user 'queued N generations in parallel, results in ~Xs.' Then call antix_check_batch once per ~10s until batchStatus: completed.
Limits: max 10 items per batch, max 4 variations (count) per item, so max 40 images per batch. For >10 different prompts, send multiple sequential batches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| model | No | ||
| style | No | ||
| quality | No | ||
| messageId | No | Optional originating chat message id for inline media reconciliation. | |
| projectId | No | AIGE work-project id that should receive pending and completed assets. | |
| sessionId | No | Optional AIGE agent session id within projectId. | |
| resolution | No | ||
| aspectRatio | No | ||
| characterId | No | ||
| idempotencyKey | No | Stable client-generated key. Retrying the same request with the same key must not charge or queue twice. | |
| referenceImage | No | ||
| referenceImages | No |