Python
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);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 @- <<EOF
{
"inputs": [
{
"processor": "base",
"input": "What was the GDP of France in 2023?",
"metadata": {},
"memory_scope_key": "<string>",
"source_policy": {
"include_domains": [
"wikipedia.org",
"docs.python.org/3",
".edu"
],
"exclude_domains": [
"reddit.com",
"youtube.com/shorts",
".ai"
],
"after_date": "2024-01-01"
},
"advanced_settings": {
"location": "us",
"data_sources": {
"pay_per_use": [
"<string>"
],
"free": [
"<string>"
],
"excluded": [
"<string>"
]
},
"fetch_policy": {
"max_age_seconds": 86400,
"timeout_seconds": 60,
"disable_cache_fallback": false,
"as_of": "2026-07-01T12:00:00Z"
}
},
"task_spec": {
"output_schema": {
"json_schema": {
"additionalProperties": false,
"properties": {
"gdp": {
"description": "GDP in USD for the year, formatted like '$3.1 trillion (2023)'",
"type": "string"
}
},
"required": [
"gdp"
],
"type": "object"
},
"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": []
}
}
]
}
EOF{
"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>"
}
]
}Tasks
Add Runs to Task Group
Initiates multiple task runs within a TaskGroup.
POST
/
v1
/
tasks
/
groups
/
{taskgroup_id}
/
runs
Python
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);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 @- <<EOF
{
"inputs": [
{
"processor": "base",
"input": "What was the GDP of France in 2023?",
"metadata": {},
"memory_scope_key": "<string>",
"source_policy": {
"include_domains": [
"wikipedia.org",
"docs.python.org/3",
".edu"
],
"exclude_domains": [
"reddit.com",
"youtube.com/shorts",
".ai"
],
"after_date": "2024-01-01"
},
"advanced_settings": {
"location": "us",
"data_sources": {
"pay_per_use": [
"<string>"
],
"free": [
"<string>"
],
"excluded": [
"<string>"
]
},
"fetch_policy": {
"max_age_seconds": 86400,
"timeout_seconds": 60,
"disable_cache_fallback": false,
"as_of": "2026-07-01T12:00:00Z"
}
},
"task_spec": {
"output_schema": {
"json_schema": {
"additionalProperties": false,
"properties": {
"gdp": {
"description": "GDP in USD for the year, formatted like '$3.1 trillion (2023)'",
"type": "string"
}
},
"required": [
"gdp"
],
"type": "object"
},
"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": []
}
}
]
}
EOF{
"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>"
}
]
}Body
application/json
Request to initiate new task runs in a task group.
Response
Successful Response
Response from adding new task runs to a task group.