Skip to main content
POST
/
v1
/
swarm
/
batch
/
completions
[
  {}
]

Headers

x-api-key
string
required

Body

application/json · SwarmSpec · object[]
name
string | null

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

Maximum 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,
HiearchicalSwarm,
auto,
MajorityVoting,
MALT,
DeepResearchSwarm,
CouncilAsAJudge,
InteractiveGroupChat,
HeavySwarm
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.

rules
string | null

Guidelines or constraints that govern the behavior and interactions of the agents within the swarm.

tasks
string[] | null

A list of tasks that the swarm should complete.

messages

A list of messages that the swarm should complete.

stream
boolean | null
default:false

A flag indicating whether the swarm should stream its output.

service_tier
string | null
default:standard

The service tier to use for processing. Options: 'standard' (default) or 'flex' for lower cost but slower processing.

heavy_swarm_loops_per_agent
integer | null
default:1

The number of loops to run per agent in the heavy swarm.

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.

Response

Successful Response

The response is of type Response Run Batch Completions V1 Swarm Batch Completions Post · object[].

I