Skip to main content

Evaluations API — create and run evals

Create evaluation definitions, retrieve them with test cases and runs, and start new runs against dev, staging, or production environments.
The Evaluations API is the core of EvalGate’s quality loop. Use it to define what you want to measure, add test cases, and trigger runs that compute a pass/fail score you can gate on in CI or track over time in the dashboard.

List evaluations

Returns all evaluations for the authenticated organization. Use the status query parameter to filter by lifecycle stage.

Query parameters

string
Filter by evaluation status. Accepted values: draft, active, archived.
integer
Maximum number of results to return. Defaults to 50, maximum 100.
integer
Number of results to skip for pagination. Defaults to 0.

Response

array

Create an evaluation

Creates a new evaluation definition. The evaluation starts in draft status.

Request body

string
required
Display name for the evaluation.
string
required
Evaluation type. One of unit_test, human_eval, model_eval, ab_test.
string
Optional description explaining the purpose of this evaluation.
object
Optional settings controlling how the evaluation is executed (parallelism, timeout, etc.).
object
Optional model configuration applied when the evaluation runner makes LLM calls.
array
Optional array of custom metric definitions to compute alongside built-in scoring.
array
Optional inline test cases to attach at creation time.

Response

Returns the created evaluation object:

Get a single evaluation

Retrieve one evaluation by its numeric ID. The response includes the evaluation’s testCases and recent runs arrays, which the list endpoint omits.

Query parameters

integer
required
Numeric ID of the evaluation to retrieve.

Response

array
Test cases attached to this evaluation.
array
Recent evaluation runs. Ordered by creation time, most recent first.

Start an evaluation run

Triggers a new run for an existing evaluation. Pass an environment value to tag the run for filtering in the dashboard and in CI comparisons.

Path parameters

integer
required
Numeric ID of the evaluation to run.

Request body

string
Target environment for this run. Accepted values: dev, staging, prod. You can also pass the environment via the x-evalgate-env request header instead of the body.

Response

integer
Unique ID of the new run.
integer
ID of the parent evaluation.
string
Initial status — running. Poll or use webhooks to detect completion.
string
The environment value this run was tagged with.
string
ISO 8601 timestamp when the run was created.
To import results from your own test runner instead of triggering a managed run, use POST /api/evaluations/{id}/runs/import with an optional Idempotency-Key header to prevent duplicate runs on CI retry.