curl -X POST "$ATAI_API_URL/agents/evals/evl_01jcb0h2m6t4xr9nv3k7pdzs5y/cancel" \
-H "Authorization: Bearer $ATAI_API_KEY"
import os
import requests
base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]
response = requests.post(
f"{base_url}/agents/evals/evl_01jcb0h2m6t4xr9nv3k7pdzs5y/cancel",
headers={"Authorization": f"Bearer {api_key}"},
)
if response.status_code == 200:
evaluation = response.json()
print(f"{evaluation['id']} is now {evaluation['status']}")
elif response.status_code == 409:
print("Eval already terminal")
else:
print(f"Error: {response.json()['errors']}")
const response = await fetch(
`${process.env.ATAI_API_URL}/agents/evals/evl_01jcb0h2m6t4xr9nv3k7pdzs5y/cancel`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
}
);
const body = await response.json();
if (response.ok) {
console.log(`${body.id} is now ${body.status}`);
} else if (response.status === 409) {
console.error('Eval already terminal');
} else {
console.error('Error:', body.errors);
}
{
"id": "evl_01jcb0h2m6t4xr9nv3k7pdzs5y",
"name": "Pump A regression",
"org_id": "org_01jc8m5r2vq9xt4bn7h3kdzs6w",
"blueprint_id": "blp_01jc9n7k3xf8mbq2v5t0ary6de",
"primary": "state.macro_f1",
"examples": [
{
"name": "site-a-morning",
"ordinal": 1,
"inputs": [
{"type": "file", "id": "file_abc123", "format": "csv", "crc32c": "AAAAAA=="}
]
}
],
"rendered_config": {},
"status": "cancelled",
"metrics_report": null,
"output_artifacts": [
{
"type": "file",
"id": "file_jkl012",
"format": "ndjson",
"metadata": {"kind": "predictions", "status": "partial", "row_count": 1840}
}
],
"created_by": "usr_01jc8m4p3rt6vx9qn2h5kdzb7y",
"created_at": "2026-09-18T11:24:03Z",
"started_at": "2026-09-18T11:24:09Z",
"completed_at": null,
"error": null
}
{
"errors": [
{
"code": "<error_code>",
"message": "Eval not found.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "Eval already terminal.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Evals
Cancel Eval
Cancel a pending or running eval
POST
/
agents
/
evals
/
{eval_id}
/
cancel
curl -X POST "$ATAI_API_URL/agents/evals/evl_01jcb0h2m6t4xr9nv3k7pdzs5y/cancel" \
-H "Authorization: Bearer $ATAI_API_KEY"
import os
import requests
base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]
response = requests.post(
f"{base_url}/agents/evals/evl_01jcb0h2m6t4xr9nv3k7pdzs5y/cancel",
headers={"Authorization": f"Bearer {api_key}"},
)
if response.status_code == 200:
evaluation = response.json()
print(f"{evaluation['id']} is now {evaluation['status']}")
elif response.status_code == 409:
print("Eval already terminal")
else:
print(f"Error: {response.json()['errors']}")
const response = await fetch(
`${process.env.ATAI_API_URL}/agents/evals/evl_01jcb0h2m6t4xr9nv3k7pdzs5y/cancel`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
}
);
const body = await response.json();
if (response.ok) {
console.log(`${body.id} is now ${body.status}`);
} else if (response.status === 409) {
console.error('Eval already terminal');
} else {
console.error('Error:', body.errors);
}
{
"id": "evl_01jcb0h2m6t4xr9nv3k7pdzs5y",
"name": "Pump A regression",
"org_id": "org_01jc8m5r2vq9xt4bn7h3kdzs6w",
"blueprint_id": "blp_01jc9n7k3xf8mbq2v5t0ary6de",
"primary": "state.macro_f1",
"examples": [
{
"name": "site-a-morning",
"ordinal": 1,
"inputs": [
{"type": "file", "id": "file_abc123", "format": "csv", "crc32c": "AAAAAA=="}
]
}
],
"rendered_config": {},
"status": "cancelled",
"metrics_report": null,
"output_artifacts": [
{
"type": "file",
"id": "file_jkl012",
"format": "ndjson",
"metadata": {"kind": "predictions", "status": "partial", "row_count": 1840}
}
],
"created_by": "usr_01jc8m4p3rt6vx9qn2h5kdzb7y",
"created_at": "2026-09-18T11:24:03Z",
"started_at": "2026-09-18T11:24:09Z",
"completed_at": null,
"error": null
}
{
"errors": [
{
"code": "<error_code>",
"message": "Eval not found.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "Eval already terminal.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Requires version 1.1.12 or later of the Archetype platform.
Overview
This endpoint cancels a pending or running eval and returns it in itscancelled state.
An eval that has already terminated (with
status whose value is completed, failed, or
cancelled) has nothing to cancel and returns HTTP status code 409.409. Cancel the eval first to avoid this error.
Request
string
required
Eval
evl_ id.Response
Returns the cancelled eval, in the same format that Get Eval returns.string
required
TypeID-encoded eval identifier (
evl_ prefix).string
required
Human label for the eval.
string
required
Organization identifier the eval belongs to.
string
required
The blueprint being evaluated.
string
required
The run’s headline, as
<target>.<objective>.array
required
The examples the eval was created against, as resolved.
object
required
The fully-expanded configuration this eval ran under.
string
required
Eval lifecycle status;
cancelled after a successful cancel.string
required
Subject id (
usr_... or key_...) that created this eval.string
required
Creation timestamp (date-time).
string
When the runner picked the eval up;
null if it never did.string
When the eval finished;
null while unfinished.object
This is always
null for a cancelled eval since the report is populated only when an eval
reaches completed.array
References to the files the run produced. A cancelled eval keeps its partial predictions entry — the
rows scored so far are still readable.
A cancelled eval keeps the rows it already scored. Its predictions artifact stays in
output_artifacts with metadata.status set to partial.string
Failure detail;
null unless the eval failed.curl -X POST "$ATAI_API_URL/agents/evals/evl_01jcb0h2m6t4xr9nv3k7pdzs5y/cancel" \
-H "Authorization: Bearer $ATAI_API_KEY"
import os
import requests
base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]
response = requests.post(
f"{base_url}/agents/evals/evl_01jcb0h2m6t4xr9nv3k7pdzs5y/cancel",
headers={"Authorization": f"Bearer {api_key}"},
)
if response.status_code == 200:
evaluation = response.json()
print(f"{evaluation['id']} is now {evaluation['status']}")
elif response.status_code == 409:
print("Eval already terminal")
else:
print(f"Error: {response.json()['errors']}")
const response = await fetch(
`${process.env.ATAI_API_URL}/agents/evals/evl_01jcb0h2m6t4xr9nv3k7pdzs5y/cancel`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
}
);
const body = await response.json();
if (response.ok) {
console.log(`${body.id} is now ${body.status}`);
} else if (response.status === 409) {
console.error('Eval already terminal');
} else {
console.error('Error:', body.errors);
}
{
"id": "evl_01jcb0h2m6t4xr9nv3k7pdzs5y",
"name": "Pump A regression",
"org_id": "org_01jc8m5r2vq9xt4bn7h3kdzs6w",
"blueprint_id": "blp_01jc9n7k3xf8mbq2v5t0ary6de",
"primary": "state.macro_f1",
"examples": [
{
"name": "site-a-morning",
"ordinal": 1,
"inputs": [
{"type": "file", "id": "file_abc123", "format": "csv", "crc32c": "AAAAAA=="}
]
}
],
"rendered_config": {},
"status": "cancelled",
"metrics_report": null,
"output_artifacts": [
{
"type": "file",
"id": "file_jkl012",
"format": "ndjson",
"metadata": {"kind": "predictions", "status": "partial", "row_count": 1840}
}
],
"created_by": "usr_01jc8m4p3rt6vx9qn2h5kdzb7y",
"created_at": "2026-09-18T11:24:03Z",
"started_at": "2026-09-18T11:24:09Z",
"completed_at": null,
"error": null
}
{
"errors": [
{
"code": "<error_code>",
"message": "Eval not found.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "Eval already terminal.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Was this page helpful?