Cancel an eval run
curl --request POST \
--url https://{instance}.omniapp.co/api/v1/ai/eval/runs/{runId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.omniapp.co/api/v1/ai/eval/runs/{runId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.omniapp.co/api/v1/ai/eval/runs/{runId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{instance}.omniapp.co/api/v1/ai/eval/runs/{runId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{instance}.omniapp.co/api/v1/ai/eval/runs/{runId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{instance}.omniapp.co/api/v1/ai/eval/runs/{runId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/ai/eval/runs/{runId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"cancelled": 4,
"run": {
"branch_id": null,
"branch_name": null,
"completed_at": null,
"created_at": "2025-01-15T10:00:00.000Z",
"description": null,
"id": "660e8400-e29b-41d4-a716-446655440001",
"is_archived": false,
"model_id": "880e8400-e29b-41d4-a716-446655440003",
"prompt_set_id": "550e8400-e29b-41d4-a716-446655440000",
"results": [
{
"agentic_job": {
"conversation_id": "770e8400-e29b-41d4-a716-446655440002",
"id": "990e8400-e29b-41d4-a716-446655440004",
"state": "COMPLETE"
},
"cost": 0.0021,
"error_reason": null,
"id": "aa0e8400-e29b-41d4-a716-446655440005",
"prompt": "What are the top 5 products by revenue?",
"score": 0.9,
"scoring_cost": 0.0004,
"timing_ms": 4321
}
],
"run_number": 3,
"status": "RUNNING"
},
"total": 12
}{
"detail": "Bad Request: runId: Invalid uuid",
"status": 400
}{
"detail": "Unauthorized: Missing or invalid API key",
"status": 401
}{
"detail": "AI eval requires at least Querier access on the model",
"status": 403
}{
"detail": "Prompt set not found",
"status": 404
}Evals
Cancel an eval run
Cancel an in-flight eval run. Marks the run cancelled first so no in-progress per-prompt job can flip it back to COMPLETE, then cancels every non-terminal agentic job associated with the run. The run is also archived as part of the cancel — the response returns the updated run inline (status: CANCELLED, is_archived: true); use /unarchive to surface it in the default archived=false list again.
POST
/
v1
/
ai
/
eval
/
runs
/
{runId}
/
cancel
Cancel an eval run
curl --request POST \
--url https://{instance}.omniapp.co/api/v1/ai/eval/runs/{runId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.omniapp.co/api/v1/ai/eval/runs/{runId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.omniapp.co/api/v1/ai/eval/runs/{runId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{instance}.omniapp.co/api/v1/ai/eval/runs/{runId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{instance}.omniapp.co/api/v1/ai/eval/runs/{runId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{instance}.omniapp.co/api/v1/ai/eval/runs/{runId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/ai/eval/runs/{runId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"cancelled": 4,
"run": {
"branch_id": null,
"branch_name": null,
"completed_at": null,
"created_at": "2025-01-15T10:00:00.000Z",
"description": null,
"id": "660e8400-e29b-41d4-a716-446655440001",
"is_archived": false,
"model_id": "880e8400-e29b-41d4-a716-446655440003",
"prompt_set_id": "550e8400-e29b-41d4-a716-446655440000",
"results": [
{
"agentic_job": {
"conversation_id": "770e8400-e29b-41d4-a716-446655440002",
"id": "990e8400-e29b-41d4-a716-446655440004",
"state": "COMPLETE"
},
"cost": 0.0021,
"error_reason": null,
"id": "aa0e8400-e29b-41d4-a716-446655440005",
"prompt": "What are the top 5 products by revenue?",
"score": 0.9,
"scoring_cost": 0.0004,
"timing_ms": 4321
}
],
"run_number": 3,
"status": "RUNNING"
},
"total": 12
}{
"detail": "Bad Request: runId: Invalid uuid",
"status": 400
}{
"detail": "Unauthorized: Missing or invalid API key",
"status": 401
}{
"detail": "AI eval requires at least Querier access on the model",
"status": 403
}{
"detail": "Prompt set not found",
"status": 404
}Authorizations
bearerAuthorgApiKey
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Path Parameters
The unique identifier of the eval run.
Example:
"660e8400-e29b-41d4-a716-446655440001"
Response
Cancellation processed.
Was this page helpful?
⌘I

