Run an evaluator once
const url = 'http://localhost:8080/api/v1/projects/example/evaluators/test';const options = { method: 'POST', headers: { cookie: 'cetra_session=<cetra_session>', 'Content-Type': 'application/json' }, body: '{"evaluator":{"config":{},"kind":"llm_judge","name":"example","output_score":{"categories":["example"],"data_type":"numeric","name":"example"},"webhook_secret":"example"},"evaluator_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","span_id":"example","trace_id":"example","trace_start":"example","variable_mapping":{"additionalProperty":"example"},"variables":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/api/v1/projects/example/evaluators/test \ --header 'Content-Type: application/json' \ --cookie cetra_session=<cetra_session> \ --data '{ "evaluator": { "config": {}, "kind": "llm_judge", "name": "example", "output_score": { "categories": [ "example" ], "data_type": "numeric", "name": "example" }, "webhook_secret": "example" }, "evaluator_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "span_id": "example", "trace_id": "example", "trace_start": "example", "variable_mapping": { "additionalProperty": "example" }, "variables": {} }'Project members and above. API keys cannot call it. Runs synchronously, writes the judge trace (environment cetra-eval) and the judge usage, and writes no score. Shares the 10 per minute per user limit with connection tests.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project UUID, URL-encoded org-slug/project-slug, or current.
Request Bodyrequired
Section titled “Request Bodyrequired”POST /api/v1/projects/{project}/evaluators/test body.
Deserialize only: TimeParam has no Serialize. Its Debug prints flags and counts, not
the variables, the mapping or the evaluator.
object
The evaluator to run. With evaluator_id too, it is merged over the saved one.
object
The kind-specific configuration. Absent: the saved configuration, which needs evaluator_id.
For a webhook, a present configuration needs webhook_secret too.
object
What the evaluator does. Must match the saved evaluator’s kind.
Display name. Absent: the saved name, or Test.
The score the evaluator writes.
object
Category labels of a categorical score. Omitted otherwise.
Score data type.
Score name, 1 to 255 bytes.
Signing secret of a webhook. Absent: the saved secret, which needs evaluator_id.
Required with a webhook config.
The saved evaluator to run. Needed unless evaluator is given.
Span of the trace to target, 16 hex digits.
Stored trace to load, 32 hex digits.
Start of the trace, to narrow the lookup.
Prompt variable to mapping expression, for a stored trace.
object
Literal prompt variables, instead of a stored trace. At most 32, 256 KiB in total.
object
Responses
Section titled “Responses”The outcome. An evaluator failure is ok: false, not an error status.
POST /api/v1/projects/{project}/evaluators/test response. Also used when the evaluator failed.
object
The failure. Omitted when ok is true.
object
What the caller should do with the failure.
The error text, without payload content or secrets.
The judge trace the run wrote (environment cetra-eval). Omitted when no judge trace was written.
Time the run took, in milliseconds.
Whether the evaluator produced a value.
The rendered prompt. Omitted for checks, webhooks and failures before rendering.
The judge’s explanation, when it gave one. Omitted otherwise.
Whether the target trace was cut to fit the loading limits. Always false for literal variables.
Judge usage. Omitted when the run made no LLM call.
object
Estimated cost in USD. Omitted when no price is known.
Input tokens the provider counted. Omitted when unknown.
Output tokens the provider counted. Omitted when unknown.
The score value. Omitted unless ok.
A finite number.
object
A finite number.
True or false. Stored numerically as 1 or 0.
object
True or false. Stored numerically as 1 or 0.
A label and an optional numeric mapping.
object
A label and an optional numeric mapping.
object
Category label. Stored in value_str.
Optional numeric mapping. Stored in value_num. Omitted from JSON when absent.
Free text.
object
Free text.
Each prompt variable as rendered, cut to 2 000 characters. Empty when the run failed before rendering.
object
Example
{ "error": { "class": "retryable" }, "value": { "data_type": "numeric" }}The request is malformed or a filter is invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}No credentials, or the credentials are invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The credentials do not allow this operation, or the organization’s plan does not include it (code plan_required).
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The resource does not exist.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}Too many requests.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The server is busy or a dependency is unavailable. Retry later.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}