Skip to main content
Premium Tier Required: The /v1/swarm/batch/completions endpoint is restricted to Pro, Ultra, and Premium plan subscribers. Free tier users will receive a 403 error. See Premium Endpoints.
Multi-Agent vs Single Agent: This example covers batch processing for multi-agent swarms (/v1/swarm/batch/completions). For batching single agent tasks, see Batch Agent Completions (Single Agent).
Run many swarm jobs in a single API call using /v1/swarm/batch/completions.
This is ideal for:
  • Evaluating the same swarm configuration across many tasks
  • Running different swarm types side‑by‑side
  • Large‑scale research, content generation, or analysis workloads
All requests share the same base URL:

Quick Start: Batch Swarm Completion

Each item in the batch is a full SwarmSpec (the same structure used for /v1/swarm/completions).

Interpreting the Response

The endpoint returns an array of results, one per item in the batch, in the same order as the request. Each entry is leaner than the single-swarm /v1/swarm/completions response — there is no job_id, swarm_type, or execution_time field, and the swarm’s output is under result, not output:
If a swarm in the batch fails, its entry has "status": "error" and a detail message instead of result/usage:
Use swarm_name, status, and usage.billing_info.total_cost for auditing, cost tracking, and monitoring across your batch workloads. Check each entry’s status before reading result — a failed swarm does not raise an HTTP error for the whole batch, it just reports "status": "error" in its own slot.