curl --request POST \
--url https://api.mixpeek.com/v1/evaluations/score \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"predicted": [
"<string>"
],
"ground_truth": [
"<string>"
],
"items": [
{
"predicted": [
"<string>"
],
"ground_truth": [
"<string>"
]
}
],
"metrics": [
"<string>"
],
"k": 2
}
'import requests
url = "https://api.mixpeek.com/v1/evaluations/score"
payload = {
"predicted": ["<string>"],
"ground_truth": ["<string>"],
"items": [
{
"predicted": ["<string>"],
"ground_truth": ["<string>"]
}
],
"metrics": ["<string>"],
"k": 2
}
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({
predicted: ['<string>'],
ground_truth: ['<string>'],
items: [{predicted: ['<string>'], ground_truth: ['<string>']}],
metrics: ['<string>'],
k: 2
})
};
fetch('https://api.mixpeek.com/v1/evaluations/score', 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.mixpeek.com/v1/evaluations/score",
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([
'predicted' => [
'<string>'
],
'ground_truth' => [
'<string>'
],
'items' => [
[
'predicted' => [
'<string>'
],
'ground_truth' => [
'<string>'
]
]
],
'metrics' => [
'<string>'
],
'k' => 2
]),
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.mixpeek.com/v1/evaluations/score"
payload := strings.NewReader("{\n \"predicted\": [\n \"<string>\"\n ],\n \"ground_truth\": [\n \"<string>\"\n ],\n \"items\": [\n {\n \"predicted\": [\n \"<string>\"\n ],\n \"ground_truth\": [\n \"<string>\"\n ]\n }\n ],\n \"metrics\": [\n \"<string>\"\n ],\n \"k\": 2\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.mixpeek.com/v1/evaluations/score")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"predicted\": [\n \"<string>\"\n ],\n \"ground_truth\": [\n \"<string>\"\n ],\n \"items\": [\n {\n \"predicted\": [\n \"<string>\"\n ],\n \"ground_truth\": [\n \"<string>\"\n ]\n }\n ],\n \"metrics\": [\n \"<string>\"\n ],\n \"k\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/evaluations/score")
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 \"predicted\": [\n \"<string>\"\n ],\n \"ground_truth\": [\n \"<string>\"\n ],\n \"items\": [\n {\n \"predicted\": [\n \"<string>\"\n ],\n \"ground_truth\": [\n \"<string>\"\n ]\n }\n ],\n \"metrics\": [\n \"<string>\"\n ],\n \"k\": 2\n}"
response = http.request(request)
puts response.read_body{
"metrics": [
"<string>"
],
"count": 123,
"per_item": [
{}
],
"aggregate": {},
"k": 123
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}Score predictions vs ground truth (stateless)
Compute quality metrics (Precision@K, Recall@K, F1@K, F2@K) for precomputed predictions vs ground truth, with NO retriever, namespace, or persistence. Each item’s predicted and ground_truth are treated as SETS. Send a single pair (predicted + ground_truth) or an items batch. Returns per-item scores and the macro-average across items. Auth only (no X-Namespace). This is the stateless counterpart to the retriever-scoped evaluation runs — use it to dogfood F1/F2 on extraction/generation benchmarks.
curl --request POST \
--url https://api.mixpeek.com/v1/evaluations/score \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"predicted": [
"<string>"
],
"ground_truth": [
"<string>"
],
"items": [
{
"predicted": [
"<string>"
],
"ground_truth": [
"<string>"
]
}
],
"metrics": [
"<string>"
],
"k": 2
}
'import requests
url = "https://api.mixpeek.com/v1/evaluations/score"
payload = {
"predicted": ["<string>"],
"ground_truth": ["<string>"],
"items": [
{
"predicted": ["<string>"],
"ground_truth": ["<string>"]
}
],
"metrics": ["<string>"],
"k": 2
}
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({
predicted: ['<string>'],
ground_truth: ['<string>'],
items: [{predicted: ['<string>'], ground_truth: ['<string>']}],
metrics: ['<string>'],
k: 2
})
};
fetch('https://api.mixpeek.com/v1/evaluations/score', 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.mixpeek.com/v1/evaluations/score",
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([
'predicted' => [
'<string>'
],
'ground_truth' => [
'<string>'
],
'items' => [
[
'predicted' => [
'<string>'
],
'ground_truth' => [
'<string>'
]
]
],
'metrics' => [
'<string>'
],
'k' => 2
]),
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.mixpeek.com/v1/evaluations/score"
payload := strings.NewReader("{\n \"predicted\": [\n \"<string>\"\n ],\n \"ground_truth\": [\n \"<string>\"\n ],\n \"items\": [\n {\n \"predicted\": [\n \"<string>\"\n ],\n \"ground_truth\": [\n \"<string>\"\n ]\n }\n ],\n \"metrics\": [\n \"<string>\"\n ],\n \"k\": 2\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.mixpeek.com/v1/evaluations/score")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"predicted\": [\n \"<string>\"\n ],\n \"ground_truth\": [\n \"<string>\"\n ],\n \"items\": [\n {\n \"predicted\": [\n \"<string>\"\n ],\n \"ground_truth\": [\n \"<string>\"\n ]\n }\n ],\n \"metrics\": [\n \"<string>\"\n ],\n \"k\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/evaluations/score")
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 \"predicted\": [\n \"<string>\"\n ],\n \"ground_truth\": [\n \"<string>\"\n ],\n \"items\": [\n {\n \"predicted\": [\n \"<string>\"\n ],\n \"ground_truth\": [\n \"<string>\"\n ]\n }\n ],\n \"metrics\": [\n \"<string>\"\n ],\n \"k\": 2\n}"
response = http.request(request)
puts response.read_body{
"metrics": [
"<string>"
],
"count": 123,
"per_item": [
{}
],
"aggregate": {},
"k": 123
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}Authorizations
Mixpeek API key, sent as Authorization: Bearer mxp_sk_.... Create one in Studio under Settings → API Keys, or with an admin key via POST /v1/organizations/users/{user_email}/api-keys. A missing header returns 403; an invalid or revoked key returns 401.
Body
Score precomputed predictions vs ground truth, statelessly.
Send EITHER a single pair (predicted + ground_truth) or an items
batch (score many predictions in one call — the shape a benchmark of N
predictions wants). Exactly one form is required.
Single-pair form: predicted terms/ids. Pair with ground_truth.
Single-pair form: ground-truth terms/ids. Pair with predicted.
Batch form: a list of {predicted, ground_truth} pairs.
Show child attributes
Show child attributes
Metrics to compute. Allowed: precision, recall, f1, f2.
Cutoff: score only the first k predicted items. Default: all.
x >= 1Response
Successful Response
Per-item and aggregate (macro-mean) scores.
Metrics computed, in request order.
Number of items scored.
Each item's {metric: value} in [0.0, 1.0].
Show child attributes
Show child attributes
Macro-average (mean over items) of each metric.
Show child attributes
Show child attributes
Cutoff applied, if any.
Was this page helpful?

