Introduction
orq.ai exposes API to manipulate Datasets. These APIs are used to manage and enrich Datasets programmatically. In this page we’ll see the common use cases for creating, enriching and fetching datasets through the API.Prerequisite
To get started, an API key is needed to use within SDKs or HTTP API.To get an API key ready, see Authentication.
SDKs
Creating a Dataset
To create a Dataset, we’ll use the Create Dataset API. The following information are required to create a Dataset:- a unique name.
- the path within the orq.ai workspace (see Projects).
The API call will return a dataset_id that is used in the next calls.
Adding Datapoints to a Dataset
Datapoints are entries in a Dataset. You can add between 1 and 5,000 datapoints in a single API request. To create datapoints, we’ll use the Create Datapoints API The expected payload contains:- The previously acquired dataset ID
- 
An array of datapoints, where each contains:
- Inputs – Variables that can be used in the prompt message, e.g., {{firstname}}
- Messages – The prompt template, structured with system, user, and assistant roles
- Expected Output – Reference responses that evaluators use to compare against newly generated outputs
 
- Inputs – Variables that can be used in the prompt message, e.g., 
Batch Limits
- Minimum: 1 datapoint per request
- Maximum: 5,000 datapoints per request
- Requests with more than 500 datapoints are automatically processed in optimized chunks
Large Batch Example
For datasets with many entries, you can programmatically generate and submit datapoints:Listing Datasets
List Datasets using the List Datasets API.Fetching a Dataset
Fetch a Dataset using the Retrieve a Dataset API.Replace here DATASET_ID with a previously acquired dataset ID
Once a Dataset is created and populated with Datapoints, it can used in Experiment, to learn more see Creating an Experiment.