Tasks Runs Post
Initiates a task run.
Returns immediately with a run object in status ‘queued’.
POST
/
v1
/
tasks
/
runs
Copy
curl --request POST \
--url https://api.parallel.ai/v1/tasks/runs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"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": {
"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": "France (2023)",
"processor": "<string>",
"metadata": {}
}'
Copy
{
"run_id": "trun_9907962f83aa4d9d98fd7f4bf745d654",
"status": "queued",
"is_active": true,
"processor": "core",
"metadata": {
"my_key": "my_value"
},
"created_at": "2025-04-23T20:21:48.037943Z",
"modified_at": "2025-04-23T20:21:48.037943Z"
}
Authorizations
Body
application/json
Request to run a task.
Response
202
application/json
Successful Response
Status of a task run.
Copy
curl --request POST \
--url https://api.parallel.ai/v1/tasks/runs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"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": {
"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": "France (2023)",
"processor": "<string>",
"metadata": {}
}'
Copy
{
"run_id": "trun_9907962f83aa4d9d98fd7f4bf745d654",
"status": "queued",
"is_active": true,
"processor": "core",
"metadata": {
"my_key": "my_value"
},
"created_at": "2025-04-23T20:21:48.037943Z",
"modified_at": "2025-04-23T20:21:48.037943Z"
}
Assistant
Responses are generated using AI and may contain mistakes.