Default

Root

get
Responses
200
Successful Response
application/json
Responseany
get
GET / HTTP/1.1
Host: 
Accept: */*
200

Successful Response

No content

Health

get
Header parameters
x-api-keystringRequired
Responses
200
Successful Response
application/json
get
GET /health HTTP/1.1
Host: 
x-api-key: text
Accept: */*
{
  "status": "ok"
}

Check Swarm Types

get

Check the available swarm types.

Header parameters
x-api-keystringRequired
Responses
200
Successful Response
application/json
get
GET /v1/swarms/available HTTP/1.1
Host: 
x-api-key: text
Accept: */*
{
  "success": true,
  "swarm_types": null
}

Run Swarm

post

Run a swarm with the specified task.

Header parameters
x-api-keystringRequired
Body
nameany ofOptional

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

string · max: 100Optional
or
nullOptional
descriptionany ofOptional

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

stringOptional
or
nullOptional
agentsany ofOptional

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

or
nullOptional
max_loopsany ofOptional

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

Default: 1
integerOptional
or
nullOptional
swarm_typeany ofOptional

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

string · enumOptionalPossible values:
or
nullOptional
rearrange_flowany ofOptional

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

stringOptional
or
nullOptional
taskany ofOptional

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

stringOptional
or
nullOptional
imgany ofOptional

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

stringOptional
or
nullOptional
return_historyany ofOptional

A flag indicating whether the swarm should return its execution history along with the final output.

Default: true
booleanOptional
or
nullOptional
rulesany ofOptional

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

stringOptional
or
nullOptional
tasksany ofOptional

A list of tasks that the swarm should complete.

string[]Optional
or
nullOptional
messagesany ofOptional

A list of messages that the swarm should complete.

or
or
nullOptional
streamany ofOptional

A flag indicating whether the swarm should stream its output.

Default: false
booleanOptional
or
nullOptional
service_tierany ofOptional

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

Default: standard
stringOptional
or
nullOptional
heavy_swarm_loops_per_agentany ofOptional

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

Default: 1
integerOptional
or
nullOptional
heavy_swarm_question_agent_model_nameany ofOptional

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

Default: gpt-4.1
stringOptional
or
nullOptional
heavy_swarm_worker_model_nameany ofOptional

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

Default: claude-3-5-sonnet-20240620
stringOptional
or
nullOptional
Responses
200
Successful Response
application/json
post
POST /v1/swarm/completions HTTP/1.1
Host: 
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 723

{
  "name": "text",
  "description": "text",
  "agents": [
    {
      "agent_name": "text",
      "description": "text",
      "system_prompt": "text",
      "model_name": "gpt-4o-mini",
      "auto_generate_prompt": false,
      "max_tokens": 8192,
      "temperature": 0.5,
      "role": "worker",
      "max_loops": 1,
      "tools_list_dictionary": [
        {
          "ANY_ADDITIONAL_PROPERTY": "anything"
        }
      ],
      "mcp_url": "text",
      "streaming_on": false
    }
  ],
  "max_loops": 1,
  "swarm_type": "AgentRearrange",
  "rearrange_flow": "text",
  "task": "text",
  "img": "text",
  "return_history": true,
  "rules": "text",
  "tasks": [
    "text"
  ],
  "messages": [
    {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ],
  "stream": false,
  "service_tier": "standard",
  "heavy_swarm_loops_per_agent": 1,
  "heavy_swarm_question_agent_model_name": "gpt-4.1",
  "heavy_swarm_worker_model_name": "claude-3-5-sonnet-20240620"
}
{
  "job_id": "text",
  "status": "text",
  "swarm_name": "text",
  "description": "text",
  "swarm_type": "text",
  "output": null,
  "number_of_agents": 1,
  "service_tier": "text",
  "execution_time": 1,
  "usage": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}

Run Agent

post

Run an agent with the specified task.

Header parameters
x-api-keystringRequired
Body
agent_configany ofOptional

The configuration of the agent to be completed.

or
nullOptional
taskany ofOptional

The task to be completed by the agent.

stringOptional
or
nullOptional
historyany ofOptional

The history of the agent's previous tasks and responses. Can be either a dictionary or a list of message objects.

or
or
nullOptional
imgany ofOptional

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

stringOptional
or
nullOptional
imgsany ofOptional

A list of image URLs that may be associated with the agent's task or representation.

string[]Optional
or
nullOptional
streamany ofOptional

A flag indicating whether the agent should stream its output.

Default: false
booleanOptional
or
nullOptional
Responses
200
Successful Response
application/json
post
POST /v1/agent/completions HTTP/1.1
Host: 
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 414

{
  "agent_config": {
    "agent_name": "text",
    "description": "text",
    "system_prompt": "text",
    "model_name": "gpt-4o-mini",
    "auto_generate_prompt": false,
    "max_tokens": 8192,
    "temperature": 0.5,
    "role": "worker",
    "max_loops": 1,
    "tools_list_dictionary": [
      {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      }
    ],
    "mcp_url": "text",
    "streaming_on": false
  },
  "task": "text",
  "history": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "img": "text",
  "imgs": [
    "text"
  ],
  "stream": false
}
{
  "id": "text",
  "success": true,
  "name": "text",
  "description": "text",
  "temperature": 1,
  "outputs": null,
  "usage": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "timestamp": "text"
}

Run Agent Batch

post

Run a batch of agents with the specified tasks using a thread pool.

Header parameters
x-api-keystringRequired
Bodyobject · AgentCompletion[]
agent_configany ofOptional

The configuration of the agent to be completed.

or
nullOptional
taskany ofOptional

The task to be completed by the agent.

stringOptional
or
nullOptional
historyany ofOptional

The history of the agent's previous tasks and responses. Can be either a dictionary or a list of message objects.

or
or
nullOptional
imgany ofOptional

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

stringOptional
or
nullOptional
imgsany ofOptional

A list of image URLs that may be associated with the agent's task or representation.

string[]Optional
or
nullOptional
streamany ofOptional

A flag indicating whether the agent should stream its output.

Default: false
booleanOptional
or
nullOptional
Responses
200
Successful Response
application/json
post
POST /v1/agent/batch/completions HTTP/1.1
Host: 
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 416

[
  {
    "agent_config": {
      "agent_name": "text",
      "description": "text",
      "system_prompt": "text",
      "model_name": "gpt-4o-mini",
      "auto_generate_prompt": false,
      "max_tokens": 8192,
      "temperature": 0.5,
      "role": "worker",
      "max_loops": 1,
      "tools_list_dictionary": [
        {
          "ANY_ADDITIONAL_PROPERTY": "anything"
        }
      ],
      "mcp_url": "text",
      "streaming_on": false
    },
    "task": "text",
    "history": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "img": "text",
    "imgs": [
      "text"
    ],
    "stream": false
  }
]
{
  "batch_id": "text",
  "total_requests": 1,
  "results": null,
  "execution_time": 1,
  "timestamp": "text"
}

Run Batch Completions

post

Run a batch of swarms with the specified tasks using a thread pool.

Header parameters
x-api-keystringRequired
Bodyobject · SwarmSpec[]
nameany ofOptional

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

string · max: 100Optional
or
nullOptional
descriptionany ofOptional

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

stringOptional
or
nullOptional
agentsany ofOptional

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

or
nullOptional
max_loopsany ofOptional

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

Default: 1
integerOptional
or
nullOptional
swarm_typeany ofOptional

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

string · enumOptionalPossible values:
or
nullOptional
rearrange_flowany ofOptional

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

stringOptional
or
nullOptional
taskany ofOptional

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

stringOptional
or
nullOptional
imgany ofOptional

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

stringOptional
or
nullOptional
return_historyany ofOptional

A flag indicating whether the swarm should return its execution history along with the final output.

Default: true
booleanOptional
or
nullOptional
rulesany ofOptional

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

stringOptional
or
nullOptional
tasksany ofOptional

A list of tasks that the swarm should complete.

string[]Optional
or
nullOptional
messagesany ofOptional

A list of messages that the swarm should complete.

or
or
nullOptional
streamany ofOptional

A flag indicating whether the swarm should stream its output.

Default: false
booleanOptional
or
nullOptional
service_tierany ofOptional

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

Default: standard
stringOptional
or
nullOptional
heavy_swarm_loops_per_agentany ofOptional

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

Default: 1
integerOptional
or
nullOptional
heavy_swarm_question_agent_model_nameany ofOptional

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

Default: gpt-4.1
stringOptional
or
nullOptional
heavy_swarm_worker_model_nameany ofOptional

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

Default: claude-3-5-sonnet-20240620
stringOptional
or
nullOptional
Responses
200
Successful Response
application/json
post
POST /v1/swarm/batch/completions HTTP/1.1
Host: 
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 725

[
  {
    "name": "text",
    "description": "text",
    "agents": [
      {
        "agent_name": "text",
        "description": "text",
        "system_prompt": "text",
        "model_name": "gpt-4o-mini",
        "auto_generate_prompt": false,
        "max_tokens": 8192,
        "temperature": 0.5,
        "role": "worker",
        "max_loops": 1,
        "tools_list_dictionary": [
          {
            "ANY_ADDITIONAL_PROPERTY": "anything"
          }
        ],
        "mcp_url": "text",
        "streaming_on": false
      }
    ],
    "max_loops": 1,
    "swarm_type": "AgentRearrange",
    "rearrange_flow": "text",
    "task": "text",
    "img": "text",
    "return_history": true,
    "rules": "text",
    "tasks": [
      "text"
    ],
    "messages": [
      {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      }
    ],
    "stream": false,
    "service_tier": "standard",
    "heavy_swarm_loops_per_agent": 1,
    "heavy_swarm_question_agent_model_name": "gpt-4.1",
    "heavy_swarm_worker_model_name": "claude-3-5-sonnet-20240620"
  }
]
[
  {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
]

Run Reasoning Agent Completions

post

Run a reasoning agent with the specified task.

Header parameters
x-api-keystringRequired
Body
agent_nameany ofOptional

The unique name assigned to the reasoning agent.

Default: reasoning-agent
stringOptional
or
nullOptional
descriptionany ofOptional

A detailed explanation of the reasoning agent's purpose and capabilities.

Default: A reasoning agent that can answer questions and help with tasks.
stringOptional
or
nullOptional
model_nameany ofOptional

The name of the AI model that the reasoning agent will utilize.

Default: claude-3-5-sonnet-20240620
stringOptional
or
nullOptional
system_promptany ofOptional

The initial instruction or context provided to the reasoning agent.

stringOptional
or
nullOptional
max_loopsany ofOptional

The maximum number of times the reasoning agent is allowed to repeat its task.

Default: 1
integerOptional
or
nullOptional
swarm_typeany ofOptional

The type of reasoning swarm to use (e.g., reasoning duo, self-consistency, IRE).

Default: reasoning_duo
string · enumOptionalPossible values:
or
nullOptional
num_samplesany ofOptional

The number of samples to generate for the reasoning agent.

Default: 1
integerOptional
or
nullOptional
output_typeany ofOptional

The type of output format for the reasoning agent.

Default: dict-all-except-first
string · enumOptionalPossible values:
or
nullOptional
num_knowledge_itemsany ofOptional

The number of knowledge items to use for the reasoning agent.

integerOptional
or
nullOptional
memory_capacityany ofOptional

The memory capacity for the reasoning agent.

integerOptional
or
nullOptional
taskany ofOptional

The task to be completed by the reasoning agent.

stringOptional
or
nullOptional
Responses
200
Successful Response
application/json
post
POST /v1/reasoning-agent/completions HTTP/1.1
Host: 
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 333

{
  "agent_name": "reasoning-agent",
  "description": "A reasoning agent that can answer questions and help with tasks.",
  "model_name": "claude-3-5-sonnet-20240620",
  "system_prompt": "text",
  "max_loops": 1,
  "swarm_type": "reasoning_duo",
  "num_samples": 1,
  "output_type": "dict-all-except-first",
  "num_knowledge_items": 1,
  "memory_capacity": 1,
  "task": "text"
}
{
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Get Reasoning Agent Types

get

Get the types of reasoning agents available.

Header parameters
x-api-keystringRequired
Responses
200
Successful Response
application/json
get
GET /v1/reasoning-agent/types HTTP/1.1
Host: 
x-api-key: text
Accept: */*
{
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Get Logs

get

Get all API request logs for all API keys associated with the user identified by the provided API key, excluding any logs that contain a client_ip field in their data.

Header parameters
x-api-keystringRequired
Responses
200
Successful Response
application/json
get
GET /v1/swarm/logs HTTP/1.1
Host: 
x-api-key: text
Accept: */*
{
  "status": "text",
  "count": 1,
  "logs": null,
  "timestamp": "text"
}

Get Available Models

get

Get all available models.

Header parameters
x-api-keystringRequired
Responses
200
Successful Response
application/json
get
GET /v1/models/available HTTP/1.1
Host: 
x-api-key: text
Accept: */*
{
  "success": true,
  "models": null
}

Get Rate Limits

get

Get the rate limits and current usage for the user associated with the provided API key.

Header parameters
x-api-keystringRequired
Responses
200
Successful Response
application/json
get
GET /v1/rate/limits HTTP/1.1
Host: 
x-api-key: text
Accept: */*
{
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Was this helpful?