Skip to main content
POST
/
api
/
v1
/
llm
/
evals
/
runs
/
{run_id}
/
cancel
Python (SDK)
from meetkai_mka1 import SDK


with SDK(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:

    res = sdk.llm.evals.cancel_run(run_id="eval_run_aa87e2b1112a455b8deabed784372198")

    # Handle response
    print(res)
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.evals.cancelRun({
    runId: "eval_run_aa87e2b1112a455b8deabed784372198",
  });

  console.log(result);
}

run();
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;

var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");

var res = await sdk.Llm.Evals.CancelRunAsync(runId: "eval_run_aa87e2b1112a455b8deabed784372198");

// handle response
curl --request POST \
  --url https://apigw.mka1.com/api/v1/llm/evals/runs/{run_id}/cancel \
  --header 'Authorization: Bearer <token>'
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch('https://apigw.mka1.com/api/v1/llm/evals/runs/{run_id}/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://apigw.mka1.com/api/v1/llm/evals/runs/{run_id}/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://apigw.mka1.com/api/v1/llm/evals/runs/{run_id}/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://apigw.mka1.com/api/v1/llm/evals/runs/{run_id}/cancel")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://apigw.mka1.com/api/v1/llm/evals/runs/{run_id}/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
{
  "id": "<string>",
  "object": "<unknown>",
  "suite_id": "<string>",
  "suite_version": 0,
  "suite_version_id": "<string>",
  "models": [
    "<string>"
  ],
  "task_ids": [
    "<string>"
  ],
  "judge_model": "<string>",
  "embedding_model": "<string>",
  "generation": {
    "instructions": "<string>",
    "temperature": 1,
    "top_p": 0.5,
    "max_output_tokens": 4503599627370496,
    "max_gen_toks": 4503599627370496,
    "stop": "<string>",
    "until": [
      "<string>"
    ],
    "max_tool_calls": 4503599627370496,
    "reasoning": "<unknown>",
    "text": "<unknown>",
    "tools": [
      null
    ],
    "tool_choice": "<unknown>",
    "parallel_tool_calls": true,
    "presence_penalty": 0,
    "frequency_penalty": 0,
    "top_k": 4503599627370495,
    "min_p": 0.5,
    "repetition_penalty": 1,
    "do_sample": true,
    "extra_body": {},
    "chat_template_kwargs": {},
    "prefill_think": true,
    "use_cache": true,
    "timeout_seconds": 1800,
    "max_retries": 5,
    "max_empty_retries": 5
  },
  "request_counts": {
    "total": 0,
    "completed": 0,
    "failed": 0
  },
  "metrics": {},
  "error": {},
  "artifact_file_ids": [
    "<string>"
  ],
  "metadata": {},
  "created_at": 0,
  "started_at": 0,
  "completed_at": 0,
  "cancelled_at": 0,
  "failed_at": 0
}

Authorizations

Authorization
string
header
required

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Headers

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Path Parameters

run_id
string
required

Response

200 - application/json

OK

id
string
required
object
any
required
suite_id
string
required
suite_version
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
suite_version_id
string
required
status
enum<string>
required
Available options:
queued,
in_progress,
finalizing,
completed,
failed,
cancelling,
cancelled
models
string[]
required
task_ids
string[] | null
required
judge_model
string | null
required
embedding_model
string | null
required
generation
object
required
request_counts
object
required
metrics
object | null
required
error
object | null
required
artifact_file_ids
string[]
required
metadata
object
required
created_at
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
started_at
integer | null
required
Required range: -9007199254740991 <= x <= 9007199254740991
completed_at
integer | null
required
Required range: -9007199254740991 <= x <= 9007199254740991
cancelled_at
integer | null
required
Required range: -9007199254740991 <= x <= 9007199254740991
failed_at
integer | null
required
Required range: -9007199254740991 <= x <= 9007199254740991