Hanzo
OpenapiEval

Runs a real evaluation and answers the summary when it is finished — this is…

Runs a real evaluation and answers the summary when it is finished — this is synchronous work, not a job id.

POST /v1/eval/runs

Addresshttps://api.hanzo.ai/v1/eval/runs
MethodPOST
Operationpost_eval_runs
AuthAuthorization: Bearer $HANZO_API_KEY

Runs a real evaluation and answers the summary when it is finished — this is synchronous work, not a job id.

For each ACTIVE example in the dataset it calls the model under test, records a trace, calls the LLM-as-judge, and records the judge's score with its reasoning. The answer carries the per-item results (item id, trace id, score, output or error) alongside items, scored and avgScore.

The dataset must belong to the caller's org (404 otherwise) and must have at least one ACTIVE example (422 otherwise).

It runs as YOU: the caller's own Authorization bearer drives the model gateway, so a request without one is 401 rather than a run made anonymously or under a service identity. Only a non-reversible hash of that credential is recorded on the traces.

Bounded and honest about it: an org may have at most 4 runs in flight and the fifth is 429 rather than queued, and the whole run is capped at 10 minutes — examples past the deadline come back with an error instead of a score, and scored counts only real successes. A run where NOTHING scored answers 502, not a 200 that looks like an evaluation. A run must be able to persist what it produces, so a deployment with no datastore wired is 503 up front. Requires a validated principal; 403 without one.

Request

9 fields, body application/json (required).

FieldInTypeRequiredDescription
Authorizationheaderstring
datasetbodystringyesDataset is the set to score, which must belong to the caller's org and hold at least one ACTIVE example.
judgebodyjudgeSpec
judge.criteriabodystringCriteria is the standard the judge applies, defaulting to a correctness criterion.
judge.modelbodystringModel is the model that grades.
judge.namebodystringName is the score name the judge's grades are filed under, "llm-judge" by default.
limitbodyintegerLimit caps how many examples this run scores.
modelbodystringyesModel is the model under test.
runNamebodystringRunName labels the run and is generated from the clock when omitted.

Response

StatusBodyMeaning
200runSummaryok
502runSummarybad gateway

200 body — 13 fields.

FieldInTypeAlwaysDescription
avgScorebodynumberAvgScore is the mean over the scored examples, 0 when none scored.
datasetbodystringDataset is the set that was scored.
itemsbodyintegerItems is how many examples the run attempted.
judgeModelbodystringJudgeModel is the model that graded.
modelbodystringModel is the model under test.
resultsbodyitemResult[]Results is one row per attempted example.
results[].errorbodystringError is why this example produced no score — the model, the judge, or the run's deadline.
results[].itemIdbodystringItemID is the example that was scored.
results[].outputbodystringOutput is what the model under test answered, truncated at 2000 characters.
results[].scorebodynumberScore is the judge's grade.
results[].traceIdbodystringTraceID is the model call this result came from.
runNamebodystringRunName is the run's label, which scores and traces are filed under.
scoredbodyintegerScored is how many produced a real score.

Failure carries the platform error shape — see Errors.

Examples

hanzo evals runs create \
  --dataset <dataset> \
  --model <model>

Eval API · All Hanzo APIs · Interactive reference

How is this guide?

On this page