Quickstart
Step-by-step guide to creating and running your first task with the Parallel Task API
Prerequisites
-
Parallel API key (from console.parallel.ai)
-
Python 3.7+ and
requests
library -
curl
for command-line examples -
If you would prefer to use the Python SDK, you can find more information here
Step 1: Authentication
Set your API key as an environment variable:
Test authentication with a simple API request:
Step 2: Design Your Task
Let’s create a task that gathers basic company information. The task will:
-
Find key company details
-
Research funding and size
-
Return structured, verified information
First, let’s define our task specification, which is our prompt:
Step 3: Define Schemas
Create input and output schemas based on what structure is most applicable to your use case. In this example, we consider company as being the required input for this task, and can also include the optional input location where applicable.
For the output schema, we consider the various fundraising stage classifications that are most useful to us, as well as other information that an analyst may look for, such as the year founded, the company description, the number of employees, and the company website URL.
Step 4: Create the Task
Submit your task definition to the API, so that it has the information required to run the task in the future:
Or using curl:
After you have created your task, you can find the task ID in the response. This is the ID that you will use to run your task. When executing your task, the Task ID and your chosen Runner is required.
Step 5: Execute the Task
Now let’s run the task with a series of companies that we are interested in learning about — notice that this can be as many companies as we like. In this way, the same Task can be applied to thousands of different companies, outputting information on each based on our required input and output schema.
Or using curl:
Next Steps
Now that you have a working company research task, you can:
-
Experiment with different Runners: In addition to the Rhodium runner, we have a range of other runners available that vary in complexity and capabilities.
-
Adjust your Task Specification: Design your Task specification to be aligned with your use case.
-
Scale your Task: Run your Task on a list of companies or a csv document.
-
Explore Additional Features: Explore Parallel’s ability to continuously monitor and update your Task as new information becomes available (Active Monitoring), run your Task asynchronously (Async API), and more.
Research tasks can take anywhere from a few seconds to a minute or more, depending on the runner and complexity of the company being researched.