Skip to main content
POST
/
api
/
v1
/
llm
/
evals
/
suites
Python (SDK)
from meetkai_mka1 import SDK, models


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

    res = sdk.llm.evals.create_suite(name="Multilingual QA smoke suite", manifest={
        "tasks": [
            models.EvalTask(
                id="spanish_qa",
                type="custom",
                dataset=models.EvalDataset(
                    source="huggingface",
                    path="IIC/AQuAS",
                    split="test",
                ),
                prompt_template="Responde usando el contexto.\n\nContexto: {{context}}\n\nPregunta: {{question}}\n\nRespuesta:",
                target_template="{{answer}}",
                grader=models.EvalPythonGrader(
                    contract="model_backed",
                    model_access="mka1",
                    file_id="file_grader123",
                ),
                preprocess=models.EvalPythonPreprocessor(
                    source="def transform(row):\n    return row\n",
                ),
                num_fewshot=1,
            ),
        ],
    }, description="Declarative eval tasks backed by uploaded files or Hugging Face datasets and Python graders.", metadata={
        "owner": "eval-team",
    })

    # 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.createSuite({
createEvalSuiteRequest: {
name: "Multilingual QA smoke suite",
description: "Declarative eval tasks backed by uploaded files or Hugging Face datasets and Python graders.",
manifest: {
tasks: [
{
id: "spanish_qa",
type: "custom",
dataset: {
source: "huggingface",
path: "IIC/AQuAS",
split: "test",
},
promptTemplate: "Responde usando el contexto.\n\nContexto: {{context}}\n\nPregunta: {{question}}\n\nRespuesta:",
targetTemplate: "{{answer}}",
grader: {
type: "python",
contract: "model_backed",
modelAccess: "mka1",
fileId: "file_grader123",
},
preprocess: {
type: "python",
source: "def transform(row):\n return row\n",
},
numFewshot: 1,
},
],
},
metadata: {
"owner": "eval-team",
},
},
});

console.log(result);
}

run();
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using System.Collections.Generic;

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

var res = await sdk.Llm.Evals.CreateSuiteAsync(body: new MeetKai.MKA1.Types.Components.CreateEvalSuiteRequest() {
Name = "Multilingual QA smoke suite",
Description = "Declarative eval tasks backed by uploaded files or Hugging Face datasets and Python graders.",
Manifest = new EvalSuiteManifest() {
Tasks = new List<EvalTask>() {
new EvalTask() {
Id = "spanish_qa",
Type = EvalTaskType.Custom,
Dataset = new EvalDataset() {
Source = EvalDatasetSource.Huggingface,
Path = "IIC/AQuAS",
Split = "test",
},
PromptTemplate = @"Responde usando el contexto.

Contexto: {{context}}

Pregunta: {{question}}

Respuesta:",
TargetTemplate = "{{answer}}",
Grader = new EvalPythonGrader() {
Contract = EvalPythonGraderContract.ModelBacked,
ModelAccess = EvalPythonGraderModelAccess.Mka1,
FileId = "file_grader123",
},
Preprocess = new EvalPythonPreprocessor() {
Source = @"def transform(row):
return row
",
},
NumFewshot = 1,
},
},
},
Metadata = new Dictionary<string, string>() {
{ "owner", "eval-team" },
},
});

// handle response
curl --request POST \
--url https://apigw.mka1.com/api/v1/llm/evals/suites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Multilingual QA smoke suite",
"description": "Declarative eval tasks backed by uploaded files or Hugging Face datasets and Python graders.",
"manifest": {
"schema_version": "2026-05-27",
"tasks": [
{
"id": "spanish_qa",
"type": "custom",
"dataset": {
"source": "huggingface",
"path": "IIC/AQuAS",
"split": "test"
},
"num_fewshot": 1,
"prompt_template": "Responde usando el contexto.\n\nContexto: {{context}}\n\nPregunta: {{question}}\n\nRespuesta:",
"target_template": "{{answer}}",
"preprocess": {
"type": "python",
"source": "def transform(row):\n return row\n"
},
"grader": {
"type": "python",
"contract": "model_backed",
"model_access": "mka1",
"file_id": "file_grader123",
"timeout_seconds": 120
}
}
]
},
"metadata": {
"owner": "eval-team"
}
}
'
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Multilingual QA smoke suite',
description: 'Declarative eval tasks backed by uploaded files or Hugging Face datasets and Python graders.',
manifest: {
schema_version: '2026-05-27',
tasks: [
{
id: 'spanish_qa',
type: 'custom',
dataset: {source: 'huggingface', path: 'IIC/AQuAS', split: 'test'},
num_fewshot: 1,
prompt_template: 'Responde usando el contexto.\n\nContexto: {{context}}\n\nPregunta: {{question}}\n\nRespuesta:',
target_template: '{{answer}}',
preprocess: {type: 'python', source: 'def transform(row):\n return row\n'},
grader: {
type: 'python',
contract: 'model_backed',
model_access: 'mka1',
file_id: 'file_grader123',
timeout_seconds: 120
}
}
]
},
metadata: {owner: 'eval-team'}
})
};

