curl --request POST \
--url https://api.benchgen.com/models/api/queue_benchmark_run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"competition_id": 123,
"model_id": 123,
"model": "<string>",
"phase_id": 123,
"env_vars": {},
"temperature": 123,
"max_tokens": 123,
"top_p": 123
}
'import requests
url = "https://api.benchgen.com/models/api/queue_benchmark_run"
payload = {
"competition_id": 123,
"model_id": 123,
"model": "<string>",
"phase_id": 123,
"env_vars": {},
"temperature": 123,
"max_tokens": 123,
"top_p": 123
}
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({
competition_id: 123,
model_id: 123,
model: '<string>',
phase_id: 123,
env_vars: {},
temperature: 123,
max_tokens: 123,
top_p: 123
})
};
fetch('https://api.benchgen.com/models/api/queue_benchmark_run', 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.benchgen.com/models/api/queue_benchmark_run",
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([
'competition_id' => 123,
'model_id' => 123,
'model' => '<string>',
'phase_id' => 123,
'env_vars' => [
],
'temperature' => 123,
'max_tokens' => 123,
'top_p' => 123
]),
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.benchgen.com/models/api/queue_benchmark_run"
payload := strings.NewReader("{\n \"competition_id\": 123,\n \"model_id\": 123,\n \"model\": \"<string>\",\n \"phase_id\": 123,\n \"env_vars\": {},\n \"temperature\": 123,\n \"max_tokens\": 123,\n \"top_p\": 123\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.benchgen.com/models/api/queue_benchmark_run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"competition_id\": 123,\n \"model_id\": 123,\n \"model\": \"<string>\",\n \"phase_id\": 123,\n \"env_vars\": {},\n \"temperature\": 123,\n \"max_tokens\": 123,\n \"top_p\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benchgen.com/models/api/queue_benchmark_run")
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 \"competition_id\": 123,\n \"model_id\": 123,\n \"model\": \"<string>\",\n \"phase_id\": 123,\n \"env_vars\": {},\n \"temperature\": 123,\n \"max_tokens\": 123,\n \"top_p\": 123\n}"
response = http.request(request)
puts response.read_body{
"submission_id": 123,
"submission_status": "<string>",
"resolved_model": {},
"competition_id": 123,
"phase_id": 123,
"poll_path": "<string>",
"run_status_path": "<string>",
"run_path": "<string>"
}Launch a benchmark run
The unified run endpoint, the same one the Evaluate page uses: resolves the model, builds the run scaffolding (per-run key, data, containers) and queues the submission. The model source is auto-detected from the body: pass model_id (integer platform model id) or model (24-hex catalogue id, numeric id, or model name; names resolve server-side, preferring a running instance) for platform models, model_url + model_token + model_name with model_source: "external" for an external endpoint, or hf_model_path with model_source: "huggingface". Join the competition first (POST /api/competitions//register/). The run spends the caller’s credits and lands on the competition leaderboard. Requires the benchmark:run scope.
curl --request POST \
--url https://api.benchgen.com/models/api/queue_benchmark_run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"competition_id": 123,
"model_id": 123,
"model": "<string>",
"phase_id": 123,
"env_vars": {},
"temperature": 123,
"max_tokens": 123,
"top_p": 123
}
'import requests
url = "https://api.benchgen.com/models/api/queue_benchmark_run"
payload = {
"competition_id": 123,
"model_id": 123,
"model": "<string>",
"phase_id": 123,
"env_vars": {},
"temperature": 123,
"max_tokens": 123,
"top_p": 123
}
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({
competition_id: 123,
model_id: 123,
model: '<string>',
phase_id: 123,
env_vars: {},
temperature: 123,
max_tokens: 123,
top_p: 123
})
};
fetch('https://api.benchgen.com/models/api/queue_benchmark_run', 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.benchgen.com/models/api/queue_benchmark_run",
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([
'competition_id' => 123,
'model_id' => 123,
'model' => '<string>',
'phase_id' => 123,
'env_vars' => [
],
'temperature' => 123,
'max_tokens' => 123,
'top_p' => 123
]),
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.benchgen.com/models/api/queue_benchmark_run"
payload := strings.NewReader("{\n \"competition_id\": 123,\n \"model_id\": 123,\n \"model\": \"<string>\",\n \"phase_id\": 123,\n \"env_vars\": {},\n \"temperature\": 123,\n \"max_tokens\": 123,\n \"top_p\": 123\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.benchgen.com/models/api/queue_benchmark_run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"competition_id\": 123,\n \"model_id\": 123,\n \"model\": \"<string>\",\n \"phase_id\": 123,\n \"env_vars\": {},\n \"temperature\": 123,\n \"max_tokens\": 123,\n \"top_p\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benchgen.com/models/api/queue_benchmark_run")
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 \"competition_id\": 123,\n \"model_id\": 123,\n \"model\": \"<string>\",\n \"phase_id\": 123,\n \"env_vars\": {},\n \"temperature\": 123,\n \"max_tokens\": 123,\n \"top_p\": 123\n}"
response = http.request(request)
puts response.read_body{
"submission_id": 123,
"submission_status": "<string>",
"resolved_model": {},
"competition_id": 123,
"phase_id": 123,
"poll_path": "<string>",
"run_status_path": "<string>",
"run_path": "<string>"
}Authorizations
Platform API token created under Profile Settings > Platform API tokens. Scopes are fixed at creation.
Body
Platform model id (integer, preferred). Get it from the model catalogue; an already-running model is benchmarked against its live endpoint, no second deploy.
Catalogue model id (24-hex), a numeric platform id, or a model name (display or litellm). Names are resolved server-side against the catalogue, preferring a running instance; an unknown name is passed through and will fail the run, so prefer ids when scripting.
Optional phase override; defaults to the current phase
platform, external, huggingface Extra env for the run container
Response
Run queued
How the model was resolved (model name, endpoint)
GET this path for the full run record
GET this path to follow the run: state, score and link in one small answer
Web app path of the run page