Create testset rows

Add rows to a testset. ## Authentication - API key: `Authorization: Bearer ` ## Path Parameters - `testset_id` *string* **required**: The ID of the testset to add rows to. ## Request Body ```json Request [ { "row_data": { "input": "sdf" } }, { "row_data": { "expected_output": "ccc" } } ] ``` ## Examples ```python Python testset_id = "testset_id_123" url = f"https://api.respan.ai/api/testsets/{testset_id}/rows" headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" } data = [ { "row_data": { "input": "sdf" } }, { "row_data": { "expected_output": "ccc" } } ] response = requests.post(url, headers=headers, json=data) print(response.json()) ``` ```bash cURL curl -X POST "https://api.respan.ai/api/testsets/{testset_id}/rows" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '[ { "row_data": { "input": "sdf" } } ]' ``` ## Response ```json 200 OK { "created": 2, "rows": [ { "row_index": 0, "row_data": { "input": "sdf" } } ] } ```

Authentication

AuthorizationBearer
API key authentication. Get your API key from https://platform.respan.ai/platform/api-keys

Path parameters

testset_idstringRequired
The ID of the testset to add rows to.

Request

This endpoint expects an object.

Response

Successful response for Create testset rows

Errors

401
Unauthorized Error