POST /v2/evals/evaluator-previews
Judge up to three samples without saving the evaluator or score rows.
How to use
Test 1–3 samples without saving an evaluator or score rows. Use this to check rubric/config behavior before production use. A preview may still consume judge resources; it is not a persistence operation.
Authentication and permissions
Required permissions: evals.run. Resource and owner access checks also apply.
Prepare request.json
Save the example body below as request.json for the curl sample. Replace example IDs, node keys, and dynamic configuration with values for your organization; these are illustrative, not pre-existing resources.
{
"project_id": "YOUR_PROJECT_ID",
"evaluator_type": "builtin_rule",
"config": {
"rule": "exact_match",
"target_output_node_id": "out-0"
},
"samples": [
{
"generated_output": {
"out-0": "billing"
},
"expected_output": {
"out-0": "billing"
}
}
]
}Personal API key (sk_...) or supported user access JWT. See Authentication and authorization for endpoint restrictions and scopes. Use exactly one Authorization header.
How an evaluator scores: LLM judge or built-in rule.
LLM provider identifiers.
Successful Response
Machine-readable response code, when provided.
Invalid request or pagination cursor
Missing or invalid credentials
Denied permission, project folder access, or API-key scope (meta.required_scope)
Resource not found in the caller's organization
Invalid evaluation contract, row shape, evaluator configuration, or filter combination
Client error returned in the public API envelope
curl --fail-with-body -sS \
"$STACKAI_BASE_URL/v2/evals/evaluator-previews" \
-H "Authorization: Bearer $STACKAI_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary @request.json{
"response_code": "text",
"meta": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"data": [
{
"score_kind": "numeric",
"score": 1,
"choice_label": "text",
"feedback": "text",
"status": "pending",
"error": "text"
}
]
}Last updated
Was this helpful?

