Authorizations
Enter Gentrace API key (Format: Authorization: Bearer <token>)
Body
application/json
Test case creation parameters
Response
Successful response
The response is of type object
.
Viewing Gentrace v2 documentation View Gentrace v1
Viewing Gentrace v2 documentation View Gentrace v1
Create a new test case
curl --request POST \
--url https://gentrace.ai/api/v4/test-cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"datasetId": "b2c3d4e5-f6a7-8901-2345-67890abcdef1",
"name": "Prompting with a SQL query that does not return any results",
"inputs": {
"query": "What is the capital of France?"
},
"expectedOutputs": {
"result": "No results found"
}
}'
{
"id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"createdAt": "2025-04-01T00:00:00.000Z",
"updatedAt": "2025-04-01T00:00:00.000Z",
"inputs": {
"query": "What is the capital of France?"
},
"expectedOutputs": {
"answer": "Paris"
},
"datasetId": "123e4567-e89b-12d3-a456-426614174000",
"name": "Capital of France query",
"pipelineId": "abcdef12-3456-7890-abcd-ef1234567890",
"archivedAt": "2025-04-01T00:00:00.000Z",
"deletedAt": "2025-04-01T00:00:00.000Z"
}
Enter Gentrace API key (Format: Authorization: Bearer <token>)
Test case creation parameters
Successful response
The response is of type object
.
curl --request POST \
--url https://gentrace.ai/api/v4/test-cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"datasetId": "b2c3d4e5-f6a7-8901-2345-67890abcdef1",
"name": "Prompting with a SQL query that does not return any results",
"inputs": {
"query": "What is the capital of France?"
},
"expectedOutputs": {
"result": "No results found"
}
}'
{
"id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"createdAt": "2025-04-01T00:00:00.000Z",
"updatedAt": "2025-04-01T00:00:00.000Z",
"inputs": {
"query": "What is the capital of France?"
},
"expectedOutputs": {
"answer": "Paris"
},
"datasetId": "123e4567-e89b-12d3-a456-426614174000",
"name": "Capital of France query",
"pipelineId": "abcdef12-3456-7890-abcd-ef1234567890",
"archivedAt": "2025-04-01T00:00:00.000Z",
"deletedAt": "2025-04-01T00:00:00.000Z"
}