fetch('https://apigw.mka1.com/api/v1/llm/evals/suites', 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/suites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Multilingual QA smoke suite',
'description' => 'Declarative eval tasks backed by uploaded files or Hugging Face datasets and Python graders.',
'manifest' => [
'schema_version' => '2026-05-27',
'tasks' => [
[
'id' => 'spanish_qa',
'type' => 'custom',
'dataset' => [
'source' => 'huggingface',
'path' => 'IIC/AQuAS',
'split' => 'test'
],
'num_fewshot' => 1,
'prompt_template' => 'Responde usando el contexto.

Contexto: {{context}}

Pregunta: {{question}}

Respuesta:',
'target_template' => '{{answer}}',
'preprocess' => [
'type' => 'python',
'source' => 'def transform(row):
return row
'
],
'grader' => [
'type' => 'python',
'contract' => 'model_backed',
'model_access' => 'mka1',
'file_id' => 'file_grader123',
'timeout_seconds' => 120
]
]
]
],
'metadata' => [
'owner' => 'eval-team'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://apigw.mka1.com/api/v1/llm/evals/suites"

payload := strings.NewReader("{\n \"name\": \"Multilingual QA smoke suite\",\n \"description\": \"Declarative eval tasks backed by uploaded files or Hugging Face datasets and Python graders.\",\n \"manifest\": {\n \"schema_version\": \"2026-05-27\",\n \"tasks\": [\n {\n \"id\": \"spanish_qa\",\n \"type\": \"custom\",\n \"dataset\": {\n \"source\": \"huggingface\",\n \"path\": \"IIC/AQuAS\",\n \"split\": \"test\"\n },\n \"num_fewshot\": 1,\n \"prompt_template\": \"Responde usando el contexto.\\n\\nContexto: {{context}}\\n\\nPregunta: {{question}}\\n\\nRespuesta:\",\n \"target_template\": \"{{answer}}\",\n \"preprocess\": {\n \"type\": \"python\",\n \"source\": \"def transform(row):\\n return row\\n\"\n },\n \"grader\": {\n \"type\": \"python\",\n \"contract\": \"model_backed\",\n \"model_access\": \"mka1\",\n \"file_id\": \"file_grader123\",\n \"timeout_seconds\": 120\n }\n }\n ]\n },\n \"metadata\": {\n \"owner\": \"eval-team\"\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

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/suites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Multilingual QA smoke suite\",\n \"description\": \"Declarative eval tasks backed by uploaded files or Hugging Face datasets and Python graders.\",\n \"manifest\": {\n \"schema_version\": \"2026-05-27\",\n \"tasks\": [\n {\n \"id\": \"spanish_qa\",\n \"type\": \"custom\",\n \"dataset\": {\n \"source\": \"huggingface\",\n \"path\": \"IIC/AQuAS\",\n \"split\": \"test\"\n },\n \"num_fewshot\": 1,\n \"prompt_template\": \"Responde usando el contexto.\\n\\nContexto: {{context}}\\n\\nPregunta: {{question}}\\n\\nRespuesta:\",\n \"target_template\": \"{{answer}}\",\n \"preprocess\": {\n \"type\": \"python\",\n \"source\": \"def transform(row):\\n return row\\n\"\n },\n \"grader\": {\n \"type\": \"python\",\n \"contract\": \"model_backed\",\n \"model_access\": \"mka1\",\n \"file_id\": \"file_grader123\",\n \"timeout_seconds\": 120\n }\n }\n ]\n },\n \"metadata\": {\n \"owner\": \"eval-team\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://apigw.mka1.com/api/v1/llm/evals/suites")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Multilingual QA smoke suite\",\n \"description\": \"Declarative eval tasks backed by uploaded files or Hugging Face datasets and Python graders.\",\n \"manifest\": {\n \"schema_version\": \"2026-05-27\",\n \"tasks\": [\n {\n \"id\": \"spanish_qa\",\n \"type\": \"custom\",\n \"dataset\": {\n \"source\": \"huggingface\",\n \"path\": \"IIC/AQuAS\",\n \"split\": \"test\"\n },\n \"num_fewshot\": 1,\n \"prompt_template\": \"Responde usando el contexto.\\n\\nContexto: {{context}}\\n\\nPregunta: {{question}}\\n\\nRespuesta:\",\n \"target_template\": \"{{answer}}\",\n \"preprocess\": {\n \"type\": \"python\",\n \"source\": \"def transform(row):\\n return row\\n\"\n },\n \"grader\": {\n \"type\": \"python\",\n \"contract\": \"model_backed\",\n \"model_access\": \"mka1\",\n \"file_id\": \"file_grader123\",\n \"timeout_seconds\": 120\n }\n }\n ]\n },\n \"metadata\": {\n \"owner\": \"eval-team\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": "eval_suite_aa87e2b1112a455b8deabed784372198",
  "object": "eval.suite",
  "name": "Multilingual QA smoke suite",
  "description": "Declarative eval tasks backed by uploaded files or Hugging Face datasets and Python graders.",
  "active_version": 1,
  "latest_version": 1,
  "metadata": {
    "owner": "eval-team"
  },
  "created_at": 1704067200,
  "updated_at": 1704067200
}

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.

Body

application/json
name
string
required
Required string length: 1 - 255
manifest
object
required
description
string
Maximum string length: 10000
metadata
object

Response

200 - application/json

OK

id
string
required
object
any
required
name
string
required
description
string | null
required
active_version
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
latest_version
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
metadata
object
required
created_at
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
updated_at
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991