You can create a dataset and add rows programmatically using our Python SDK.

If you are using any other language, then you can do so through some simple API requests.

Create Dataset via SDK

1. Install the athina package

pip install athina-client

2. Set your API keys

If you are using the python SDK, then can set the API keys like this:

import os
from athina_client.keys import AthinaApiKey


3. Create a dataset and log it to athina

from athina_client.datasets import Dataset

  dataset = Dataset.create(
    description="Optional description", # optional
    language_model_id="gpt-4", # optional
except Exception as e:
  print(f"Failed to create dataset: {e}")

The name of the dataset must be unique, otherwise the request will throw an exception.

4. Add rows to the dataset

              'query': 'What is the capital of France?',
              'context': ['France is a country in Western Europe.', 'Paris is the capital of France.'],
              'response': 'Paris',
              'expected_response': 'Paris'
except Exception as e:
    print(f"Failed to add rows: {e}")

You can also find the dataset_id from the URL when you open the dataset through

Currently, a dataset can have a maximum of 1000 rows. If the number of rows > 1000, the API will return an exception with status code 400.