from parallel import Parallel
client = Parallel()
task_run = client.task_run.create(
input="What was the GDP of France in 2023?",
processor="base",
)
print(task_run.run_id)import Parallel from "parallel-web";
const client = new Parallel();
const taskRun = await client.taskRun.create({
input: 'What was the GDP of France in 2023?',
processor: 'base',
});
console.log(taskRun.run_id);HttpResponse<String> response = Unirest.post("https://api.parallel.ai/v1/tasks/runs")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"processor\": \"base\",\n \"input\": \"What was the GDP of France in 2023?\"\n}")
.asString();curl --request POST \
--url https://api.parallel.ai/v1/tasks/runs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"processor": "base",
"input": "What was the GDP of France in 2023?"
}
'{
"run_id": "trun_9907962f83aa4d9d98fd7f4bf745d654",
"interaction_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"
}{
"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": "Payment required: insufficient credit in account"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Forbidden: invalid processor in request"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Unprocessable content: request validation error"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Too many requests: quota temporarily exceeded"
}
}Create Task Run
Initiates a task run.
Returns immediately with a run object in status ‘queued’.
Beta features can be enabled by setting the ‘parallel-beta’ header.
from parallel import Parallel
client = Parallel()
task_run = client.task_run.create(
input="What was the GDP of France in 2023?",
processor="base",
)
print(task_run.run_id)import Parallel from "parallel-web";
const client = new Parallel();
const taskRun = await client.taskRun.create({
input: 'What was the GDP of France in 2023?',
processor: 'base',
});
console.log(taskRun.run_id);HttpResponse<String> response = Unirest.post("https://api.parallel.ai/v1/tasks/runs")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"processor\": \"base\",\n \"input\": \"What was the GDP of France in 2023?\"\n}")
.asString();curl --request POST \
--url https://api.parallel.ai/v1/tasks/runs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"processor": "base",
"input": "What was the GDP of France in 2023?"
}
'{
"run_id": "trun_9907962f83aa4d9d98fd7f4bf745d654",
"interaction_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"
}{
"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": "Payment required: insufficient credit in account"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Forbidden: invalid processor in request"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Unprocessable content: request validation error"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Too many requests: quota temporarily exceeded"
}
}Authorizations
Headers
Body
Request to run a task.
Processor to use for the task.
"base"
Input to the task, either text or a JSON object.
"What was the GDP of France in 2023?"
User-provided metadata stored with the run. Keys and values must be strings with a maximum length of 16 and 512 characters respectively.
Show child attributes
Show child attributes
User-provided key identifying the memory scope to use. Omit to use personal memory, if available.
1 - 128^[a-zA-Z0-9_-]+$Optional source policy governing included and excluded domains and domain/path prefixes in web search results.
Show child attributes
Show child attributes
Advanced search configuration for the task run.
Show child attributes
Show child attributes
Task specification. If unspecified, defaults to auto output schema.
Show child attributes
Show child attributes
Interaction ID to use as context for this request.
Optional list of MCP servers to use for the run.
Show child attributes
Show child attributes
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).
Callback URL (webhook endpoint) that will receive an HTTP POST when the run completes. This feature is not available via the Python SDK.
Show child attributes
Show child attributes
Response
Successful Response
Status of a task run.
ID of the task run.
"trun_e0083b6aac0544eb8686e8d2a76533d2"
Identifier for this interaction. Pass this value as previous_interaction_id to reuse context for a future request.
"trun_e0083b6aac0544eb8686e8d2a76533d2"
Status of the run.
queued, action_required, running, completed, failed, cancelling, cancelled "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.
"base"
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
Show child attributes
[]
Error for the run, present only if status is 'failed'.
Show child attributes
Show child attributes
User-provided metadata stored with the run.
Show child attributes
Show child attributes
{}
ID of the taskgroup to which the run belongs.