API reference · API
Replace a test suite
PUT/v1/evals/{id}API key
Chat scope. The whole suite; its revision moves when the cases changed, and evidence from an older revision stops routing until the suite runs again.
Parameters
| Field | Type | What it is |
|---|---|---|
| id (path)required | string | The suite id (ev_...). |
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| namerequired | string | |
| pass_threshold | number | The weighted share of cases a model must pass to route, 0 to 1. 0.9 unless set. |
| casesrequired | array of object | |
| cases[] | string | |
| cases[] | string | |
| cases[] | string | |
| cases[] | array of object | |
| cases[] | string | One of "system", "user", "assistant". |
| cases[] | string | |
| cases[] | integer | |
| cases[] | number | |
| cases[] | object | |
| cases[] | object | How the answer is graded: one of exact, contains, regex, json_schema, number. exact compares the trimmed answer (ignore_case optional); contains needs every string in value; regex tests pattern with flags from i, m and s on a linear time engine (RE2), which refuses lookaround and backreferences, and is never run on an answer over 10000 characters; json_schema parses the answer as JSON and holds it to schema with the strict JSON engine; number reads the last number in the answer and allows tolerance, absolute or, with relative, a share of value. There is no model graded check. |
| cases[] | string | One of "exact", "contains", "regex", "json_schema", "number". |
| cases[] | any | |
| cases[] | boolean | |
| cases[] | string | |
| cases[] | string | |
| cases[] | object | |
| cases[] | number | |
| cases[] | boolean | |
| cases[] | number | |
| schedule | object or null | weekly: true checks the suite once a week and runs it again, inside budget_micros, only when the cases changed, a tested price moved, or a cheaper untested model arrived. The weekly run is a request of the key that last saved the suite (or of the account, when the dashboard saved it), checked again each week. |
| schedule. | boolean | |
| schedule. | integer |
Example
{
"name": "string",
"pass_threshold": 0,
"cases": [
{
"prompt": "Say hello in five words.",
"check": {
"type": "exact"
}
}
],
"schedule": {
"weekly": false,
"budget_micros": 0
}
}Answer 200
The suite.
| Field | Type | What it is |
|---|---|---|
| id | string | |
| object | "eval" | |
| name | string | |
| pass_threshold | number | |
| revision | integer | Moves whenever the cases change; evidence from another revision is not routed on. |
| case_count | integer | |
| route_model | string | The model id that routes on this suite: antimatter/auto:suite/<id>. |
| schedule | object or null | |
| schedule. | boolean | |
| schedule. | integer | |
| schedule. | integer or null | |
| schedule. | string | key: each weekly run is the request of the key that last saved the suite. account: the dashboard saved it, and the personal account pays. One of "key", "account". |
| schedule. | string or null | Why the schedule stopped (the key that pays for it was revoked, expired or lost the chat scope). Saving the suite again resumes it. |
| created_at | integer | |
| updated_at | integer | |
| cases | array of object | |
| cases[] | string | |
| cases[] | string | |
| cases[] | string | |
| cases[] | array of object | |
| cases[] | string | One of "system", "user", "assistant". |
| cases[] | string | |
| cases[] | integer | |
| cases[] | number | |
| cases[] | object | |
| cases[] | object | How the answer is graded: one of exact, contains, regex, json_schema, number. exact compares the trimmed answer (ignore_case optional); contains needs every string in value; regex tests pattern with flags from i, m and s on a linear time engine (RE2), which refuses lookaround and backreferences, and is never run on an answer over 10000 characters; json_schema parses the answer as JSON and holds it to schema with the strict JSON engine; number reads the last number in the answer and allows tolerance, absolute or, with relative, a share of value. There is no model graded check. |
| cases[] | string | One of "exact", "contains", "regex", "json_schema", "number". |
| cases[] | any | |
| cases[] | boolean | |
| cases[] | string | |
| cases[] | string | |
| cases[] | object | |
| cases[] | number | |
| cases[] | boolean | |
| cases[] | number | |
| route | object | What the route would choose now: the models whose latest complete run passed, cheapest first at today's billed card applied to their mean tokens per case, and the models left out with why. A request carries the first 3 as its chain. |
| route. | string | |
| route. | string or null | |
| route. | array of object | |
| route. | array of object | |
| evidence | array of object | |
| suggestions | array of object | Reasons to run again: never_run, cases_changed, prices_changed (with models), new_models (cheaper priced text models the last run never tried). |
| suggestions[] | string | |
| last_run | object or null | |
| active_run | object or null |
Errors
- 400OpenAI shaped error.
- 401OpenAI shaped error.
- 403OpenAI shaped error.
- 404OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.