Default
Run a swarm with the specified task.
The name of the swarm, which serves as an identifier for the group of agents and their collective task.
A comprehensive description of the swarm's objectives, capabilities, and intended outcomes.
A list of agents or specifications that define the agents participating in the swarm.
The maximum number of execution loops allowed for the swarm, enabling repeated processing if needed.
1
The classification of the swarm, indicating its operational style and methodology.
Instructions on how to rearrange the flow of tasks among agents, if applicable.
The specific task or objective that the swarm is designed to accomplish.
An optional image URL that may be associated with the swarm's task or representation.
A flag indicating whether the swarm should return its execution history along with the final output.
true
Guidelines or constraints that govern the behavior and interactions of the agents within the swarm.
A list of tasks that the swarm should complete.
A list of messages that the swarm should complete.
A flag indicating whether the swarm should stream its output.
false
The service tier to use for processing. Options: 'standard' (default) or 'flex' for lower cost but slower processing.
standard
The number of loops to run per agent in the heavy swarm.
1
The model name to use for the question agent in the heavy swarm.
gpt-4.1
The model name to use for the worker agent in the heavy swarm.
claude-3-5-sonnet-20240620
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 an agent with the specified task.
The configuration of the agent to be completed.
The task to be completed by the agent.
The history of the agent's previous tasks and responses. Can be either a dictionary or a list of message objects.
An optional image URL that may be associated with the agent's task or representation.
A list of image URLs that may be associated with the agent's task or representation.
A flag indicating whether the agent should stream its output.
false
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 a batch of agents with the specified tasks using a thread pool.
The configuration of the agent to be completed.
The task to be completed by the agent.
The history of the agent's previous tasks and responses. Can be either a dictionary or a list of message objects.
An optional image URL that may be associated with the agent's task or representation.
A list of image URLs that may be associated with the agent's task or representation.
A flag indicating whether the agent should stream its output.
false
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 a batch of swarms with the specified tasks using a thread pool.
The name of the swarm, which serves as an identifier for the group of agents and their collective task.
A comprehensive description of the swarm's objectives, capabilities, and intended outcomes.
A list of agents or specifications that define the agents participating in the swarm.
The maximum number of execution loops allowed for the swarm, enabling repeated processing if needed.
1
The classification of the swarm, indicating its operational style and methodology.
Instructions on how to rearrange the flow of tasks among agents, if applicable.
The specific task or objective that the swarm is designed to accomplish.
An optional image URL that may be associated with the swarm's task or representation.
A flag indicating whether the swarm should return its execution history along with the final output.
true
Guidelines or constraints that govern the behavior and interactions of the agents within the swarm.
A list of tasks that the swarm should complete.
A list of messages that the swarm should complete.
A flag indicating whether the swarm should stream its output.
false
The service tier to use for processing. Options: 'standard' (default) or 'flex' for lower cost but slower processing.
standard
The number of loops to run per agent in the heavy swarm.
1
The model name to use for the question agent in the heavy swarm.
gpt-4.1
The model name to use for the worker agent in the heavy swarm.
claude-3-5-sonnet-20240620
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 a reasoning agent with the specified task.
The unique name assigned to the reasoning agent.
reasoning-agent
A detailed explanation of the reasoning agent's purpose and capabilities.
A reasoning agent that can answer questions and help with tasks.
The name of the AI model that the reasoning agent will utilize.
claude-3-5-sonnet-20240620
The initial instruction or context provided to the reasoning agent.
The maximum number of times the reasoning agent is allowed to repeat its task.
1
The type of reasoning swarm to use (e.g., reasoning duo, self-consistency, IRE).
reasoning_duo
The number of samples to generate for the reasoning agent.
1
The type of output format for the reasoning agent.
dict-all-except-first
The number of knowledge items to use for the reasoning agent.
The memory capacity for the reasoning agent.
The task to be completed by the reasoning agent.
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 the types of reasoning agents available.
GET /v1/reasoning-agent/types HTTP/1.1
Host:
x-api-key: text
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
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.
GET /v1/swarm/logs HTTP/1.1
Host:
x-api-key: text
Accept: */*
{
"status": "text",
"count": 1,
"logs": null,
"timestamp": "text"
}
Get the rate limits and current usage for the user associated with the provided API key.
GET /v1/rate/limits HTTP/1.1
Host:
x-api-key: text
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
Was this helpful?