RunTournamentAPI mirrors erdo_run_pairwise_tournament: rank an experiment's
curl --request POST \
--url https://api.erdo.ai/v1/experiments/{experimentSlug}/tournament \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"criteria": "<string>",
"kind": "<string>",
"max_comparisons": 123,
"variant_keys": [
"<string>"
]
}
'import requests
url = "https://api.erdo.ai/v1/experiments/{experimentSlug}/tournament"
payload = {
"criteria": "<string>",
"kind": "<string>",
"max_comparisons": 123,
"variant_keys": ["<string>"]
}
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({
criteria: '<string>',
kind: '<string>',
max_comparisons: 123,
variant_keys: ['<string>']
})
};
fetch('https://api.erdo.ai/v1/experiments/{experimentSlug}/tournament', 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.erdo.ai/v1/experiments/{experimentSlug}/tournament",
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([
'criteria' => '<string>',
'kind' => '<string>',
'max_comparisons' => 123,
'variant_keys' => [
'<string>'
]
]),
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.erdo.ai/v1/experiments/{experimentSlug}/tournament"
payload := strings.NewReader("{\n \"criteria\": \"<string>\",\n \"kind\": \"<string>\",\n \"max_comparisons\": 123,\n \"variant_keys\": [\n \"<string>\"\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://api.erdo.ai/v1/experiments/{experimentSlug}/tournament")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"criteria\": \"<string>\",\n \"kind\": \"<string>\",\n \"max_comparisons\": 123,\n \"variant_keys\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/experiments/{experimentSlug}/tournament")
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 \"criteria\": \"<string>\",\n \"kind\": \"<string>\",\n \"max_comparisons\": 123,\n \"variant_keys\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"experiment_slug": "<string>",
"missing_variant_keys": [
"<string>"
],
"result": {
"cluster_method": "<string>",
"comparisons": [
{
"confidence": 123,
"loser_key": "<string>",
"persisted": true,
"reasoning": "<string>",
"shown_as_a": "<string>",
"shown_as_b": "<string>",
"winner_key": "<string>"
}
],
"converged": true,
"iterations": 123,
"judge_slug": "<string>",
"merges": [
{
"merged_key": "<string>",
"method": "<string>",
"representative_key": "<string>",
"similarity": 123
}
],
"persisted": 123,
"ranking": [
{
"comparisons": 123,
"key": "<string>",
"rank": 123,
"represents": [
"<string>"
],
"score": 123,
"strength": 123,
"variant_key": "<string>"
}
],
"skipped_pairs": 123
},
"variants_without_page": [
"<string>"
]
}{
"code": "not_found",
"details": {},
"message": "<string>"
}API Reference
RunTournamentAPI mirrors erdo_run_pairwise_tournament: rank an experiment's
page variants pairwise and persist the comparisons to the ledger. Synchronous — each judged pair is one LLM round-trip, so expect minutes.
POST
/
v1
/
experiments
/
{experimentSlug}
/
tournament
RunTournamentAPI mirrors erdo_run_pairwise_tournament: rank an experiment's
curl --request POST \
--url https://api.erdo.ai/v1/experiments/{experimentSlug}/tournament \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"criteria": "<string>",
"kind": "<string>",
"max_comparisons": 123,
"variant_keys": [
"<string>"
]
}
'import requests
url = "https://api.erdo.ai/v1/experiments/{experimentSlug}/tournament"
payload = {
"criteria": "<string>",
"kind": "<string>",
"max_comparisons": 123,
"variant_keys": ["<string>"]
}
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({
criteria: '<string>',
kind: '<string>',
max_comparisons: 123,
variant_keys: ['<string>']
})
};
fetch('https://api.erdo.ai/v1/experiments/{experimentSlug}/tournament', 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.erdo.ai/v1/experiments/{experimentSlug}/tournament",
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([
'criteria' => '<string>',
'kind' => '<string>',
'max_comparisons' => 123,
'variant_keys' => [
'<string>'
]
]),
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.erdo.ai/v1/experiments/{experimentSlug}/tournament"
payload := strings.NewReader("{\n \"criteria\": \"<string>\",\n \"kind\": \"<string>\",\n \"max_comparisons\": 123,\n \"variant_keys\": [\n \"<string>\"\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://api.erdo.ai/v1/experiments/{experimentSlug}/tournament")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"criteria\": \"<string>\",\n \"kind\": \"<string>\",\n \"max_comparisons\": 123,\n \"variant_keys\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/experiments/{experimentSlug}/tournament")
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 \"criteria\": \"<string>\",\n \"kind\": \"<string>\",\n \"max_comparisons\": 123,\n \"variant_keys\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"experiment_slug": "<string>",
"missing_variant_keys": [
"<string>"
],
"result": {
"cluster_method": "<string>",
"comparisons": [
{
"confidence": 123,
"loser_key": "<string>",
"persisted": true,
"reasoning": "<string>",
"shown_as_a": "<string>",
"shown_as_b": "<string>",
"winner_key": "<string>"
}
],
"converged": true,
"iterations": 123,
"judge_slug": "<string>",
"merges": [
{
"merged_key": "<string>",
"method": "<string>",
"representative_key": "<string>",
"similarity": 123
}
],
"persisted": 123,
"ranking": [
{
"comparisons": 123,
"key": "<string>",
"rank": 123,
"represents": [
"<string>"
],
"score": 123,
"strength": 123,
"variant_key": "<string>"
}
],
"skipped_pairs": 123
},
"variants_without_page": [
"<string>"
]
}{
"code": "not_found",
"details": {},
"message": "<string>"
}Authorizations
An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).
Path Parameters
GetExperimentPolicyAPI mirrors erdo_get_experiment_policy — the decision
ListHeartbeatsAPI mirrors the erdo_list_heartbeats MCP tool.
⌘I

