For AI agents: a documentation index is available at https://docs.parallel.ai/llms.txt. The full text of all docs is at https://docs.parallel.ai/llms-full.txt. You may also fetch any page as Markdown by appending
.md to its URL or sending Accept: text/markdown.Task Spec
A Task Specification (Task Spec) is a declarative template that defines the structure and requirements for the outputs of a web research operation. While optional in each Task Run, Task Specs provide significant advantages when you need precise control over your research data. Task Specs ensure consistent results by enforcing a specific output structure across multiple runs. They validate schema against expected formats and create reusable templates for common research patterns. By defining the expected outputs clearly, they also serve as self-documentation for your tasks, making them easier to understand and maintain.Task Spec Structure
A Task Spec consists of:When providing a bare string for
input_schema or output_schema, it’s equivalent to a text schema with that string as the description.Schema Types
Task Spec supports three schema formats:auto mode enables Deep Research style outputs only in processors pro and above. Read more about Deep Research here. - JSON Schema
- Text Schema
- Auto Schema
See Best Practices for guidance on writing effective Task Specs.
Output Schema Validation Rules
The Task API enforces several restrictions on output schemas to ensure compatibility and performance:Schema Structure Rules
While all fields must be required in the schema, you can create optional parameters by using a union type with
null. For example, "type": ["string", "null"] allows a field to be either a string or null, effectively making it optional while maintaining schema compliance.Size and Complexity Limits
Unsupported Keywords
The following JSON Schema keywords are not supported in output schemas:contains, format, maxContains, maxItems, maxLength, maxProperties, maximum, minContains, minItems, minLength, minimum, minProperties, multipleOf, pattern, patternProperties, propertyNames, uniqueItems, unevaluatedItems, unevaluatedProperties
irements: it has an object root type with properties, all fields are required, and additionalProperties is set to false.
Common Schema Errors to Avoid
Here are examples of common schema errors and how to fix them:- Root Type Error
- AnyOf Error
- Missing Required
- Additional Properties
- Unsupported Keywords