curl --request GET \
--url https://{host}/api/llm-gateway/admin/providers/{provider_id}/model-mappings \
--header 'Authorization: Bearer <token>'import requests
url = "https://{host}/api/llm-gateway/admin/providers/{provider_id}/model-mappings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/llm-gateway/admin/providers/{provider_id}/model-mappings', 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://{host}/api/llm-gateway/admin/providers/{provider_id}/model-mappings",
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://{host}/api/llm-gateway/admin/providers/{provider_id}/model-mappings"
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://{host}/api/llm-gateway/admin/providers/{provider_id}/model-mappings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/llm-gateway/admin/providers/{provider_id}/model-mappings")
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[
{
"cooldown_429_default_secs": 123,
"cooldown_base_secs": 123,
"cooldown_failure_threshold": 123,
"cooldown_max_secs": 123,
"cooldown_overloaded_secs": 123,
"cooldown_window_secs": 123,
"bare_alias": true,
"enabled": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_alias": "<string>",
"priority": 123,
"provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_on_429_count": 123,
"retry_on_429_max_wait_secs": 123,
"source": "catalog",
"upstream_model": "<string>",
"effective_pricing": {
"source": "<string>",
"cache_read_cost_per_million_tokens": 123,
"cache_write_cost_per_million_tokens": 123,
"input_cost_per_million_tokens": 123,
"long_context": {
"input_cost_per_million_tokens": 123,
"output_cost_per_million_tokens": 123,
"threshold_prompt_tokens": 123,
"cache_read_cost_per_million_tokens": 123,
"cache_write_cost_per_million_tokens": 123
},
"output_cost_per_million_tokens": 123,
"pricing_rule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"created_by_email": "<string>",
"created_by_name": "<string>",
"created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_change_note": "<string>",
"last_modified_at": "2023-11-07T05:31:56Z",
"last_modified_by_email": "<string>",
"last_modified_by_name": "<string>",
"last_modified_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"auto_disabled_reason": "catalog_retired",
"request_timeout_secs": 123,
"stream_idle_timeout_secs": 123,
"budget_status": {
"budget_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"budget_name": "<string>",
"kind": "provider",
"limit_kind": "token",
"message": "<string>",
"percentage_used": 123,
"period": "<string>"
},
"route_health_status": {
"message": "<string>",
"reason": "<string>",
"recovers_in_secs": 1,
"scope": "<string>",
"state": "<string>"
},
"stale_status": {
"reason": "catalog_removed"
}
}
]{
"error": {
"message": "retry_on_429_count must be between 0 and 10",
"type": "invalid_request_error"
}
}{
"error": {
"message": "retry_on_429_count must be between 0 and 10",
"type": "invalid_request_error"
}
}List a provider's model routes
curl --request GET \
--url https://{host}/api/llm-gateway/admin/providers/{provider_id}/model-mappings \
--header 'Authorization: Bearer <token>'import requests
url = "https://{host}/api/llm-gateway/admin/providers/{provider_id}/model-mappings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/llm-gateway/admin/providers/{provider_id}/model-mappings', 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://{host}/api/llm-gateway/admin/providers/{provider_id}/model-mappings",
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://{host}/api/llm-gateway/admin/providers/{provider_id}/model-mappings"
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://{host}/api/llm-gateway/admin/providers/{provider_id}/model-mappings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/llm-gateway/admin/providers/{provider_id}/model-mappings")
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[
{
"cooldown_429_default_secs": 123,
"cooldown_base_secs": 123,
"cooldown_failure_threshold": 123,
"cooldown_max_secs": 123,
"cooldown_overloaded_secs": 123,
"cooldown_window_secs": 123,
"bare_alias": true,
"enabled": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_alias": "<string>",
"priority": 123,
"provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_on_429_count": 123,
"retry_on_429_max_wait_secs": 123,
"source": "catalog",
"upstream_model": "<string>",
"effective_pricing": {
"source": "<string>",
"cache_read_cost_per_million_tokens": 123,
"cache_write_cost_per_million_tokens": 123,
"input_cost_per_million_tokens": 123,
"long_context": {
"input_cost_per_million_tokens": 123,
"output_cost_per_million_tokens": 123,
"threshold_prompt_tokens": 123,
"cache_read_cost_per_million_tokens": 123,
"cache_write_cost_per_million_tokens": 123
},
"output_cost_per_million_tokens": 123,
"pricing_rule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"created_by_email": "<string>",
"created_by_name": "<string>",
"created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_change_note": "<string>",
"last_modified_at": "2023-11-07T05:31:56Z",
"last_modified_by_email": "<string>",
"last_modified_by_name": "<string>",
"last_modified_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"auto_disabled_reason": "catalog_retired",
"request_timeout_secs": 123,
"stream_idle_timeout_secs": 123,
"budget_status": {
"budget_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"budget_name": "<string>",
"kind": "provider",
"limit_kind": "token",
"message": "<string>",
"percentage_used": 123,
"period": "<string>"
},
"route_health_status": {
"message": "<string>",
"reason": "<string>",
"recovers_in_secs": 1,
"scope": "<string>",
"state": "<string>"
},
"stale_status": {
"reason": "catalog_removed"
}
}
]{
"error": {
"message": "retry_on_429_count must be between 0 and 10",
"type": "invalid_request_error"
}
}{
"error": {
"message": "retry_on_429_count must be between 0 and 10",
"type": "invalid_request_error"
}
}Authorizations
An access token from Barndoor's identity provider, sent as Authorization: Bearer <token>. Use a service-account token from the OAuth 2.0 client-credentials grant for scripts and CI, or a signed-in user's token. The caller needs the admin role in the organization. Gateway API keys (bd-...) are not accepted here.
Path Parameters
Provider ID (UUID)
Response
OK
Cooldown after an upstream 429 with no usable Retry-After, in seconds.
First cooldown window, in seconds. Doubles after each failed recovery probe, up to cooldown_max_secs.
Gateway failures within cooldown_window_secs that put the route in cooldown. 0 disables cooldowns for the route.
Longest cooldown window, in seconds.
Cooldown after an upstream 529 (overloaded) with no usable Retry-After, in seconds. 0 treats a 529 as an ordinary failure.
Length of the rolling failure window, in seconds.
Whether the route answers requests that name the alias alone. When false, the model is reachable only as <provider>/<upstream_model>. Custom aliases are always true.
Failover order among routes serving the same alias; lower is tried first.
Same-route retries on upstream 429. 0 means immediate failover.
Longest upstream Retry-After to honor, in seconds. 0 uses a short built-in wait and ignores the header.
Whether the model was chosen from the catalog or typed in when the route was created.
catalog, custom The rate a request on this route would be billed at, and which pricing tier produced it.
Show child attributes
Show child attributes
Note explaining the last change.
When the last attributed change was made.
Set when the gateway disabled this route because the model left the provider's catalog. Any admin change to enabled clears it.
catalog_retired Total-request timeout for non-streaming requests, in seconds (1–600).
Idle timeout between chunks of a streaming response, in seconds (1–300).
Present when an exhausted blocking budget targets this route. The gateway skips the route while this is set.
Show child attributes
Show child attributes
Present while the route is in a health cooldown.
Show child attributes
Show child attributes
Present when the provider's catalog no longer lists this model. Advisory only: nothing is disabled because of it.
Show child attributes
Show child attributes