Create an eval check
Creates a reusable check in the workspace library. Attach it to a suite or scenario to run it.
kind (judge, tool or flow) and slug are fixed after creation. slug is workspace-unique — a duplicate returns 409 eval_check_slug_taken.
Config
config is required and validated against the kind and, for tool and flow checks, against the config's rule. See EvalCheckConfig for every rule's keys; an unknown, missing or mistyped key returns 422 validation_failed with its field path.
template_key only records provenance — copy the template's config into config yourself.
Limits — the encoded config is capped at 131,072 bytes and the complete request body at 262,144 bytes.
bearerAuthAuthorizationBearer <token>Use a Voice API key or connected-app OAuth access token. Authentication.
Idempotency-Key*stringRequired. Reuse the same key to retry this write safely. Retries and idempotency.
^[A-Za-z0-9!#$%&'*+.^_`|~-]+$1 <= length <= 255application/json- body
slug*string^[a-z0-9][a-z0-9_-]{1,63}$2 <= length <= 64name*string1 <= length <= 200description?|length <= 2000kind*string"judge""tool""flow"config*||||||||||||||||||||||||A check's assertion. Exactly one shape applies: a judge check takes EvalCheckJudgeConfig (no rule); a tool or flow check takes the schema for its rule. Every key is closed — the server rejects an unknown key, a missing required key, or a wrong type with 422 validation_failed and the field path (for example config.expected), because the evaluator would otherwise ignore the key and silently grade against a default. Tool rules: called (tool, phase?, min?, max?), not_called (tool, phase?), called_with (tool, args, phase?, match?), called_before (tool, other_tool), succeeded (tool, phase?), failed (tool, phase?, error_kind?), result_matches (tool, expected, jsonpath?, phase?), no_unexpected_tools (allowlist), phase (tool, expected_phase). Flow rules: terminal_node (value), path_contains (value), slot_recorded (slot, expected?), max_turns (max), end_reason (value), transcript_matches (pattern, speaker?, expect?), pre_call_status (tool, status?), pre_call_var_set (value), pre_call_aborted (expect?). A few rules also accept a legacy spelling of their key (node, var, value) — send one spelling, not both.
template_key?|Records which template the check started from. It does not copy the template's config — send config too (list_eval_check_templates returns it).
length <= 128Check created; Location names it.
application/json- response
One library check: the list projection plus its kind-specific config.
id*stringuuidslug*string^[a-z0-9][a-z0-9_-]{1,63}$2 <= length <= 64name*string1 <= length <= 200description*|length <= 2000kind*string"judge""tool""flow"source_template_key*|length <= 128archived_at*|date-timecreated_at*stringdate-timeupdated_at*stringdate-timeconfig*A check's config exactly as stored. Every check created or edited since config validation shipped conforms to EvalCheckConfig; a check last edited before that may still carry keys outside it until its config is next updated (the update is validated in full).
curl -X POST 'https://api.kejue.co/v1/eval-checks' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "slug": "string", "name": "string", "kind": "judge", "config": { "instruction": "string" }}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "slug": "string", "name": "string", "description": "string", "kind": "judge", "source_template_key": "string", "archived_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": {}}