Skip to main content
POST
/
v1beta
/
tasks
/
groups
/
{taskgroup_id}
/
runs
from parallel import Parallel
from parallel.types.beta import McpServerParam
from parallel.types.beta.beta_run_input_param import BetaRunInputParam

client = Parallel(api_key="API Key")
group_status = client.beta.task_group.add_runs(
"taskgroup_id",
inputs=[
BetaRunInputParam(
input="What was the GDP of France in 2023?",
processor="base",
mcp_servers=[McpServerParam(
type="url",
name="parallel_web_search",
url="https://mcp.parallel.ai/v1beta/search_mcp",
headers={"x-api-key": "API Key"}
)]
)
],
betas=["mcp-server-2025-07-17"]
)
print(group_status.status)
{
  "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>"
}

Authorizations

x-api-key
string
header
required

Headers

parallel-beta
string | null

Path Parameters

taskgroup_id
string
required

Body

application/json

Request to initiate new task runs in a task group.

inputs
BetaTaskRunInput · object[]
required

List of task runs to execute.

default_task_spec
object | null

Default task spec to use for the runs. If task_spec is specified in a run, it overrides this default. Specification for a task.

Auto output schemas can be specified by setting output_schema={"type":"auto"}. Not specifying a TaskSpec is the same as setting an auto output schema.

For convenience bare strings are also accepted as input or output schemas.

Response

Successful Response

Response from adding new task runs to a task group.

status
object
required

Status of the group. Status of a task group.

run_ids
string[]
required

IDs of the newly created runs.

run_cursor
string | null
required

Cursor for these runs in the run stream at taskgroup/runs?last_event_id=<run_cursor>. Empty for the first runs in the group.

event_cursor
string | null
required

Cursor for these runs in the event stream at taskgroup/events?last_event_id=<event_cursor>. Empty for the first runs in the group.

I