Skip to main content
Use evals when you need to measure model behavior against your own tasks, datasets, scoring code, and operational settings. An eval has two layers: Eval runs use normal MKA1 routing. Candidate generations go through POST /api/v1/llm/responses. Model-backed Python graders call Responses and Embeddings through a gateway-owned bridge, so grader code never receives your API key.

Before you start

You need: Use X-On-Behalf-Of when the eval belongs to a specific end user context. Suites, runs, uploaded eval files, and result artifacts are scoped to the authenticated team context.

Workflow

The normal flow is:
  1. Upload dataset and optional Python files through /files.
  2. Create an eval suite with a manifest.
  3. Start an eval run for one or more models.
  4. Poll the run until it reaches a terminal status.
  5. Inspect sample rows and download generated artifact files.
  6. Create a new suite version when you edit the manifest.
Eval run statuses move through:
Sample statuses are queued, generating, ready_to_score, scoring, running, completed, and failed.

Step 1 - Upload a dataset

Upload JSONL or CSV files with purpose=evals. JSONL preserves nested objects and arrays. CSV values are parsed as strings.
eval-smoke.jsonl
Store the returned file-... ID.

Step 2 - Upload a Python grader file

You can put grader source inline in the manifest. For reusable graders, upload Python files with purpose=evals.
exact_match_grader.py
curl
Store the returned grader file-... ID.

Step 3 - Create a suite

A suite manifest defines one or more tasks. Each task renders a prompt from one dataset row, sends the prompt to each run model, extracts the model output, and grades the sample.
curl
The response returns an eval.suite object. Use the suite id when you start a run.

Step 4 - Start a run

A run chooses the model or models to test. It can also choose a task subset, judge model, embedding model, generation settings, concurrency, and sample cap.
curl
Useful run fields:

Step 5 - Poll the run

curl
While a run is active, metrics is null or empty. When it completes, metrics are grouped by model and by task:

Step 6 - Inspect samples

List samples when you need per-row debugging. You can filter by task_id, model, or status.
curl
You can also:
  • Filter by a numeric score band using score_metric + score_min/score_max.
  • Skip large rows (like inlined audio) by setting include_dataset_row=false (samples will return dataset_row: null).
  • Fetch only specific sample indices using sample_index (comma-separated indices).
Each sample includes the source row, rendered prompt, target, stored Responses response_id, raw model output, extracted output, scores, judge details, and error details.

Fetch sample audio (transcription tasks)

For transcription evals, sample lists may redact inline data: audio blobs in dataset_row. To fetch a single sample’s clip reference, call: GET /api/v1/llm/evals/runs/{run_id}/samples/{sample_index}/audio sample_index is unique per task (and model), not per run. If a run includes more than one transcription task and the same sample_index could match multiple tasks, pass task_id or the API returns 400. Optionally pass model to choose which model row to read the clip from (the clip is identical across models within a task, so this does not change the audio).
curl
The response includes { object, audio, sample_index, task_id, model } where audio is a base64 data: URI or a URL.

Step 7 - Fetch artifacts

Completed runs create result files with purpose=evals. Use the artifacts endpoint to find the result and sample artifact file IDs.
curl
Then download the files through the Files API:
curl
The result artifact summarizes run metadata and final metrics. The samples artifact preserves per-sample details for offline analysis.

Edit a suite

Suites are versioned. Create a new immutable version when you change a manifest. Set make_active to false when you want to stage a draft version without making it the default for new runs.
curl
Runs keep the suite version they were created with. Changing the active version does not mutate historical runs.

Cancel a run

Cancel a run when it is queued, in progress, or finalizing.
curl
Cancellation is best effort. Samples that are already running may finish before the workflow reaches cancelled.

Delete suites, runs, schedules, and files

Evals and schedules support soft deletion. Files are deleted from storage.

Delete an eval run

Soft-deletes an eval run so it no longer appears in run lists, details, or score leaderboards.
curl

Delete an eval suite

Soft-deletes an eval suite and all of its eval runs so they no longer appear in user-facing reads. The response includes deleted_runs (how many runs were soft-deleted along with the suite).
curl

Delete an eval schedule

Soft-deletes an eval schedule and removes its Temporal schedule. Historical runs are preserved.
curl

Delete a file

Deletes a file from storage. This will also remove it from any vector stores.
curl

Pagination and filtering

List endpoints use cursor pagination. Example:
curl
  • Design eval task suites covers datasets, task manifests, templates, few-shot examples, output extraction, generation knobs, and metrics.
  • Write Python eval graders covers sample, batch, and model-backed Python contracts.
  • Use the endpoint paths in this guide with the generated request and response objects returned by the API.