Skip to main content
Glama

Generate Multiple AI Images in Parallel

antix_generate_image_batch

Submit 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:

  1. Explicit per-item referenceImage → wins

  2. Batch-level referenceImage → wins

  3. Newest entry in characterId's gallery (antix_list_character_gallery)

  4. character.avatar (legacy)

  5. 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

NameRequiredDescriptionDefault
itemsYes
modelNo
styleNo
qualityNo
messageIdNoOptional originating chat message id for inline media reconciliation.
projectIdNoAIGE work-project id that should receive pending and completed assets.
sessionIdNoOptional AIGE agent session id within projectId.
resolutionNo
aspectRatioNo
characterIdNo
idempotencyKeyNoStable client-generated key. Retrying the same request with the same key must not charge or queue twice.
referenceImageNo
referenceImagesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only carry idempotentHint/destructiveHint, so the description does the heavy lifting and does it well: atomic all-or-nothing billing, ~15-30s wall time, the exact return fields (batchId, tasks[], totalCredits, creditsRemaining, estimatedSeconds), and a polling cadence via antix_check_batch. Limits (10 items, 4 variations, 40 images) and the reference-resolution priority chain are disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action, then structured with bold headers and bullets so an agent can skim to the relevant section. Slightly inflated by persuasive framing ('Why this over N sequential...') and duplicated limit/speed claims, but almost every sentence carries operational information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter tool with no output schema, the description compensates by enumerating return fields, polling behavior, billing semantics, and hard limits. Remaining shortfall: `referenceImages`, `idempotencyKey` retry semantics, and the projectId/sessionId asset-routing behavior are left to the schema (or undocumented), which matters for a paid batch operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only 31% schema coverage, the description usefully explains the `items` array (1-10 entries, `prompt` required, per-item overrides), the top-level shared-param inheritance rule, and the five-step reference resolution order. The notable gap is `referenceImages` (plural, up to 10) which appears only in the schema and is never reconciled with the singular `referenceImage` priority chain.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (submit N image generations in parallel) and immediately distinguishes itself from the sequential sibling by contrasting with 'N sequential generate_image calls'. An agent can route between this, antix_generate_image, and antix_check_batch without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger ('use this whenever the user asks for multiple different scenes / poses / variations at once') with a worked example, names the alternative it replaces, and states the boundary condition ('for >10 different prompts, send multiple sequential batches'). When-to-use and when-to-split are both covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources