curl --request GET \
--url https://api.mixpeek.com/v1/retrievers/benchmarks \
--header 'Authorization: Bearer <token>' \
--header 'X-Namespace: <api-key>'import requests
url = "https://api.mixpeek.com/v1/retrievers/benchmarks"
headers = {
"Authorization": "Bearer <token>",
"X-Namespace": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'X-Namespace': '<api-key>'}
};
fetch('https://api.mixpeek.com/v1/retrievers/benchmarks', 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/retrievers/benchmarks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Namespace: <api-key>"
],
]);
$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://api.mixpeek.com/v1/retrievers/benchmarks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Namespace", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mixpeek.com/v1/retrievers/benchmarks")
.header("Authorization", "Bearer <token>")
.header("X-Namespace", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/retrievers/benchmarks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Namespace"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"benchmarks": [
{
"benchmark_id": "<string>",
"benchmark_name": "<string>",
"baseline_retriever_id": "<string>",
"candidate_retriever_ids": [
"<string>"
],
"session_count": 123,
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"session_filter": {
"retriever_ids": [
"<string>"
],
"taxonomy_node_ids": [
"<string>"
],
"time_range": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"min_interactions": 1,
"interaction_types": [
"<string>"
],
"sample_strategy": "random",
"interaction_weights": {
"weights": {}
}
},
"results": [
{
"retriever_id": "<string>",
"retriever_name": "<string>",
"pipeline_hash": "<string>",
"metrics": {
"avg_position_delta": -1.5,
"items_demoted": 45,
"items_promoted": 120,
"mean_rank_clicked": 4.2,
"mean_rank_purchased": 2.8,
"ndcg_at_k": {
"5": 0.78,
"10": 0.82,
"20": 0.85
},
"recall_at_k": {
"5": 0.65,
"10": 0.8,
"20": 0.92
},
"sessions_degraded": 210,
"sessions_improved": 580,
"sessions_neutral": 210
},
"latency": {
"p50_ms": 1,
"p90_ms": 1,
"p99_ms": 1,
"mean_ms": 1,
"stage_latencies": {}
},
"failed_sessions": 1,
"taxonomy_deltas": {},
"cost_per_query_credits": 1,
"error_summary": {}
}
],
"comparison": {
"baseline_retriever_id": "<string>",
"comparisons": [
{
"candidate_retriever_id": "<string>",
"ndcg_delta": {},
"recall_delta": {},
"latency_delta_ms": 123,
"p_value": 123,
"confidence_interval": {
"[0]": 123,
"[1]": 123
},
"taxonomy_wins": [
"<string>"
],
"taxonomy_losses": [
"<string>"
]
}
],
"recommendation": "<string>"
},
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"error_message": "<string>"
}
],
"total": 123,
"page": 1,
"page_size": 20
}{
"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
}{
"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
}List benchmarks
Lists the benchmarks in the namespace in the request. The response holds them in benchmarks, with total, page and page_size. Filter with retriever_id, which matches the baseline or any candidate, and with status. An unknown status value answers 400. Each item has the same fields as GET /v1/retrievers/benchmarks/{benchmark_id}, so you can read results here without a second call.
Retriever Benchmarks: A retriever benchmark replays real past searches, recorded as retriever executions with user interactions, through a baseline retriever and one or more candidate retrievers. It scores how well each one ranks the documents users acted on, such as clicks and positive feedback. Use it to compare retriever changes against real behavior before you switch.
curl --request GET \
--url https://api.mixpeek.com/v1/retrievers/benchmarks \
--header 'Authorization: Bearer <token>' \
--header 'X-Namespace: <api-key>'import requests
url = "https://api.mixpeek.com/v1/retrievers/benchmarks"
headers = {
"Authorization": "Bearer <token>",
"X-Namespace": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'X-Namespace': '<api-key>'}
};
fetch('https://api.mixpeek.com/v1/retrievers/benchmarks', 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/retrievers/benchmarks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Namespace: <api-key>"
],
]);
$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://api.mixpeek.com/v1/retrievers/benchmarks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Namespace", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mixpeek.com/v1/retrievers/benchmarks")
.header("Authorization", "Bearer <token>")
.header("X-Namespace", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/retrievers/benchmarks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Namespace"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"benchmarks": [
{
"benchmark_id": "<string>",
"benchmark_name": "<string>",
"baseline_retriever_id": "<string>",
"candidate_retriever_ids": [
"<string>"
],
"session_count": 123,
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"session_filter": {
"retriever_ids": [
"<string>"
],
"taxonomy_node_ids": [
"<string>"
],
"time_range": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"min_interactions": 1,
"interaction_types": [
"<string>"
],
"sample_strategy": "random",
"interaction_weights": {
"weights": {}
}
},
"results": [
{
"retriever_id": "<string>",
"retriever_name": "<string>",
"pipeline_hash": "<string>",
"metrics": {
"avg_position_delta": -1.5,
"items_demoted": 45,
"items_promoted": 120,
"mean_rank_clicked": 4.2,
"mean_rank_purchased": 2.8,
"ndcg_at_k": {
"5": 0.78,
"10": 0.82,
"20": 0.85
},
"recall_at_k": {
"5": 0.65,
"10": 0.8,
"20": 0.92
},
"sessions_degraded": 210,
"sessions_improved": 580,
"sessions_neutral": 210
},
"latency": {
"p50_ms": 1,
"p90_ms": 1,
"p99_ms": 1,
"mean_ms": 1,
"stage_latencies": {}
},
"failed_sessions": 1,
"taxonomy_deltas": {},
"cost_per_query_credits": 1,
"error_summary": {}
}
],
"comparison": {
"baseline_retriever_id": "<string>",
"comparisons": [
{
"candidate_retriever_id": "<string>",
"ndcg_delta": {},
"recall_delta": {},
"latency_delta_ms": 123,
"p_value": 123,
"confidence_interval": {
"[0]": 123,
"[1]": 123
},
"taxonomy_wins": [
"<string>"
],
"taxonomy_losses": [
"<string>"
]
}
],
"recommendation": "<string>"
},
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"error_message": "<string>"
}
],
"total": 123,
"page": 1,
"page_size": 20
}{
"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
}{
"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
}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, malformed, unknown, revoked, inactive or expired key returns 401; a key without the permission, scope or plan an operation needs returns 403.
Query Parameters
Was this page helpful?

