curl --request GET \
--url https://api.electronhub.ai/v1/router/catalog/ranking \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.electronhub.ai/v1/router/catalog/ranking"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.electronhub.ai/v1/router/catalog/ranking', 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.electronhub.ai/v1/router/catalog/ranking",
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>"
],
]);
$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.electronhub.ai/v1/router/catalog/ranking"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.electronhub.ai/v1/router/catalog/ranking")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.electronhub.ai/v1/router/catalog/ranking")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"category": "coding",
"costTier": "medium",
"difficulty": "medium",
"domain": null,
"inputTokens": 2000,
"endpoint": "chat",
"band": 0.07,
"q_star": 83.11,
"selected": "gemma-4-31b-it",
"cascade": [
"deepseek-v4.1-flash",
"qwen3.6-35b-a3b"
],
"pick": {
"model": "gemma-4-31b-it",
"label": "Gemma 4 31B",
"vendor": "Google",
"tier": "frontier",
"quality": 85,
"rank_quality": 83.11,
"est_cost": 0.0042,
"effort": "medium"
},
"items": [
{
"model": "gemma-4-31b-it",
"label": "Gemma 4 31B",
"vendor": "Google",
"tier": "frontier",
"quality": 85,
"rank_quality": 83.11,
"est_cost": 0.0042,
"effort": "medium",
"eligible": true,
"price_blended": 0.5,
"speed": null,
"sources": [
"zeroeval"
],
"basis": "zeroeval"
}
],
"sources": {
"zeroeval": true,
"artificial_analysis": true,
"epoch": true,
"eqbench": true
}
}{
"error": {
"message": "Unknown category 'nope'. Use all, or: chat, coding, reasoning, math, science, creative, vision, long_context, agentic, factuality, safety, roleplay, summarization, translation",
"type": "router_invalid_request",
"param": "category",
"code": 400
}
}{
"error": {
"message": "Only master keys can manage Router settings.",
"type": "error",
"param": null,
"code": 403
}
}Model Ranking
How Auto ranks models for a category, cost tier, and difficulty: quality, estimated cost, the selected model, and its fallbacks. Pass category=all (or a comma-separated list) to rank every task in one call; the Auto panel should use that instead of 14 parallel requests.
curl --request GET \
--url https://api.electronhub.ai/v1/router/catalog/ranking \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.electronhub.ai/v1/router/catalog/ranking"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.electronhub.ai/v1/router/catalog/ranking', 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.electronhub.ai/v1/router/catalog/ranking",
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>"
],
]);
$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.electronhub.ai/v1/router/catalog/ranking"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.electronhub.ai/v1/router/catalog/ranking")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.electronhub.ai/v1/router/catalog/ranking")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"category": "coding",
"costTier": "medium",
"difficulty": "medium",
"domain": null,
"inputTokens": 2000,
"endpoint": "chat",
"band": 0.07,
"q_star": 83.11,
"selected": "gemma-4-31b-it",
"cascade": [
"deepseek-v4.1-flash",
"qwen3.6-35b-a3b"
],
"pick": {
"model": "gemma-4-31b-it",
"label": "Gemma 4 31B",
"vendor": "Google",
"tier": "frontier",
"quality": 85,
"rank_quality": 83.11,
"est_cost": 0.0042,
"effort": "medium"
},
"items": [
{
"model": "gemma-4-31b-it",
"label": "Gemma 4 31B",
"vendor": "Google",
"tier": "frontier",
"quality": 85,
"rank_quality": 83.11,
"est_cost": 0.0042,
"effort": "medium",
"eligible": true,
"price_blended": 0.5,
"speed": null,
"sources": [
"zeroeval"
],
"basis": "zeroeval"
}
],
"sources": {
"zeroeval": true,
"artificial_analysis": true,
"epoch": true,
"eqbench": true
}
}{
"error": {
"message": "Unknown category 'nope'. Use all, or: chat, coding, reasoning, math, science, creative, vision, long_context, agentic, factuality, safety, roleplay, summarization, translation",
"type": "router_invalid_request",
"param": "category",
"code": 400
}
}{
"error": {
"message": "Only master keys can manage Router settings.",
"type": "error",
"param": null,
"code": 403
}
}category=all, a comma-separated list, or repeated category parameters to rank several tasks in one call. One category returns a flat object (with pick). Two or more return picks and categories. Set includeItems=false to drop per-model items; frontier still adds frontier_rank. pick is null when nothing scored for that task.Authorizations
Enter your API key (starts with 'ek-')
Query Parameters
One of chat, coding, reasoning, math, science, creative, vision, long_context, agentic, factuality, safety, roleplay, summarization, translation; a comma-separated subset; repeated category parameters; or all. Case is ignored. all cannot be combined with other categories. One category returns a flat object. Two or more return picks and categories.
low, medium, high, xhigh, max trivial, easy, medium, hard, extreme x >= 0x >= 1chat, messages, responses Professional domain, e.g. legal, medical, finance.
When set, each category also includes frontier_rank (Pareto mix of quality vs price).
0 <= x <= 1Set false to omit per-model items. frontier still adds frontier_rank. Leave true for the Cost vs quality chart.
Response
Success
The response is of type object.
