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
Bash
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.
Bash
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.
Bash
Useful run fields:

Step 5 - Poll the run

Bash
While a run is active, metrics is null or empty. When it completes, metrics are grouped by model and by task:
by_task entries can also carry the tokens and time the model spent, described in Token and time fields.

Inspect results

Use Results and artifacts to inspect samples, filter scores, and download the output. To rank models across runs and compare their token use, time, and cost, see Compare models.

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.
Bash
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.
Bash
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.
Bash

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).
Bash

Delete an eval schedule

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

Delete a file

Deletes a file from storage. The file is first removed from every vector store it is attached to (embeddings included), so it no longer appears in vector store search or file_search results.
Bash
  • 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.