Skip to main content
POST
Execute Batch Swarm Completions

Headers

x-api-key
string
required

Body

application/json
name
string | null

The name of the swarm, which serves as an identifier for the group of agents and their collective task.

Maximum string length: 100
description
string | null

A comprehensive description of the swarm's objectives, capabilities, and intended outcomes.

agents
AgentSpec · object[] | null

A list of agents or specifications that define the agents participating in the swarm.

max_loops
integer | null
default:1

The maximum number of execution loops allowed for the swarm, enabling repeated processing if needed.

swarm_type
enum<string> | null

The classification of the swarm, indicating its operational style and methodology.

Available options:
AgentRearrange,
MixtureOfAgents,
SequentialWorkflow,
ConcurrentWorkflow,
GroupChat,
MultiAgentRouter,
AutoSwarmBuilder,
HierarchicalSwarm,
auto,
MajorityVoting,
CouncilAsAJudge,
HeavySwarm,
BatchedGridWorkflow,
LLMCouncil,
DebateWithJudge,
RoundRobin,
PlannerWorkerSwarm
rearrange_flow
string | null

Instructions on how to rearrange the flow of tasks among agents, if applicable.

task
string | null

The specific task or objective that the swarm is designed to accomplish.

img
string | null

An optional image URL that may be associated with the swarm's task or representation.

tasks
string[] | null

A list of tasks that the swarm should complete.

messages
object
stream
boolean | null
default:false

A flag indicating whether the swarm should stream its output.

heavy_swarm_question_agent_model_name
string | null
default:gpt-4.1

The model name to use for the question agent in the heavy swarm.

heavy_swarm_worker_model_name
string | null
default:claude-sonnet-4-20250514

The model name to use for the worker agent in the heavy swarm.

heavy_swarm_variant
string | null
default:default

For HeavySwarm: which agent variant to run. One of 'default', 'medium', or 'heavy'.

council_judge_model_name
string | null
default:gpt-5.4

For CouncilAsAJudge: the model name used by the judge that delivers the final ruling.

chairman_model
string | null
default:gpt-5.1

For LLMCouncil: the model name used by the chairman that synthesizes the council's responses.

multi_agent_collab_prompt
boolean | null
default:true

Inject the multi-agent collaboration prompt so agents coordinate with one another. Set False to disable.

heavy_swarm_max_loops
integer | null
default:1

For HeavySwarm: the maximum number of loops each agent in the heavy swarm may run.

list_all_agents
boolean | null
default:false

Whether to list all agents and their descriptions to one another so each agent is aware of the others.

Response

Successful Response