curl --request POST \
--url https://api.example.com/api/v2/projects/{project_id}/prompt-datasets/{dataset_id}/test-cases/bulk \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"inputs": {},
"output": "<string>",
"metadata": {},
"history": [
{
"content": "<string>",
"role": "user"
}
],
"media_inputs": {}
}
]
}
'{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"inputs": {},
"output": "<string>",
"output_message": {
"content": [
{
"text": "<string>",
"type": "text"
}
],
"role": "user"
},
"metadata": {},
"media_inputs": {},
"history": [
{
"content": [
{
"text": "<string>",
"type": "text"
}
],
"role": "user"
}
]
}
]
}Add multiple test cases to a dataset in a single request. Use for batch imports, e.g. from CSV or production logs.
Maximum 100 test cases per request.
curl --request POST \
--url https://api.example.com/api/v2/projects/{project_id}/prompt-datasets/{dataset_id}/test-cases/bulk \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"inputs": {},
"output": "<string>",
"metadata": {},
"history": [
{
"content": "<string>",
"role": "user"
}
],
"media_inputs": {}
}
]
}
'{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"inputs": {},
"output": "<string>",
"output_message": {
"content": [
{
"text": "<string>",
"type": "text"
}
],
"role": "user"
},
"metadata": {},
"media_inputs": {},
"history": [
{
"content": [
{
"text": "<string>",
"type": "text"
}
],
"role": "user"
}
]
}
]
}Show child attributes
CreatePromptTestCasesResponse(data: list[server.api_routes.prompt_datasets_api_v2.PromptTestCaseResponse])
Show child attributes