Skip to main content
POST
/
v1
/
auto-swarm-builder
/
completions
{
  "success": true,
  "job_id": "<string>",
  "outputs": {},
  "type": "<string>",
  "timestamp": "<string>",
  "usage": {}
}

Headers

x-api-key
string
required

Body

application/json

Schema for the Auto Swarm Builder input configuration.

Attributes: name (Optional[str]): The name of the swarm. description (Optional[str]): A description of the swarm. max_loops (Optional[int]): Maximum number of loops to run (default: 1). return_agents (Optional[bool]): Whether to return agents after building (default: True). model_name (Optional[str]): The model name to use for the swarm (default: "gpt-4.1"). generate_router_config (Optional[bool]): Whether to generate router configuration (default: False). task (Optional[str]): The main task for the swarm (required). max_tokens (Optional[int]): The maximum number of tokens to use for the swarm.

name
string | null

The name of the swarm.

description
string | null

A description of the swarm.

max_loops
integer | null
default:1

Maximum number of loops to run.

return_agents
boolean | null
default:true

Whether to return agents after building.

model_name
string | null
default:gpt-4.1

The model name to use for the swarm.

generate_router_config
boolean | null
default:false

Whether to generate router configuration.

task
string | null

The task for the swarm, if any.

max_tokens
integer | null

The maximum number of tokens to use for the swarm.

Response

Successful Response

Schema for the Auto Swarm Builder API response.

Attributes: success (bool): Whether the swarm was built successfully. job_id (Optional[str]): The job ID of the swarm. outputs (Optional[dict]): The outputs of the auto swarms builder. type (Optional[str]): The type of the swarm execution. timestamp (Optional[str]): The timestamp of the swarm execution. usage (Optional[dict]): The usage statistics of the swarm execution.

success
boolean
required

Whether the swarm was built successfully.

job_id
string | null

The job ID of the swarm.

outputs
object | null

The outputs of the auto swarms builder.

type
string | null
default:auto-swarm-builder

The type of the swarm execution.

timestamp
string | null

The timestamp of the swarm execution.

usage
object | null

The usage of the swarm execution.

I