Skip to main content
GET
/
v1
/
tasks
/
runs
/
{run_id}
/
input
Retrieve Task Run Input
import requests

url = "https://api.parallel.ai/v1/tasks/runs/{run_id}/input"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
{
  "processor": "core",
  "metadata": {
    "my_key": "my_value"
  },
  "task_spec": {
    "output_schema": {
      "json_schema": {
        "type": "object",
        "properties": {
          "gdp": {
            "type": "string",
            "description": "GDP in USD for the year, formatted like '$3.1 trillion (2023)'"
          }
        },
        "required": [
          "gdp"
        ],
        "additionalProperties": false
      },
      "type": "json"
    },
    "input_schema": {
      "json_schema": {
        "type": "object",
        "properties": {
          "country": {
            "type": "string"
          },
          "year": {
            "type": "integer"
          }
        },
        "required": [
          "country",
          "year"
        ],
        "additionalProperties": false
      },
      "type": "json"
    }
  },
  "input": {
    "country": "France",
    "year": 2023
  }
}

Authorizations

x-api-key
string
header
required

Path Parameters

run_id
string
required

Response

Successful Response

Request to run a task.

processor
string
required

Processor to use for the task.

Example:

"base"

input
required

Input to the task, either text or a JSON object.

Example:

"What was the GDP of France in 2023?"

metadata
Metadata · object

User-provided metadata stored with the run. Keys and values must be strings with a maximum length of 16 and 512 characters respectively.

source_policy
SourcePolicy · object

Optional source policy governing preferred and disallowed domains in web search results.

task_spec
TaskSpec · object

Task specification. If unspecified, defaults to auto output schema.

previous_interaction_id
string | null

Interaction ID to use as context for this request.

mcp_servers
McpServer · object[] | null

Optional list of MCP servers to use for the run.

enable_events
boolean | null

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).

webhook
Webhook · object

Callback URL (webhook endpoint) that will receive an HTTP POST when the run completes. This feature is not available via the Python SDK.