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)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.parallel.ai/v1/tasks/runs/{run_id}/input', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.parallel.ai/v1/tasks/runs/{run_id}/input \
--header 'x-api-key: <api-key>'{
"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
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Unauthorized: invalid or missing credentials"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Run id not found"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Request validation error"
}
}Tasks
Retrieve Task Run Input
Retrieves the input of a run by run_id.
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)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.parallel.ai/v1/tasks/runs/{run_id}/input', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.parallel.ai/v1/tasks/runs/{run_id}/input \
--header 'x-api-key: <api-key>'{
"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
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Unauthorized: invalid or missing credentials"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Run id not found"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Request validation error"
}
}Response
Successful Response
Request to run a task.
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).