Hanzo AI
OpenapiEval

Create rubrics

Defines the shape of one score name for the caller's org and answers 201 with it.

POST /v1/eval/rubrics

Addresshttps://api.hanzo.ai/v1/eval/rubrics
MethodPOST
Operationpost_eval_rubrics
AuthAuthorization: Bearer $HANZO_API_KEY

Defines the shape of one score name for the caller's org and answers 201 with it.

This is the integrity contract, not documentation: once a rubric exists for a name, every score recorded under that name is checked against it and the rubric's data type is AUTHORITATIVE — a caller cannot claim a different one. Out-of-range values, unlisted labels and non-finite numbers are refused at write time.

A CATEGORICAL rubric with no categories is 400, as is a non-finite bound or a minValue above maxValue. Requires a validated principal; 403 without one.

Request

5 fields, body application/json (required).

FieldInTypeRequiredDescription
categoriesbodystring[]Categories is the closed set of labels a CATEGORICAL score may carry.
dataTypebodystringDataType is NUMERIC (the default), CATEGORICAL or BOOLEAN.
maxValuebodynumberMaxValue is the inclusive ceiling a NUMERIC score must stay under, finite.
minValuebodynumberMinValue is the inclusive floor a NUMERIC score must clear.
namebodystringyesName is the score name this rubric governs, matching ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$.

Response

StatusBodyMeaning
201scoreConfigViewcreated

201 body — 7 fields.

FieldInTypeAlwaysDescription
categoriesbodystring[]Categories is the closed set of labels a CATEGORICAL score may carry.
createdAtbodystringCreatedAt is when the rubric was first declared.
dataTypebodystringDataType is NUMERIC, CATEGORICAL or BOOLEAN, and is authoritative — a score recorded under this name cannot claim a different one.
maxValuebodynumberMaxValue is the inclusive ceiling a NUMERIC score must stay under, absent when unbounded.
minValuebodynumberMinValue is the inclusive floor a NUMERIC score must clear, absent when unbounded.
namebodystringName is the score name this rubric governs.
updatedAtbodystringUpdatedAt is when it last changed.

Failure carries the platform error shape — see Errors.

Examples

hanzo eval rubrics create --name <name>

Eval API · All Hanzo APIs · Interactive reference

How is this guide?

On this page