Hanzo
OpenapiEval

Writes one graded example — its input, its expected output, free-form metadata…

Writes one graded example — its input, its expected output, free-form metadata and a status — into the dataset named in the path, and answers 201 with it.

POST /v1/eval/datasets/{name}/items

Addresshttps://api.hanzo.ai/v1/eval/datasets/{name}/items
MethodPOST
Operationpost_eval_datasets_by_name_items
AuthAuthorization: Bearer $HANZO_API_KEY

Writes one graded example — its input, its expected output, free-form metadata and a status — into the dataset named in the path, and answers 201 with it.

That dataset MUST already exist for this org: an unknown one is 404, never a silent create. Requires a validated principal; 403 without one.

Request

7 fields, body application/json (required).

FieldInTypeRequiredDescription
namepathstringyes
expectedOutputbodyanyExpected is the answer a correct model produces, which the judge grades against, stored as raw JSON exactly as sent, up to 64 KiB.
idbodystringID makes the write idempotent — re-posting the same id replaces that example in place. Omit it and one is generated.
inputbodyanyInput is what the model under test will be given, stored as raw JSON exactly as sent, up to 64 KiB.
metadatabodyobjectMetadata is a free-form object stored with the example.
metadata.*bodyobject
statusbodystringStatus is ACTIVE (the default) or ARCHIVED.

Response

StatusBodyMeaning
201itemViewcreated

201 body — 9 fields.

FieldInTypeAlwaysDescription
createdAtbodystringCreatedAt is when the example was first written.
datasetNamebodystringDataset is the set this example belongs to.
expectedOutputbodyobjectExpected is the answer a correct model produces, which the judge grades against.
idbodystringID is the example's handle, unique within the caller's org.
inputbodyobjectInput is what the model under test is given, as it was written.
metadatabodyobjectMetadata is the free-form object stored with the example.
metadata.*bodyobject
statusbodystringStatus is ACTIVE or ARCHIVED.
updatedAtbodystringUpdatedAt is when it last changed.

Failure carries the platform error shape — see Errors.

Examples

hanzo evals datasets items create <name>

Eval API · All Hanzo APIs · Interactive reference

How is this guide?

On this page