Evaluate — API reference
Judges, scores, enrichments, datasets, human annotations & review, and pre-prod eval runs.
0.16.6). Download the full spec at /docs/openapi.json.judges
POST /eval-runs
Create Eval Run
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
deployment_id | string | yes | |
pool_connection_ids | string[] | null | no | |
success_threshold | number | null | no | |
sample_size | integer | null | no | Cap THIS run at this many of the deployment’s eligible traces (most-recent first), leaving the deployment’s stored sampling filter unchanged — e.g. 1000 to score the 1000 most-recent eligible traces without editing the deployment. The response total is the number actually queued (smaller than sample_size when fewer traces are eligible). Omit to let the deployment’s filter decide the count. |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /eval-runs/export
Export Eval Run Scores
Export a judge run’s (or several runs’) scores WITH each target’s input + output.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
runs | query | string | yes | Comma-separated eval_run ids |
format | query | string | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /eval-runs/{run_id}
Get Eval Run
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | yes | |
limit | query | integer | no | |
offset | query | integer | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /eval-runs/{run_id}/cancel
Cancel Eval Run
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /eval-targets/estimate
Estimate Targets
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
filter | object | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /judges
List Judges
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
view | query | string | no | |
q | query | string | null | no | |
type | query | string[] | null | no | |
target | query | string[] | null | no | |
level | query | string[] | null | no | |
version | query | string[] | null | no | |
configured | query | string | null | no | |
trigger | query | string[] | null | no | |
status | query | string[] | null | no | |
running | query | boolean | null | no | |
sort_by | query | string | null | no | |
sort_dir | query | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /judges
Create Judge
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
type | string | yes | |
scope | string | no | |
description | string | no | |
level | string | no | |
definition | object | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /judges/preview
Preview Judge Prompt
Render the EXACT prompt a judge would send to the LLM, hydrated on a real sample session.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
definition | object | no | |
target_type | string | null | no | |
sample_session_id | string | null | no | |
type | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /judges/run-status
List Run Status
Poll-friendly, status-ONLY projection of every enabled deployment.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /judges/test-run
Test Run Judge Prompt
Execute the in-progress judge prompt against a real sample session ON THE FLY and return the model’s verdict — WITHOUT persisting anything.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
definition | object | no | |
target_type | string | null | no | |
sample_session_id | string | null | no | |
type | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PATCH /judges/{judge_id}
Patch Judge
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
judge_id | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | null | no | |
description | string | null | no | |
type | string | null | no | |
scope | string | null | no | |
level | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
DELETE /judges/{judge_id}
Delete Judge
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
judge_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /judges/{judge_id}/compare
Compare Judge Runs
Compare two eval runs of the SAME judge — typically two different versions.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
judge_id | path | string | yes | |
runA | query | string | yes | |
runB | query | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /judges/{judge_id}/deployments
Create Deployment
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
judge_id | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
version_id | string | yes | |
scope | string | null | no | |
trigger_policy | string | no | |
filter | object | no | |
pool_connection_ids | string[] | no | |
success_threshold | number | null | no | |
run_target_id | string | null | no | |
dedupe | boolean | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PATCH /judges/{judge_id}/deployments/{deployment_id}
Patch Deployment
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
judge_id | path | string | yes | |
deployment_id | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
status | string | null | no | |
trigger_policy | string | null | no | |
scope | string | null | no | |
filter | object | null | no | |
pool_connection_ids | string[] | null | no | |
success_threshold | number | null | no | |
run_target_id | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
DELETE /judges/{judge_id}/deployments/{deployment_id}
Delete Deployment
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
judge_id | path | string | yes | |
deployment_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PATCH /judges/{judge_id}/lifecycle
Patch Judge Lifecycle
Promote/demote a judge through its lifecycle: experimental → finalized → archived.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
judge_id | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
stage | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /judges/{judge_id}/runs
List Judge Runs
All eval runs for a judge (current + historical), in the Activity-run shape
so the UI can reuse the same row layout. Joins eval_runs → judge_deployments and
left-joins activity_runs (act_eval_{run_id}) for name / duration / errors.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
judge_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /judges/{judge_id}/targets
List Judge Targets
Per-binding aggregate for the scorer’s “results by target” table: one row per enabled
deployment with its Run Target summary and the latest scored/avg/passRate over that target’s
population. Project-scoped; NULL-not-zero on an empty population. A legacy inline binding
(no Run Target) still appears, with runTarget: null.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
judge_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /judges/{judge_id}/versions
Create Version
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
judge_id | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
definition | object | no | |
note | string | null | no | |
name | string | null | no | |
description | string | null | no | |
type | string | null | no | |
scope | string | null | no | |
level | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
scores
GET /scores
List Scores
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
metric_key | query | string | null | no | |
range | query | string | no | |
from | query | string | null | no | |
to | query | string | null | no | |
targetId | query | string | null | no | |
targetType | query | string | null | no | |
status | query | string | null | no | |
min_score | query | number | null | no | |
max_score | query | number | null | no | |
source | query | string | null | no | |
lifecycle | query | string | no | |
runId | query | string | null | no | |
page | query | integer | no | |
limit | query | integer | no | |
sort | query | string | no | |
sort_by | query | string | null | no | |
sort_dir | query | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /scores/display-settings
Get Display Settings
Resolved score-display config for the current project (scale + green/yellow/red bands + per-metric overrides). Readable by anyone who can read the project — the UI needs it to render every score. Falls back to platform defaults when nothing is persisted.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
PATCH /scores/display-settings
Patch Display Settings
Update the project’s score-display config. Admin-only (MANAGE_SCORE_DISPLAY) — it
changes what every viewer sees. Presentation only: it never alters stored scores or grading.
Values are clamped to safe ranges and bands kept non-inverted (warn <= pass).
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
scaleMax | number | null | no | |
passThreshold | number | null | no | |
warnThreshold | number | null | no | |
metricOverrides | object | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /scores/distribution
Distribution
The label breakdown for one score type — the drill-down’s answer to /scores/timeseries.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
metric_key | query | string | yes | |
source | query | string | null | no | |
targetType | query | string | null | no | |
range | query | string | no | |
from | query | string | null | no | |
to | query | string | null | no | |
lifecycle | query | string | no | |
buckets | query | integer | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /scores/metrics
List Metrics
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
range | query | string | no | |
from | query | string | null | no | |
to | query | string | null | no | |
lifecycle | query | string | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PUT /scores/prefs
Upsert Pref
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
metricKey | string | yes | |
source | string | yes | |
targetType | string | yes | |
favorite | boolean | null | no | |
hidden | boolean | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /scores/timeseries
Timeseries
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
metric_key | query | string | yes | |
range | query | string | no | |
from | query | string | null | no | |
to | query | string | null | no | |
lifecycle | query | string | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
enrichments
GET /enrichment-catalog
Enrichment Catalog
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
targetType | query | string | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /enrichment-fields
Enrichment Fields
The enrichment output fields that actually have values in this project, with the distinct values observed (capped). Drives the Traces/Sessions enrichment filter and the “Create dataset from enrichment” picker. Only fields with at least one output are returned, so the UI never offers a filter that can’t match anything.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /user-enrichment-runs
Create Run
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
ids | string[] | null | no | |
filter | object | null | no | |
dataset_id | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /user-enrichment-runs/{run_id}
Get Run
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | yes | |
sample | query | integer | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /user-enrichments
List Enrichments
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
name | query | string | null | no | |
mode | query | string | null | no | |
status | query | string | null | no | |
target_type | query | string | null | no | |
sort_by | query | string | null | no | |
sort_dir | query | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /user-enrichments
Create Enrichment
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
mode | string | yes | |
targetType | string | yes | |
outputFields | OutputField[] | no | |
prerequisites | object | no | |
definition | object | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PATCH /user-enrichments/{enrichment_id}
Update Enrichment
Edit an enrichment. Metadata (name / output fields / prerequisites / status) mutates in
place; a changed definition (prompt or LLM connection) creates a new immutable version
and promotes it (version history stays append-only, matching POST.../versions).
Disable = status='draft' (also drops the on-ingest trigger back to manual); re-enable =
status='enabled'.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
enrichment_id | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | null | no | |
outputFields | OutputField[] | null | no | |
prerequisites | object | null | no | |
status | string | null | no | |
definition | object | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
DELETE /user-enrichments/{enrichment_id}
Delete Enrichment
Hard-delete an enrichment and everything it owns — versions, runs, computed outputs, and its Activity-feed reflections — project-scoped so a scoped caller can’t delete another project’s enrichment.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
enrichment_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /user-enrichments/{enrichment_id}/dataset
Create Dataset From Enrichment
The enrichment→dataset→judge bridge: materialize a dataset whose membership is every
session whose enrichment output field == value. The dataset carries an
enrichment_filter source config, so (when streaming) hourly sync keeps the cohort
fresh as new traces are enriched — then any judge eval-run can target it via dataset_id.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
enrichment_id | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
description | string | null | no | |
field | string | yes | |
value | string | yes | |
streaming | boolean | no | |
fields | string[] | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /user-enrichments/{enrichment_id}/deployments
Create Deployment
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
enrichment_id | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
schedule | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /user-enrichments/{enrichment_id}/versions
Create Version
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
enrichment_id | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
definition | object | no | |
note | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
datasets
GET /datasets
List Datasets
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /datasets
Create Dataset
Details
Request body (application/json) — required
Schema: object.
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /datasets/from-selection
Create From Selection
One-call “create dataset from selected rows”: create a manual dataset, bulk-add
the selected sessions/traces, and — when golden — snapshot an immutable v1 marked
golden. Returns the dataset dict with a versions summary (newest first).
Details
Request body (application/json) — required
Schema: object.
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /datasets/preview
Preview Dataset
Mirror /eval-targets/estimate for dataset sources: count eligible + sampled
sessions for a source config, without persisting anything. Project-scoped.
Details
Request body (application/json) — required
Schema: object.
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PATCH /datasets/{id_or_name}
Update Dataset
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id_or_name | path | string | yes |
Request body (application/json) — required
Schema: object.
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
DELETE /datasets/{id_or_name}
Delete Dataset
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id_or_name | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /datasets/{id_or_name}/export
Export Dataset
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id_or_name | path | string | yes | |
format | query | string | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /datasets/{id_or_name}/items
List Items
List a dataset’s items with optional text search (input/output/expected), kind +
captured-field-presence filters, and whitelisted server-side sort. All params are
additive: with none supplied the historical ORDER BY created_at ASC is preserved.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id_or_name | path | string | yes | |
q | query | string | null | no | |
kind | query | string | null | no | |
has | query | string[] | no | |
sort_by | query | string | null | no | |
sort_dir | query | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /datasets/{id_or_name}/items
Add Item
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id_or_name | path | string | yes |
Request body (application/json) — required
Schema: object.
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
DELETE /datasets/{id_or_name}/items
Delete Item
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id_or_name | path | string | yes | |
trace_id | query | string | null | no | |
session_id | query | string | null | no | |
item_id | query | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /datasets/{id_or_name}/items/bulk
Bulk Add Items
Bulk-add sessions/traces to an existing dataset, de-duped against what’s already in
it. Sessions are field-captured (respecting the dataset’s fields unless the body
overrides fields); traces are added as reference rows. Returns {added, skipped}.
Project-scoped.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id_or_name | path | string | yes |
Request body (application/json) — required
Schema: object.
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PATCH /datasets/{id_or_name}/items/{item_id}
Update Item
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id_or_name | path | string | yes | |
item_id | path | string | yes |
Request body (application/json) — required
Schema: object.
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /datasets/{id_or_name}/sync
Sync Dataset
Re-run a filter/cluster dataset’s stored source config, adding newly-matching
sessions not already present. Respects sampling and (for streaming) the
last_synced_at high-water mark. Returns {added, total}. 404 unless the dataset
is a filter/cluster source. Project-scoped.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id_or_name | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /datasets/{id_or_name}/versions
List Versions
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id_or_name | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /datasets/{id_or_name}/versions
Create Version
Snapshot the dataset’s current items into a new immutable version
(version = max+1). Body {name?, notes?, golden?}. When golden is set, sibling
versions are un-goldened (one golden per dataset). Returns the version row.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id_or_name | path | string | yes |
Request body (application/json) — required
Schema: object.
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PATCH /datasets/{id_or_name}/versions/{version}
Update Version
Mutate version METADATA only — {name?, notes?, golden?}. Snapshot items are
immutable. Setting golden:true un-goldens sibling versions (one golden per dataset).
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id_or_name | path | string | yes | |
version | path | integer | yes |
Request body (application/json) — required
Schema: object.
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /datasets/{id_or_name}/versions/{version}/export
Export Version
Export an immutable version’s snapshot (json|csv), same shape as the dataset export
(plus a version summary in the JSON body).
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id_or_name | path | string | yes | |
version | path | integer | yes | |
format | query | string | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /datasets/{id_or_name}/versions/{version}/items
List Version Items
List an immutable version’s snapshot items — paged/searchable/sortable exactly like
the live /items endpoint. Read-only.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id_or_name | path | string | yes | |
version | path | integer | yes | |
q | query | string | null | no | |
kind | query | string | null | no | |
has | query | string[] | no | |
sort_by | query | string | null | no | |
sort_dir | query | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
annotations
GET /annotations
List Annotations
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
targetType | query | string | null | no | |
value | query | string | null | no | |
reviewer | query | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /annotations
Create Annotation
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
targetType | string | yes | |
targetId | string | yes | |
value | string | yes | |
comment | string | null | no | |
reviewer | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /annotations/reviewers
List Reviewers
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
GET /annotations/trend
Annotations Trend
Annotation-throughput trend for the Review Queue page: per-day (or per-hour) count of annotations created over the selected window, plus a period-over-period total. Scoped to the current project — the review loop’s output volume over time.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
range | query | string | null | no | |
from | query | string | null | no | |
to | query | string | null | no | |
grain | query | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
review
POST /review
Create Review
Write a ground-truth label. Reviewer + role resolved from the request identity.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
target_type | string | no | |
target_id | string | yes | |
verdict | string | yes | |
critique | string | null | no | |
failure_mode_id | string | null | no | |
cluster_id | string | null | no | |
is_gold | boolean | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /review-queue
Review Queue
Active-learning-ranked sessions a human should review next.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | null | no | |
novelty_budget | query | integer | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /review/adjudicate
Adjudicate
Principal override: supersede every conflicting active label on a target and write the authoritative one.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
target_id | string | yes | |
verdict | string | yes | |
critique | string | null | no | |
is_gold | boolean | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /review/alignment
List Alignment
Persisted judge↔expert alignment rows (the trend), newest first. Project-scoped.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
judge_id | query | string | null | no | |
range | query | string | no | |
from | query | string | null | no | |
to | query | string | null | no | |
latest_only | query | boolean | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /review/alignment/disagreements
Alignment Disagreements
Sessions where this judge disagreed with expert ground truth, split FN/FP. Project-scoped.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
judge_id | query | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /review/alignment/refresh
Refresh Alignment
Recompute + persist judge↔expert alignment for every judge that has scores.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
GET /review/gold
List Gold
List the active gold-standard labels (is_gold = 1), newest first. Project-scoped.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
GET /review/label-options
Label Options
Grouped options a reviewer can tag a verdict with: confirmed taxonomy failure modes and
discovered clusters (each carrying its finite L1 bucket/bucketLabel + session count).
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
GET /review/labels
List Labels
Unified human-label history — the source the Annotations tab renders.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
targetType | query | string | null | no | |
verdict | query | string | null | no | |
reviewer | query | string | null | no | |
failureModeId | query | string | null | no | |
clusterId | query | string | null | no | |
isGold | query | boolean | null | no | |
includeSuperseded | query | boolean | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /review/leaderboard
Leaderboard
Per-reviewer QUALITY = agreement with the expert/consensus on gold items, not volume.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
GET /review/queue-config
Get Queue Config
Current review-queue config for the project (defaults synthesized when unset).
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
PUT /review/queue-config
Put Queue Config
Upsert the project’s review-queue config (gated require_action('review')).
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
statuses | string[] | null | no | |
scoreFilters | object[] | null | no | |
includeFailureModeIds | string[] | null | no | |
includeClusterIds | string[] | null | no | |
includeTaxonomy | boolean | null | no | |
onlyUnlabeled | boolean | null | no | |
noveltyBudget | integer | null | no | |
queueLimit | integer | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /review/reviewers
List Label Reviewers
Distinct reviewers that have written a label in this project. Project-scoped.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
preprod-evals
GET /preprod-compare
Compare Runs
Aligned N-run comparison over a shared golden version.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
runs | query | string | null | no | comma-separated run ids (A,B,C…) |
run | query | string[] | null | no | repeatable run id param |
baseline | query | string | null | no | a run id (must be in the set) to mark per-row regressions against |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /preprod-compare/trajectory
Trajectory Diff
Diff the candidate’s captured trajectory against the baseline run’s captured trajectory for the SAME golden prompt.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
run | query | string | yes | candidate run id |
item | query | string | yes | dataset_version_item_id of the golden prompt |
baseline | query | string | yes | baseline run id to diff against |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /preprod-evals
List Preprod Evals
List pre-prod eval runs (project-scoped) with progress counts.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /preprod-evals
Create Preprod Eval
Create a pre-prod eval run + snapshot the golden version’s items into pending item rows.
Details
Request body (application/json) — required
Schema: object.
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /preprod-evals/trend
Preprod Trend
Run-cadence and pass-rate trend for the Pre-prod Evals page. Primary series: per-day (or per-hour) count of runs created over the window. Secondary: the pass-rate across scored items in the same window. A window with no scored items reports a null pass-rate, never a fabricated 0%. Scoped to the current project.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
range | query | string | null | no | |
from | query | string | null | no | |
to | query | string | null | no | |
grain | query | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /preprod-evals/verify
Verify Fix
Verification webhook — PROVE a fix against a candidate endpoint/branch.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
endpoint_url | string | null | no | |
agent_connection_id | string | null | no | |
auth_token | string | null | no | |
request_shape | string | null | no | |
dataset_id | string | null | no | |
remediation_id | string | null | no | |
version_label | string | yes | |
min_pass_rate | number | null | no | |
max_regressions | integer | null | no | |
name | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /preprod-evals/{run_id}
Get Preprod Eval
Run detail: the run header + per-item summary + an aggregate rollup.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /preprod-evals/{run_id}/cancel
Cancel Preprod Eval
Cancel a run (terminal). A completed run cannot be cancelled.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /preprod-evals/{run_id}/comparison
Comparison
Candidate-vs-baseline comparison.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | yes | |
baseline | query | string | null | no | override baseline kind |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /preprod-evals/{run_id}/gate
Gate
Evaluate the run’s gate_json against the candidate results → pass/fail + reasons.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /preprod-evals/{run_id}/items
Get Preprod Items
The frozen prompt list for the harness/runner: [{item_id, input, expected_output}].
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /preprod-evals/{run_id}/metrics
Metrics
Per-metric score rollup for a run’s captured+scored sessions — the CI-gate surface.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /preprod-evals/{run_id}/run
Run Preprod Eval Route
Trigger a PUSH run: Neens HTTP-calls the run’s agent endpoint for every frozen golden prompt, captures + links each response, then scores it — no user harness.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /preprod-evals/{run_id}/start
Start Preprod Eval
Transition awaiting_traces → running (idempotent).
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |