Evals API
19 operations. Authentication, errors and pagination work as described in the REST API overview.
Compare two runs of one prompt, case by case
GET/api/v1/evals/compareToken optional
| Name | Type | Description |
|---|---|---|
a queryrequired | string | |
b queryrequired | string |
Responses: 200 OK400, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
arequired | object | |
brequired | object | |
rowsrequired | object[] | |
truncatedrequired | boolean |
curl 'https://incantory.ai/api/v1/evals/compare' \
-H "Authorization: Bearer $INCANTORY_TOKEN"A prompt's eval datasets
GET/api/v1/evals/datasetsToken optional
Public datasets for everyone; every dataset for the prompt owner.
| Name | Type | Description |
|---|---|---|
prompt queryrequired | string | owner/slug |
Responses: 200 OK304, 400, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
itemsrequired | object[] | |
canManagerequired | boolean |
curl 'https://incantory.ai/api/v1/evals/datasets' \
-H "Authorization: Bearer $INCANTORY_TOKEN"Create a dataset on your prompt
POST/api/v1/evals/datasetsToken required · scope evals:write
Request body
| Name | Type | Description |
|---|---|---|
promptrequired | string | owner/slug of the prompt the dataset belongs to |
namerequired | string | |
description | string | |
visibility | "public" | "unlisted" | "private" | Default public |
Responses: 201 OK400, 401, 403, 404, 409, 410, 429
Response fields
| Name | Type | Description |
|---|---|---|
idrequired | string | |
promptrequired | string | |
namerequired | string | |
descriptionrequired | string | |
visibilityrequired | "public" | "unlisted" | "private" | |
caseCountrequired | number | |
createdAtrequired | string | |
updatedAtrequired | string |
curl -X POST 'https://incantory.ai/api/v1/evals/datasets' \
-H "Authorization: Bearer $INCANTORY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"prompt":"alice/haiku","name":"name"}'Get a dataset
GET/api/v1/evals/datasets/{id}Token optional
| Name | Type | Description |
|---|---|---|
id pathrequired | string |
Responses: 200 OK400, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
idrequired | string | |
promptrequired | string | |
namerequired | string | |
descriptionrequired | string | |
visibilityrequired | "public" | "unlisted" | "private" | |
caseCountrequired | number | |
createdAtrequired | string | |
updatedAtrequired | string | |
canManagerequired | boolean |
curl 'https://incantory.ai/api/v1/evals/datasets/{id}' \
-H "Authorization: Bearer $INCANTORY_TOKEN"Rename / describe / change visibility
PATCH/api/v1/evals/datasets/{id}Token required · scope evals:write
| Name | Type | Description |
|---|---|---|
id pathrequired | string |
Request body
| Name | Type | Description |
|---|---|---|
name | string | |
description | string | |
visibility | "public" | "unlisted" | "private" |
Responses: 200 OK400, 401, 403, 404, 409, 429
Response fields
| Name | Type | Description |
|---|---|---|
idrequired | string | |
promptrequired | string | |
namerequired | string | |
descriptionrequired | string | |
visibilityrequired | "public" | "unlisted" | "private" | |
caseCountrequired | number | |
createdAtrequired | string | |
updatedAtrequired | string |
curl -X PATCH 'https://incantory.ai/api/v1/evals/datasets/{id}' \
-H "Authorization: Bearer $INCANTORY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{}'Delete a dataset (soft)
DELETE/api/v1/evals/datasets/{id}Token required · scope evals:write
| Name | Type | Description |
|---|---|---|
id pathrequired | string |
Responses: 204 OK400, 401, 403, 404, 429
curl -X DELETE 'https://incantory.ai/api/v1/evals/datasets/{id}' \
-H "Authorization: Bearer $INCANTORY_TOKEN"List a dataset's cases
GET/api/v1/evals/datasets/{id}/casesToken optional
| Name | Type | Description |
|---|---|---|
id pathrequired | string | |
cursor query | string | |
limit query | integer (1–500) |
Responses: 200 OK304, 400, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
itemsrequired | object[] | |
nextCursorrequired | string | null |
curl 'https://incantory.ai/api/v1/evals/datasets/{id}/cases' \
-H "Authorization: Bearer $INCANTORY_TOKEN"Add cases (batch)
POST/api/v1/evals/datasets/{id}/casesToken required · scope evals:write
replace: true deletes the existing cases first. A dataset holds at most 10,000 cases.
| Name | Type | Description |
|---|---|---|
id pathrequired | string |
Request body
| Name | Type | Description |
|---|---|---|
casesrequired | object[] | |
replace | boolean | Delete the existing cases first |
Responses: 201 OK400, 401, 403, 404, 413, 422, 429
Response fields
| Name | Type | Description |
|---|---|---|
addedrequired | number | |
caseCountrequired | number |
curl -X POST 'https://incantory.ai/api/v1/evals/datasets/{id}/cases' \
-H "Authorization: Bearer $INCANTORY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"cases":[{"input":{}}]}'Edit a case
PATCH/api/v1/evals/datasets/{id}/cases/{caseId}Token required · scope evals:write
| Name | Type | Description |
|---|---|---|
id pathrequired | string | |
caseId pathrequired | string |
Request body
| Name | Type | Description |
|---|---|---|
input | object | |
expected | any | |
tags | string[] |
Responses: 200 OK400, 401, 403, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
idrequired | string | |
inputrequired | object | |
expectedrequired | any | |
tagsrequired | string[] | |
positionrequired | number |
curl -X PATCH 'https://incantory.ai/api/v1/evals/datasets/{id}/cases/{caseId}' \
-H "Authorization: Bearer $INCANTORY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{}'Delete a case
DELETE/api/v1/evals/datasets/{id}/cases/{caseId}Token required · scope evals:write
| Name | Type | Description |
|---|---|---|
id pathrequired | string | |
caseId pathrequired | string |
Responses: 204 OK400, 401, 403, 404, 429
curl -X DELETE 'https://incantory.ai/api/v1/evals/datasets/{id}/cases/{caseId}' \
-H "Authorization: Bearer $INCANTORY_TOKEN"Import cases from CSV or JSONL
POST/api/v1/evals/datasets/{id}/importToken required · scope evals:write
CSV: header row of variable names plus optional expected and tags (;-separated) columns. JSONL: {input, expected?, tags?} or a flat object of variables per line. 422 invalid_import names the line.
| Name | Type | Description |
|---|---|---|
id pathrequired | string |
Request body
| Name | Type | Description |
|---|---|---|
formatrequired | "csv" | "jsonl" | |
textrequired | string | |
replace | boolean |
Responses: 201 OK400, 401, 403, 404, 413, 422, 429
Response fields
| Name | Type | Description |
|---|---|---|
addedrequired | number | |
caseCountrequired | number |
curl -X POST 'https://incantory.ai/api/v1/evals/datasets/{id}/import' \
-H "Authorization: Bearer $INCANTORY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"format":"csv","text":"text"}'Runs reported for a prompt (optionally one version or dataset)
GET/api/v1/evals/runsToken optional
| Name | Type | Description |
|---|---|---|
prompt queryrequired | string | owner/slug |
version query | integer (…–9007199254740991) | |
datasetId query | string | |
cursor query | string | |
limit query | integer (1–100) |
Responses: 200 OK304, 400, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
itemsrequired | object[] | |
nextCursorrequired | string | null |
curl 'https://incantory.ai/api/v1/evals/runs' \
-H "Authorization: Bearer $INCANTORY_TOKEN"Create a run for a prompt version
POST/api/v1/evals/runsToken required · scope evals:write
Only the prompt owner (or an admin) may report runs: a passing run opens requirePassingEval labels. The version defaults to the label, else the latest. model is a catalog slug (unknown names are kept as free text). Errors use prompt_not_found / version_not_found / dataset_not_found.
Request body
| Name | Type | Description |
|---|---|---|
promptrequired | string | owner/slug |
version | integer (…–9007199254740991) | Version number; default: the label, else the latest version |
label | string | |
model | string | Model slug from GET /api/v1/models; unknown names are kept as free text |
datasetId | string | |
metadata | object | |
runner | "ci" | "sdk" | "manual" | Default: ci for API tokens, manual for the web UI |
passThreshold | number (0–1) | Pass rate the run needs to pass (default 1.0) |
commitSha | string | |
externalUrl | string (uri) | Link to the CI job |
Responses: 201 OK400, 401, 403, 404, 410, 429
Response fields
| Name | Type | Description |
|---|---|---|
idrequired | string | |
promptrequired | string | |
versionrequired | number | |
datasetrequired | object | null | |
modelrequired | object | null | |
modelTextrequired | string | null | |
runnerrequired | "ci" | "sdk" | "manual" | |
statusrequired | "running" | "completed" | "failed" | |
passedrequired | boolean | null | |
summaryrequired | object | |
startedAtrequired | string | |
finishedAtrequired | string | null | |
commitSharequired | string | null | |
externalUrlrequired | string | null | |
createdByrequired | string | null |
curl -X POST 'https://incantory.ai/api/v1/evals/runs' \
-H "Authorization: Bearer $INCANTORY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"prompt":"alice/haiku"}'Get a run (status, verdict, summary)
GET/api/v1/evals/runs/{id}Token optional
| Name | Type | Description |
|---|---|---|
id pathrequired | string |
Responses: 200 OK400, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
idrequired | string | |
promptrequired | string | |
versionrequired | number | |
datasetrequired | object | null | |
modelrequired | object | null | |
modelTextrequired | string | null | |
runnerrequired | "ci" | "sdk" | "manual" | |
statusrequired | "running" | "completed" | "failed" | |
passedrequired | boolean | null | |
summaryrequired | object | |
startedAtrequired | string | |
finishedAtrequired | string | null | |
commitSharequired | string | null | |
externalUrlrequired | string | null | |
createdByrequired | string | null | |
resultCountrequired | number | |
canManagerequired | boolean |
curl 'https://incantory.ai/api/v1/evals/runs/{id}' \
-H "Authorization: Bearer $INCANTORY_TOKEN"Finish a run, pin or unpin its verdict
PATCH/api/v1/evals/runs/{id}Token required · scope evals:write
passed pins the verdict (audited); null unpins it. status: "failed" marks a crashed run (never passes).
| Name | Type | Description |
|---|---|---|
id pathrequired | string |
Request body
| Name | Type | Description |
|---|---|---|
status | "running" | "completed" | "failed" | |
passed | boolean | null | Pin the verdict (null clears the pin; the server recomputes) |
passThreshold | number (0–1) | |
externalUrl | string (uri) | null |
Responses: 200 OK400, 401, 403, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
idrequired | string | |
promptrequired | string | |
versionrequired | number | |
datasetrequired | object | null | |
modelrequired | object | null | |
modelTextrequired | string | null | |
runnerrequired | "ci" | "sdk" | "manual" | |
statusrequired | "running" | "completed" | "failed" | |
passedrequired | boolean | null | |
summaryrequired | object | |
startedAtrequired | string | |
finishedAtrequired | string | null | |
commitSharequired | string | null | |
externalUrlrequired | string | null | |
createdByrequired | string | null |
curl -X PATCH 'https://incantory.ai/api/v1/evals/runs/{id}' \
-H "Authorization: Bearer $INCANTORY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{}'Delete a run (audited)
DELETE/api/v1/evals/runs/{id}Token required · scope evals:write
| Name | Type | Description |
|---|---|---|
id pathrequired | string |
Responses: 204 OK400, 401, 403, 404, 429
curl -X DELETE 'https://incantory.ai/api/v1/evals/runs/{id}' \
-H "Authorization: Bearer $INCANTORY_TOKEN"A run's results in report order
GET/api/v1/evals/runs/{id}/resultsToken optional
| Name | Type | Description |
|---|---|---|
id pathrequired | string | |
cursor query | string | |
limit query | integer (1–500) |
Responses: 200 OK304, 400, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
itemsrequired | object[] | |
nextCursorrequired | string | null |
curl 'https://incantory.ai/api/v1/evals/runs/{id}/results' \
-H "Authorization: Bearer $INCANTORY_TOKEN"Append results (batch, ≤1000)
POST/api/v1/evals/runs/{id}/resultsToken required · scope evals:write
Each batch recomputes the run summary and verdict from all its results (verdict: passRate over results with a boolean passed ≥ the run's passThreshold, default 1.0) and marks the run completed. A pass on a catalog model adds a "verified on" row.
| Name | Type | Description |
|---|---|---|
id pathrequired | string |
Request body
| Name | Type | Description |
|---|---|---|
resultsrequired | object[] |
Responses: 200 OK400, 401, 403, 404, 413, 422, 429
Response fields
| Name | Type | Description |
|---|---|---|
acceptedrequired | number | |
runrequired | object |
curl -X POST 'https://incantory.ai/api/v1/evals/runs/{id}/results' \
-H "Authorization: Bearer $INCANTORY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"results":[{}]}'Per-version score summary (latest run per model × dataset)
GET/api/v1/evals/scoresToken optional
| Name | Type | Description |
|---|---|---|
prompt queryrequired | string | owner/slug |
Responses: 200 OK400, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
promptrequired | string | |
versionsrequired | object[] |
curl 'https://incantory.ai/api/v1/evals/scores' \
-H "Authorization: Bearer $INCANTORY_TOKEN"