POST/v2/gen-ai/evaluation_test_cases

Create an evaluation test case

Creates an evaluation test case for a dataset in a workspace. Supply the test case name and any applicable dataset_uuid, workspace_uuid, metrics, or star metric configuration. A 200 response returns the new test case UUID.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

7 body fields

Evaluation test case configuration; all fields are optional.

agent_workspace_namestringoptional
The name of the agent workspace associated with the test case.
dataset_uuidstringoptional
Dataset against which the test‑case is executed.
descriptionstringoptional
Description of the test case.
metricsarray<string>optional
Full metric list to use for evaluation test case.
namestringoptional
Name of the test case.
star_metricobjectoptional
Star metric configuration, including the metric UUID, name, and success threshold or percentage threshold.
workspace_uuidstringoptional
The workspace uuid.

6 status codes
200Returns an object containing the created test case's `test_case_uuid`.
test_case_uuidstringoptional
Test‑case UUID.
401Returned when authentication fails because the credentials are invalid.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404Returned when the requested resource is not found.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429Returned when the API rate limit has been exceeded.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500Returned when a server error occurs.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
defaultThere was an unexpected error.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.

Error handling

A 401 is returned when authentication credentials are invalid, and a 404 is returned when a referenced resource cannot be found. A 429 is returned when the API rate limit is exceeded, and a 500 indicates a server error. Verify that dataset_uuid and workspace_uuid, when supplied, identify the intended resources.