Skip to main content
POST
/
v1
/
agent
/
batch
/
completions
Execute Batch Agent Completions
curl --request POST \
  --url https://api.example.com/v1/agent/batch/completions \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
[
  {
    "agent_config": {
      "agent_name": "<string>",
      "description": "<string>",
      "system_prompt": "<string>",
      "model_name": "gpt-4.1",
      "auto_generate_prompt": false,
      "max_tokens": 8192,
      "temperature": 0.5,
      "role": "worker",
      "max_loops": 1,
      "tools_list_dictionary": [
        {}
      ],
      "mcp_url": "<string>",
      "streaming_on": false,
      "llm_args": {},
      "dynamic_temperature_enabled": true,
      "mcp_config": {
        "type": "mcp",
        "url": "http://localhost:8000/mcp",
        "tool_configurations": {},
        "authorization_token": "<string>",
        "transport": "streamable_http",
        "headers": {},
        "timeout": 10
      },
      "mcp_configs": {
        "connections": [
          {
            "type": "mcp",
            "url": "http://localhost:8000/mcp",
            "tool_configurations": {},
            "authorization_token": "<string>",
            "transport": "streamable_http",
            "headers": {},
            "timeout": 10
          }
        ]
      },
      "tool_call_summary": true,
      "reasoning_effort": "<string>",
      "thinking_tokens": 123,
      "reasoning_enabled": false
    },
    "task": "<string>",
    "history": {},
    "img": "<string>",
    "imgs": [
      "<string>"
    ],
    "tools_enabled": [
      "<string>"
    ]
  }
]
'
{
  "batch_id": "<string>",
  "total_requests": 123,
  "results": "<unknown>",
  "execution_time": 123,
  "timestamp": "<string>"
}

Headers

x-api-key
string
required

Body

application/json
agent_config
AgentSpec · object
required

The configuration of the agent to be completed.

task
string | null

The task to be completed by the agent.

history
History · object

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

img
string | null

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

imgs
string[] | null

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

tools_enabled
string[] | null

A list of tools that the agent should use to complete its task.

Response

Successful Response

batch_id
string | null

The unique identifier for the agent batch completion.

total_requests
integer | null

The total number of requests in the batch.

results
any | null

The outputs generated by the agent.

execution_time
number | null

The execution time of the agent batch completion.

timestamp
string | null

The timestamp when the agent batch completion was created.