from parallel import Parallel
from parallel.types import McpServerParam
from parallel.types.run_input_param import RunInputParam
client = Parallel(api_key="API Key")
group_status = client.task_group.add_runs(
"taskgroup_id",
inputs=[
RunInputParam(
input="What was the GDP of France in 2023?",
processor="base",
enable_events=True,
mcp_servers=[McpServerParam(
type="url",
name="parallel_web_search",
url="https://mcp.parallel.ai/v1beta/search_mcp",
headers={"x-api-key": "API Key"}
)]
)
]
)
print(group_status.status)import Parallel from "parallel-web";
const client = new Parallel();
const groupStatus = await client.taskGroup.addRuns(
'taskgroup_id',
{
inputs: [
{
input: 'What was the GDP of France in 2023?',
processor: 'base',
enable_events: true,
mcp_servers: [{
type: 'url',
name: 'parallel_web_search',
url: 'https://mcp.parallel.ai/v1beta/search_mcp',
headers: {'x-api-key': 'API Key'}
}]
}
]
}
);
console.log(groupStatus.status);HttpResponse<String> response = Unirest.post("https://api.parallel.ai/v1/tasks/groups/{taskgroup_id}/runs")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"inputs\": [\n {\n \"processor\": \"<string>\",\n \"input\": \"What was the GDP of France in 2023?\",\n \"metadata\": {},\n \"source_policy\": {\n \"include_domains\": [\n \"<string>\"\n ],\n \"exclude_domains\": [\n \"<string>\"\n ],\n \"after_date\": \"2024-01-01\"\n },\n \"advanced_settings\": {\n \"location\": \"us\"\n },\n \"task_spec\": {\n \"output_schema\": {\n \"json_schema\": {},\n \"type\": \"json\"\n },\n \"input_schema\": \"<string>\"\n },\n \"previous_interaction_id\": \"<string>\",\n \"mcp_servers\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"url\",\n \"headers\": {},\n \"allowed_tools\": [\n \"<string>\"\n ]\n }\n ],\n \"enable_events\": true,\n \"webhook\": {\n \"url\": \"<string>\",\n \"event_types\": []\n }\n }\n ]\n}")
.asString();curl --request POST \
--url https://api.parallel.ai/v1/tasks/groups/{taskgroup_id}/runs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"inputs": [
{
"processor": "<string>",
"input": "What was the GDP of France in 2023?",
"metadata": {},
"source_policy": {
"include_domains": [
"<string>"
],
"exclude_domains": [
"<string>"
],
"after_date": "2024-01-01"
},
"advanced_settings": {
"location": "us"
},
"task_spec": {
"output_schema": {
"json_schema": {},
"type": "json"
},
"input_schema": "<string>"
},
"previous_interaction_id": "<string>",
"mcp_servers": [
{
"url": "<string>",
"name": "<string>",
"type": "url",
"headers": {},
"allowed_tools": [
"<string>"
]
}
],
"enable_events": true,
"webhook": {
"url": "<string>",
"event_types": []
}
}
]
}
'{
"status": {
"num_task_runs": 123,
"task_run_status_counts": {},
"is_active": true,
"status_message": "<string>",
"modified_at": "2025-04-24T18:56:22.513132Z"
},
"run_ids": [
"<string>"
],
"run_cursor": "<string>",
"event_cursor": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Add Runs to Task Group
Initiates multiple task runs within a TaskGroup.
from parallel import Parallel
from parallel.types import McpServerParam
from parallel.types.run_input_param import RunInputParam
client = Parallel(api_key="API Key")
group_status = client.task_group.add_runs(
"taskgroup_id",
inputs=[
RunInputParam(
input="What was the GDP of France in 2023?",
processor="base",
enable_events=True,
mcp_servers=[McpServerParam(
type="url",
name="parallel_web_search",
url="https://mcp.parallel.ai/v1beta/search_mcp",
headers={"x-api-key": "API Key"}
)]
)
]
)
print(group_status.status)import Parallel from "parallel-web";
const client = new Parallel();
const groupStatus = await client.taskGroup.addRuns(
'taskgroup_id',
{
inputs: [
{
input: 'What was the GDP of France in 2023?',
processor: 'base',
enable_events: true,
mcp_servers: [{
type: 'url',
name: 'parallel_web_search',
url: 'https://mcp.parallel.ai/v1beta/search_mcp',
headers: {'x-api-key': 'API Key'}
}]
}
]
}
);
console.log(groupStatus.status);HttpResponse<String> response = Unirest.post("https://api.parallel.ai/v1/tasks/groups/{taskgroup_id}/runs")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"inputs\": [\n {\n \"processor\": \"<string>\",\n \"input\": \"What was the GDP of France in 2023?\",\n \"metadata\": {},\n \"source_policy\": {\n \"include_domains\": [\n \"<string>\"\n ],\n \"exclude_domains\": [\n \"<string>\"\n ],\n \"after_date\": \"2024-01-01\"\n },\n \"advanced_settings\": {\n \"location\": \"us\"\n },\n \"task_spec\": {\n \"output_schema\": {\n \"json_schema\": {},\n \"type\": \"json\"\n },\n \"input_schema\": \"<string>\"\n },\n \"previous_interaction_id\": \"<string>\",\n \"mcp_servers\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"url\",\n \"headers\": {},\n \"allowed_tools\": [\n \"<string>\"\n ]\n }\n ],\n \"enable_events\": true,\n \"webhook\": {\n \"url\": \"<string>\",\n \"event_types\": []\n }\n }\n ]\n}")
.asString();curl --request POST \
--url https://api.parallel.ai/v1/tasks/groups/{taskgroup_id}/runs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"inputs": [
{
"processor": "<string>",
"input": "What was the GDP of France in 2023?",
"metadata": {},
"source_policy": {
"include_domains": [
"<string>"
],
"exclude_domains": [
"<string>"
],
"after_date": "2024-01-01"
},
"advanced_settings": {
"location": "us"
},
"task_spec": {
"output_schema": {
"json_schema": {},
"type": "json"
},
"input_schema": "<string>"
},
"previous_interaction_id": "<string>",
"mcp_servers": [
{
"url": "<string>",
"name": "<string>",
"type": "url",
"headers": {},
"allowed_tools": [
"<string>"
]
}
],
"enable_events": true,
"webhook": {
"url": "<string>",
"event_types": []
}
}
]
}
'{
"status": {
"num_task_runs": 123,
"task_run_status_counts": {},
"is_active": true,
"status_message": "<string>",
"modified_at": "2025-04-24T18:56:22.513132Z"
},
"run_ids": [
"<string>"
],
"run_cursor": "<string>",
"event_cursor": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Headers
Path Parameters
Query Parameters
Body
Request to initiate new task runs in a task group.
List of task runs to execute. Up to 1,000 runs can be specified per request. If you'd like to add more runs, split them across multiple TaskGroup POST requests.
Show child attributes
Show child attributes
Default task spec to use for the runs. If task_spec is specified in a run, it overrides this default.
Show child attributes
Show child attributes
Response
Successful Response
Response from adding new task runs to a task group.
Status of the group.
Show child attributes
Show child attributes
IDs of the newly created runs.
Cursor for these runs in the run stream at taskgroup/runs?last_event_id=<run_cursor>. Empty for the first runs in the group.
Cursor for these runs in the event stream at taskgroup/events?last_event_id=<event_cursor>. Empty for the first runs in the group.