from parallel import Parallel
client = Parallel(api_key="API Key")
task_group_runs = client.beta.task_group.get_runs("taskgroup_id")
for run in task_group_runs:
print(run){
"type": "<string>",
"event_id": "<string>",
"run": {
"run_id": "<string>",
"status": "queued",
"is_active": true,
"processor": "<string>",
"created_at": "2025-04-24T18:56:22.513132Z",
"modified_at": "2025-04-24T18:56:22.513132Z",
"warnings": [],
"error": {
"ref_id": "<string>",
"message": "<string>",
"detail": {}
},
"metadata": {},
"taskgroup_id": "<string>"
},
"input": {
"processor": "<string>",
"input": "What was the GDP of France in 2023?",
"metadata": {},
"source_policy": {
"include_domains": [
"<string>"
],
"exclude_domains": [
"<string>"
]
},
"task_spec": {
"output_schema": {
"json_schema": {},
"type": "json"
},
"input_schema": "<string>"
},
"mcp_servers": [
{
"url": "<string>",
"name": "<string>",
"type": "url",
"headers": {},
"allowed_tools": [
"<string>"
]
}
],
"enable_events": true,
"webhook": {
"url": "<string>",
"event_types": []
}
},
"output": {
"basis": [
{
"field": "<string>",
"reasoning": "<string>",
"citations": [],
"confidence": "low"
}
],
"type": "<string>",
"content": "<string>",
"beta_fields": {}
}
}Retrieves task runs in a TaskGroup and optionally their inputs and outputs.
All runs within a TaskGroup are returned as a stream. To get the inputs and/or
outputs back in the stream, set the corresponding include_input and
include_output parameters to true.
The stream is resumable using the event_id as the cursor. To resume a stream,
specify the last_event_id parameter with the event_id of the last event in the
stream. The stream will resume from the next event after the last_event_id.
from parallel import Parallel
client = Parallel(api_key="API Key")
task_group_runs = client.beta.task_group.get_runs("taskgroup_id")
for run in task_group_runs:
print(run){
"type": "<string>",
"event_id": "<string>",
"run": {
"run_id": "<string>",
"status": "queued",
"is_active": true,
"processor": "<string>",
"created_at": "2025-04-24T18:56:22.513132Z",
"modified_at": "2025-04-24T18:56:22.513132Z",
"warnings": [],
"error": {
"ref_id": "<string>",
"message": "<string>",
"detail": {}
},
"metadata": {},
"taskgroup_id": "<string>"
},
"input": {
"processor": "<string>",
"input": "What was the GDP of France in 2023?",
"metadata": {},
"source_policy": {
"include_domains": [
"<string>"
],
"exclude_domains": [
"<string>"
]
},
"task_spec": {
"output_schema": {
"json_schema": {},
"type": "json"
},
"input_schema": "<string>"
},
"mcp_servers": [
{
"url": "<string>",
"name": "<string>",
"type": "url",
"headers": {},
"allowed_tools": [
"<string>"
]
}
],
"enable_events": true,
"webhook": {
"url": "<string>",
"event_types": []
}
},
"output": {
"basis": [
{
"field": "<string>",
"reasoning": "<string>",
"citations": [],
"confidence": "low"
}
],
"type": "<string>",
"content": "<string>",
"beta_fields": {}
}
}queued, action_required, running, completed, failed, cancelling, cancelled Successful Response
Event when a task run transitions to a non-active status.
May indicate completion, cancellation, or failure.
Event type; always 'task_run.state'.
"task_run.state"Cursor to resume the event stream. Always empty for non Task Group runs.
Task run object.
Show child attributes
ID of the task run.
Status of the run.
queued, action_required, running, completed, failed, cancelling, cancelled Whether the run is currently active, i.e. status is one of {'cancelling', 'queued', 'running'}.
Processor used for the run.
Timestamp of the creation of the task, as an RFC 3339 string.
"2025-04-24T18:56:22.513132Z"
Timestamp of the last modification to the task, as an RFC 3339 string.
"2025-04-24T18:56:22.513132Z"
Warnings for the run, if any.
Show child attributes
Type of warning. Note that adding new warning types is considered a backward-compatible change.
spec_validation_warning, input_validation_warning, warning Human-readable message.
Optional detail supporting the warning.
[]ID of the taskgroup to which the run belongs.
Input to the run; included only if requested.
Show child attributes
Processor to use for the task.
Input to the task, either text or a JSON object.
"What was the GDP of France in 2023?"
Optional source policy governing preferred and disallowed domains in web search results.
Show child attributes
List of domains to restrict the results to. If specified, only sources from these domains will be included. Accepts plain domains (e.g., example.com, subdomain.example.gov) or bare domain extension starting with a period (e.g., .gov, .edu, .co.uk).
List of domains to exclude from results. If specified, sources from these domains will be excluded. Accepts plain domains (e.g., example.com, subdomain.example.gov) or bare domain extension starting with a period (e.g., .gov, .edu, .co.uk).
Task specification. If unspecified, defaults to auto output schema.
Show child attributes
JSON schema or text fully describing the desired output from the task. Descriptions of output fields will determine the form and content of the response. A bare string is equivalent to a text schema with the same description.
Optional JSON schema or text description of expected input to the task. A bare string is equivalent to a text schema with the same description.
Optional list of MCP servers to use for the run.
To enable this feature in your requests, specify mcp-server-2025-07-17 as one of the values in parallel-beta header (for API calls) or betas param (for the SDKs).
Show child attributes
URL of the MCP server.
Name of the MCP server.
Type of MCP server being configured. Always url.
"url"List of allowed tools for the MCP server.
Controls tracking of task run execution progress. When set to true, progress events are recorded and can be accessed via the Task Run events endpoint. When false, no progress events are tracked. Note that progress tracking cannot be enabled after a run has been created. The flag is set to true by default for premium processors (pro and above).
To enable this feature in your requests, specify events-sse-2025-07-24 as one of the values in parallel-beta header (for API calls) or betas param (for the SDKs).
Callback URL (webhook endpoint) that will receive an HTTP POST when the run completes.
This feature is not available via the Python SDK. To enable this feature in your API requests, specify the parallel-beta header with webhook-2025-08-12 value.
Output from the run; included only if requested and if status == completed.
Show child attributes
Basis for the output. The basis has a single field 'output'.
Show child attributes
Name of the output field.
Reasoning for the output field.
List of citations supporting the output field.
Confidence level for the output field. Only certain processors provide confidence levels.
"low"
The type of output being returned, as determined by the output schema of the task spec.
"text"Text output from the task.
Additional fields from beta features used in this task run. When beta features are specified during both task run creation and result retrieval, this field will be empty and instead the relevant beta attributes will be directly included in the BetaTaskRunJsonOutput or corresponding output type. However, if beta features were specified during task run creation but not during result retrieval, this field will contain the dump of fields from those beta features.
Each key represents the beta feature version (one amongst parallel-beta headers) and the values correspond to the beta feature attributes, if any. For now, only MCP server beta features have attributes. For example, {mcp-server-2025-07-17: [{'server_name':'mcp_server', 'tool_call_id': 'tc_123', ...}]}}