---
title: "Create Task Run"
method: POST
path: "/v1/tasks/runs"
tags: ["Tasks"]
---

# Create Task Run

`POST /v1/tasks/runs`

Initiates a task run.

Returns immediately with a run object in status 'queued'.

Beta features can be enabled by setting the 'parallel-beta' header.

## Headers

- `parallel-beta` string, nullable

## Request body

- TaskRunInput — Request to run a task.
  - `processor` string, required — Processor to use for the task.
  - `metadata` object, nullable — User-provided metadata stored with the run. Keys and values must be strings with a maximum length of 16 and 512 characters respectively.
  - `memory_scope_key` string, nullable — User-provided key identifying the memory scope to use. Omit to use personal memory, if available.
  - `source_policy` SourcePolicy — Source policy for web search results. This policy governs which sources are allowed/disallowed in results.
    - `include_domains` string[] — 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). The combined number of domains in include_domains and exclude_domains cannot exceed 200.
    - `exclude_domains` string[] — 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). The combined number of domains in include_domains and exclude_domains cannot exceed 200.
    - `after_date` string, date, nullable — Optional start date for filtering search results. Results will be limited to content published on or after this date. Provided as an RFC 3339 date string (YYYY-MM-DD).
  - `advanced_settings` TaskAdvancedSettings — Advanced search configuration for a task run.
    - `location` string, nullable — ISO 3166-1 alpha-2 country code for geo-targeted search results.
  - `task_spec` TaskSpec — Specification for a task. Auto output schemas can be specified by setting `output_schema={"type":"auto"}`. Not specifying a TaskSpec is the same as setting an auto output schema. For convenience bare strings are also accepted as input or output schemas.
    - `output_schema` union, required — 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.
      - JsonSchema — JSON schema for a task input or output.
        - `json_schema` object, required — A JSON Schema object. Only a subset of JSON Schema is supported.
        - `type` 'json' — The type of schema being defined. Always `json`.
      - TextSchema — Text description for a task input or output.
        - `description` string, nullable — A text description of the desired output from the task.
        - `type` 'text' — The type of schema being defined. Always `text`.
      - AutoSchema — Auto schema for a task input or output.
        - `type` 'auto' — The type of schema being defined. Always `auto`.
      - string
    - `input_schema` union — 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.
      - string
      - JsonSchema — JSON schema for a task input or output.
        - `json_schema` object, required — A JSON Schema object. Only a subset of JSON Schema is supported.
        - `type` 'json' — The type of schema being defined. Always `json`.
      - TextSchema — Text description for a task input or output.
        - `description` string, nullable — A text description of the desired output from the task.
        - `type` 'text' — The type of schema being defined. Always `text`.
  - `input` union, required — Input to the task, either text or a JSON object.
    - string
    - object
  - `previous_interaction_id` string, nullable — Interaction ID to use as context for this request.
  - `mcp_servers` McpServer[], nullable — Optional list of MCP servers to use for the run.
    - `type` 'url' — Type of MCP server being configured. Always `url`.
    - `url` string, required — URL of the MCP server.
    - `headers` object, nullable — Headers for the MCP server.
    - `name` string, required — Name of the MCP server.
    - `allowed_tools` string[], nullable — List of allowed tools for the MCP server.
  - `enable_events` boolean, nullable — Controls tracking of task run execution progress. When set to true, progress events are recorded and can be accessed via the [Task Run events](https://docs.parallel.ai/api-reference) 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 — Webhooks for Task Runs.
    - `url` string, required — URL for the webhook.
    - `event_types` string[] — Event types to send the webhook notifications for.

## Response `202`

Successful Response

- TaskRun — Status of a task run.
  - `run_id` string, required — ID of the task run.
  - `interaction_id` string, required — Identifier for this interaction. Pass this value as `previous_interaction_id` to reuse context for a future request.
  - `status` 'queued' | 'action_required' | 'running' | 'completed' | 'failed' | 'cancelling' | 'cancelled', required — Status of the run.
  - `is_active` boolean, required — Whether the run is currently active, i.e. status is one of {'cancelling', 'queued', 'running'}.
  - `warnings` Warning[], nullable — Warnings for the run, if any.
    - `type` 'spec_validation_warning' | 'input_validation_warning' | 'warning', required — Type of warning. Note that adding new warning types is considered a backward-compatible change.
    - `message` string, required — Human-readable message.
    - `detail` object, nullable — Optional detail supporting the warning.
  - `error` Error — An error message.
    - `ref_id` string, required — Reference ID for the error.
    - `message` string, required — Human-readable message.
    - `detail` object, nullable — Optional detail supporting the error.
  - `processor` string, required — Processor used for the run.
  - `metadata` object, nullable — User-provided metadata stored with the run.
  - `taskgroup_id` string, nullable — ID of the taskgroup to which the run belongs.
  - `created_at` string, nullable, required — Timestamp of the creation of the task, as an RFC 3339 string.
  - `modified_at` string, nullable, required — Timestamp of the last modification to the task, as an RFC 3339 string.

## Other responses

- `401` — Unauthorized: invalid or missing credentials
- `402` — Payment required: insufficient credit in account
- `403` — Forbidden: invalid processor in request
- `422` — Unprocessable content: request validation error
- `429` — Too many requests: quota temporarily exceeded

## Changes

> 21 revisions in range; 2 could not be searched.

- **2026-04-21** `57e1c56be094` — 7 info
  - api tag `Tasks` added
  - api tag `Tasks v1` removed
  - added the new optional `header` request parameter `parallel-beta`
  - added the new optional request property `advanced_settings`
  - …3 more
- **2026-03-09** `970b780e8649` — 2 info
  - added the new optional request property `previous_interaction_id`
  - added the required property `interaction_id` to the response with the `202` status
- **2026-01-13** `105d778ad64d` — 10 breaking, 26 info
  - removed the enum value `auto` of the request property `task_spec/anyOf[subschema #1: TaskSpec]/output_schema/anyOf[subschema #3: AutoSchema]/type`
  - removed the enum value `json` of the request property `task_spec/anyOf[subschema #1: TaskSpec]/input_schema/anyOf[subschema #2: JsonSchema]/type`
  - removed the enum value `json` of the request property `task_spec/anyOf[subschema #1: TaskSpec]/output_schema/anyOf[subschema #1: JsonSchema]/type`
  - removed the enum value `text` of the request property `task_spec/anyOf[subschema #1: TaskSpec]/input_schema/anyOf[subschema #3: TextSchema]/type`
  - …32 more
- **2025-11-06** `a2d634b57a8e` — 2 info
  - api tag `Tasks v1` added
  - api tag `Task API v1` removed
- …earlier changes not shown

[Full history](https://skmtc.dev/parallel-web/apis/parallel-api/changes/v1/tasks/runs/post.md)

---

[API](https://skmtc.dev/parallel-web/apis/parallel-api.md) · [All operations](https://skmtc.dev/parallel-web/apis/parallel-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/parallel-web/parallel-api/revisions/1595294c8795/schema)
