curl --request POST \
--url https://api.nugen.in/api/v3/evaluations/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_id": "model_01k4x9m2p7q3r9d1",
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"evaluation_name": "Clause Review v2 Eval",
"custom_metrics": {},
"baseline_model_id": "model_01k4x9m2p7q3r9d2"
}
'import requests
url = "https://api.nugen.in/api/v3/evaluations/create"
payload = {
"model_id": "model_01k4x9m2p7q3r9d1",
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"evaluation_name": "Clause Review v2 Eval",
"custom_metrics": {},
"baseline_model_id": "model_01k4x9m2p7q3r9d2"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model_id: 'model_01k4x9m2p7q3r9d1',
benchmark_id: 'benchmark_01k4x9m2p7q3r6a1',
evaluation_name: 'Clause Review v2 Eval',
custom_metrics: {},
baseline_model_id: 'model_01k4x9m2p7q3r9d2'
})
};
fetch('https://api.nugen.in/api/v3/evaluations/create', 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://api.nugen.in/api/v3/evaluations/create",
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([
'model_id' => 'model_01k4x9m2p7q3r9d1',
'benchmark_id' => 'benchmark_01k4x9m2p7q3r6a1',
'evaluation_name' => 'Clause Review v2 Eval',
'custom_metrics' => [
],
'baseline_model_id' => 'model_01k4x9m2p7q3r9d2'
]),
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://api.nugen.in/api/v3/evaluations/create"
payload := strings.NewReader("{\n \"model_id\": \"model_01k4x9m2p7q3r9d1\",\n \"benchmark_id\": \"benchmark_01k4x9m2p7q3r6a1\",\n \"evaluation_name\": \"Clause Review v2 Eval\",\n \"custom_metrics\": {},\n \"baseline_model_id\": \"model_01k4x9m2p7q3r9d2\"\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://api.nugen.in/api/v3/evaluations/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_id\": \"model_01k4x9m2p7q3r9d1\",\n \"benchmark_id\": \"benchmark_01k4x9m2p7q3r6a1\",\n \"evaluation_name\": \"Clause Review v2 Eval\",\n \"custom_metrics\": {},\n \"baseline_model_id\": \"model_01k4x9m2p7q3r9d2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/evaluations/create")
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 \"model_id\": \"model_01k4x9m2p7q3r9d1\",\n \"benchmark_id\": \"benchmark_01k4x9m2p7q3r6a1\",\n \"evaluation_name\": \"Clause Review v2 Eval\",\n \"custom_metrics\": {},\n \"baseline_model_id\": \"model_01k4x9m2p7q3r9d2\"\n}"
response = http.request(request)
puts response.read_body{
"evaluation_id": "evaluation_01k4x9m2p7q3r7b1",
"evaluation_name": "Clause Review v2 Eval",
"model_id": "model_01k4x9m2p7q3r9d1",
"status": "PROCESSING",
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"created_at": "2024-02-24T10:00:00Z",
"message": "Evaluation created successfully"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create Evaluation
Create a new model evaluation using an existing benchmark.
This endpoint initiates a model evaluation using a benchmark from your library. Supports both single model evaluation and comparison mode where two models are evaluated side-by-side.
Request Body:
model_id: Primary model to evaluate (required)benchmark_id: ID of the benchmark to use for evaluation (required)baseline_model_id(optional): Baseline model ID for comparison modecustom_metrics(optional): Custom evaluation metrics configurationevaluation_name(optional): Display name. Defaults to the evaluation id if omitted
Returns:
evaluation_id: Unique identifier for tracking the evaluationmodel_id: The primary model being evaluatedstatus: Initial status (alwaysPROCESSING)benchmark_id: The benchmark being usedcreated_at: Timestamp when evaluation was createdmessage: Confirmation message
Example Request (Single Model):
POST /api/v3/evaluations/create
Headers: {"Authorization": "Bearer <api_key>"}
{
"model_id": "model_01kmqm4nrn9fw6r",
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"custom_metrics": ["accuracy", "relevance"]
}
Example Request (Comparison Mode):
POST /api/v3/evaluations/create
Headers: {"Authorization": "Bearer <api_key>"}
{
"model_id": "qwen-v2p5-0p5b-instruct",
"baseline_model_id": "model_01kmqm4nrn9fw6r",
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1"
}
Example Response:
{
"evaluation_id": "evaluation_01k4x9m2p7q3r7b1",
"model_id": "model_01kmqm4nrn9fw6r",
"status": "PROCESSING",
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"created_at": "2024-01-15T10:30:00Z",
"message": "Evaluation created successfully and queued for execution"
}
Notes:
- Single model mode: Evaluates one model against the benchmark
- Comparison mode: Provide
baseline_model_idto compare two models side-by-side - Evaluation runs asynchronously - use the returned
evaluation_idto check status - Use
/evaluations/{evaluation_id}/statusto track progress
curl --request POST \
--url https://api.nugen.in/api/v3/evaluations/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_id": "model_01k4x9m2p7q3r9d1",
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"evaluation_name": "Clause Review v2 Eval",
"custom_metrics": {},
"baseline_model_id": "model_01k4x9m2p7q3r9d2"
}
'import requests
url = "https://api.nugen.in/api/v3/evaluations/create"
payload = {
"model_id": "model_01k4x9m2p7q3r9d1",
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"evaluation_name": "Clause Review v2 Eval",
"custom_metrics": {},
"baseline_model_id": "model_01k4x9m2p7q3r9d2"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model_id: 'model_01k4x9m2p7q3r9d1',
benchmark_id: 'benchmark_01k4x9m2p7q3r6a1',
evaluation_name: 'Clause Review v2 Eval',
custom_metrics: {},
baseline_model_id: 'model_01k4x9m2p7q3r9d2'
})
};
fetch('https://api.nugen.in/api/v3/evaluations/create', 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://api.nugen.in/api/v3/evaluations/create",
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([
'model_id' => 'model_01k4x9m2p7q3r9d1',
'benchmark_id' => 'benchmark_01k4x9m2p7q3r6a1',
'evaluation_name' => 'Clause Review v2 Eval',
'custom_metrics' => [
],
'baseline_model_id' => 'model_01k4x9m2p7q3r9d2'
]),
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://api.nugen.in/api/v3/evaluations/create"
payload := strings.NewReader("{\n \"model_id\": \"model_01k4x9m2p7q3r9d1\",\n \"benchmark_id\": \"benchmark_01k4x9m2p7q3r6a1\",\n \"evaluation_name\": \"Clause Review v2 Eval\",\n \"custom_metrics\": {},\n \"baseline_model_id\": \"model_01k4x9m2p7q3r9d2\"\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://api.nugen.in/api/v3/evaluations/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_id\": \"model_01k4x9m2p7q3r9d1\",\n \"benchmark_id\": \"benchmark_01k4x9m2p7q3r6a1\",\n \"evaluation_name\": \"Clause Review v2 Eval\",\n \"custom_metrics\": {},\n \"baseline_model_id\": \"model_01k4x9m2p7q3r9d2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/evaluations/create")
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 \"model_id\": \"model_01k4x9m2p7q3r9d1\",\n \"benchmark_id\": \"benchmark_01k4x9m2p7q3r6a1\",\n \"evaluation_name\": \"Clause Review v2 Eval\",\n \"custom_metrics\": {},\n \"baseline_model_id\": \"model_01k4x9m2p7q3r9d2\"\n}"
response = http.request(request)
puts response.read_body{
"evaluation_id": "evaluation_01k4x9m2p7q3r7b1",
"evaluation_name": "Clause Review v2 Eval",
"model_id": "model_01k4x9m2p7q3r9d1",
"status": "PROCESSING",
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"created_at": "2024-02-24T10:00:00Z",
"message": "Evaluation created successfully"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
ID of the model to evaluate
"model_01k4x9m2p7q3r9d1"
ID of an existing benchmark
"benchmark_01k4x9m2p7q3r6a1"
Display name for the evaluation. Defaults to the evaluation id if omitted.
"Clause Review v2 Eval"
Custom metrics configuration
ID of baseline model for comparison mode (eval-compare)
"model_01k4x9m2p7q3r9d2"
Response
Returns a unique identifier for the initiated evaluation along with the initial evaluation status. This endpoint starts an asynchronous evaluation using a specified benchmark and model(s), allowing users to track progress and retrieve results once completed.
Unique identifier for the evaluation
"evaluation_01k4x9m2p7q3r7b1"
Display name of the evaluation
"Clause Review v2 Eval"
ID of the model being evaluated
"model_01k4x9m2p7q3r9d1"
Current status of the evaluation
"PROCESSING"
Benchmark ID used
"benchmark_01k4x9m2p7q3r6a1"
timestamp of evaluation creation
"2024-02-24T10:00:00Z"
Status message
"Evaluation created successfully"
Was this page helpful?