POST
/
api
/
parea
/
v1
/
testcases
p = Parea(api_key="PAREA_API_KEY")  # replace with your API key

data = [
    {"problem": "1+2", "target": 3, "tags": ["easy"]},
    {"problem": "Solve the differential equation dy/dx = 3y.", "target": "y = c * e^(3x)", "tags": ["hard"]}
]

# this will add the new test cases to the existing "Math problems" dataset.
# New test cases must have the same columns as the existing dataset.
p.add_test_cases(data, name="Math problems")
    200

Body

data
list[dict]
required

list of key-value pairs where keys represent input names. Each item in the list represent a test case row. Target and Tags are reserved keys. There can only be one target and tags key per dict item. If target is present it will represent the target/expected response for the inputs. If tags are present they must be a list of json_serializable values.

name
string

The name of the dataset to add the test cases to. Either name or dataset_id is required.

dataset_id
int

The id of the dataset to add the test cases to. Either name or dataset_id is required.