curl --request PUT \
--url https://{host}/api/llm-gateway/admin/providers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"auth_type": "<string>",
"base_url": "<string>",
"billing_note": "<string>",
"change_note": "<string>",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credentials": "<unknown>",
"enabled": true,
"enforce_health_check": true,
"name": "<string>",
"request_timeout_secs": 123,
"settings": "<unknown>",
"stream_idle_timeout_secs": 123
}
'import requests
url = "https://{host}/api/llm-gateway/admin/providers/{id}"
payload = {
"api_key": "<string>",
"auth_type": "<string>",
"base_url": "<string>",
"billing_note": "<string>",
"change_note": "<string>",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credentials": "<unknown>",
"enabled": True,
"enforce_health_check": True,
"name": "<string>",
"request_timeout_secs": 123,
"settings": "<unknown>",
"stream_idle_timeout_secs": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
api_key: '<string>',
auth_type: '<string>',
base_url: '<string>',
billing_note: '<string>',
change_note: '<string>',
connection_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
credentials: '<unknown>',
enabled: true,
enforce_health_check: true,
name: '<string>',
request_timeout_secs: 123,
settings: '<unknown>',
stream_idle_timeout_secs: 123
})
};
fetch('https://{host}/api/llm-gateway/admin/providers/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'api_key' => '<string>',
'auth_type' => '<string>',
'base_url' => '<string>',
'billing_note' => '<string>',
'change_note' => '<string>',
'connection_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'credentials' => '<unknown>',
'enabled' => true,
'enforce_health_check' => true,
'name' => '<string>',
'request_timeout_secs' => 123,
'settings' => '<unknown>',
'stream_idle_timeout_secs' => 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://{host}/api/llm-gateway/admin/providers/{id}"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"auth_type\": \"<string>\",\n \"base_url\": \"<string>\",\n \"billing_note\": \"<string>\",\n \"change_note\": \"<string>\",\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credentials\": \"<unknown>\",\n \"enabled\": true,\n \"enforce_health_check\": true,\n \"name\": \"<string>\",\n \"request_timeout_secs\": 123,\n \"settings\": \"<unknown>\",\n \"stream_idle_timeout_secs\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{host}/api/llm-gateway/admin/providers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"auth_type\": \"<string>\",\n \"base_url\": \"<string>\",\n \"billing_note\": \"<string>\",\n \"change_note\": \"<string>\",\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credentials\": \"<unknown>\",\n \"enabled\": true,\n \"enforce_health_check\": true,\n \"name\": \"<string>\",\n \"request_timeout_secs\": 123,\n \"settings\": \"<unknown>\",\n \"stream_idle_timeout_secs\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/llm-gateway/admin/providers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"auth_type\": \"<string>\",\n \"base_url\": \"<string>\",\n \"billing_note\": \"<string>\",\n \"change_note\": \"<string>\",\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credentials\": \"<unknown>\",\n \"enabled\": true,\n \"enforce_health_check\": true,\n \"name\": \"<string>\",\n \"request_timeout_secs\": 123,\n \"settings\": \"<unknown>\",\n \"stream_idle_timeout_secs\": 123\n}"
response = http.request(request)
puts response.read_body{
"auth_type": "<string>",
"base_url": "<string>",
"billing_mode": "per_token",
"created_at": "2023-11-07T05:31:56Z",
"enabled": true,
"enforce_health_check": true,
"health_status": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_provider": "<string>",
"model_sync_mode": "off",
"name": "<string>",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"secret_path": "<string>",
"settings": "<unknown>",
"updated_at": "2023-11-07T05:31:56Z",
"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",
"billing_note": "<string>",
"billing_reason": "subscription",
"catalog_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"catalog_slug": "<string>",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"health_checked_at": "2023-11-07T05:31:56Z",
"health_detail": "<string>",
"request_timeout_secs": 123,
"stream_idle_timeout_secs": 123
}{
"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"
}
}{
"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"
}
}{
"error": {
"message": "retry_on_429_count must be between 0 and 10",
"type": "invalid_request_error"
}
}Update a provider
Updates a provider. Only the fields you send are changed. To rotate the upstream key, update the credential instead. You can rebind the provider to a different credential with connection_id, but a provider whose auth type needs a secret cannot be detached from its credential.
curl --request PUT \
--url https://{host}/api/llm-gateway/admin/providers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"auth_type": "<string>",
"base_url": "<string>",
"billing_note": "<string>",
"change_note": "<string>",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credentials": "<unknown>",
"enabled": true,
"enforce_health_check": true,
"name": "<string>",
"request_timeout_secs": 123,
"settings": "<unknown>",
"stream_idle_timeout_secs": 123
}
'import requests
url = "https://{host}/api/llm-gateway/admin/providers/{id}"
payload = {
"api_key": "<string>",
"auth_type": "<string>",
"base_url": "<string>",
"billing_note": "<string>",
"change_note": "<string>",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credentials": "<unknown>",
"enabled": True,
"enforce_health_check": True,
"name": "<string>",
"request_timeout_secs": 123,
"settings": "<unknown>",
"stream_idle_timeout_secs": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
api_key: '<string>',
auth_type: '<string>',
base_url: '<string>',
billing_note: '<string>',
change_note: '<string>',
connection_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
credentials: '<unknown>',
enabled: true,
enforce_health_check: true,
name: '<string>',
request_timeout_secs: 123,
settings: '<unknown>',
stream_idle_timeout_secs: 123
})
};
fetch('https://{host}/api/llm-gateway/admin/providers/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'api_key' => '<string>',
'auth_type' => '<string>',
'base_url' => '<string>',
'billing_note' => '<string>',
'change_note' => '<string>',
'connection_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'credentials' => '<unknown>',
'enabled' => true,
'enforce_health_check' => true,
'name' => '<string>',
'request_timeout_secs' => 123,
'settings' => '<unknown>',
'stream_idle_timeout_secs' => 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://{host}/api/llm-gateway/admin/providers/{id}"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"auth_type\": \"<string>\",\n \"base_url\": \"<string>\",\n \"billing_note\": \"<string>\",\n \"change_note\": \"<string>\",\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credentials\": \"<unknown>\",\n \"enabled\": true,\n \"enforce_health_check\": true,\n \"name\": \"<string>\",\n \"request_timeout_secs\": 123,\n \"settings\": \"<unknown>\",\n \"stream_idle_timeout_secs\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{host}/api/llm-gateway/admin/providers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"auth_type\": \"<string>\",\n \"base_url\": \"<string>\",\n \"billing_note\": \"<string>\",\n \"change_note\": \"<string>\",\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credentials\": \"<unknown>\",\n \"enabled\": true,\n \"enforce_health_check\": true,\n \"name\": \"<string>\",\n \"request_timeout_secs\": 123,\n \"settings\": \"<unknown>\",\n \"stream_idle_timeout_secs\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/llm-gateway/admin/providers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"auth_type\": \"<string>\",\n \"base_url\": \"<string>\",\n \"billing_note\": \"<string>\",\n \"change_note\": \"<string>\",\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credentials\": \"<unknown>\",\n \"enabled\": true,\n \"enforce_health_check\": true,\n \"name\": \"<string>\",\n \"request_timeout_secs\": 123,\n \"settings\": \"<unknown>\",\n \"stream_idle_timeout_secs\": 123\n}"
response = http.request(request)
puts response.read_body{
"auth_type": "<string>",
"base_url": "<string>",
"billing_mode": "per_token",
"created_at": "2023-11-07T05:31:56Z",
"enabled": true,
"enforce_health_check": true,
"health_status": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_provider": "<string>",
"model_sync_mode": "off",
"name": "<string>",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"secret_path": "<string>",
"settings": "<unknown>",
"updated_at": "2023-11-07T05:31:56Z",
"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",
"billing_note": "<string>",
"billing_reason": "subscription",
"catalog_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"catalog_slug": "<string>",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"health_checked_at": "2023-11-07T05:31:56Z",
"health_detail": "<string>",
"request_timeout_secs": 123,
"stream_idle_timeout_secs": 123
}{
"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"
}
}{
"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"
}
}{
"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
Record ID (UUID)
Body
Not accepted for auth types that need a stored secret: update the credential instead.
Omit to leave unchanged. Not retroactive: requests already recorded keep their cost.
per_token, not_metered Billing note. Omit to leave unchanged; send null to clear.
Omit to leave unchanged. null clears it, which is only valid while the provider is per_token.
subscription, local, external, other Optional note explaining this change. Omitting it clears the previous note.
Rebind the provider to a different credential. Omit to leave unchanged. A provider whose auth type needs a secret cannot be detached with null.
Not accepted for auth types that need a stored secret: update the credential instead.
Omit to leave unchanged. false serves the provider even while its connectivity check fails.
Omit to leave unchanged.
off, additive, full Provider-wide fallback for the non-streaming request timeout, in seconds (1–600). Omit to leave unchanged; send null to clear.
Provider-wide fallback for the streaming idle timeout, in seconds (1–300). Omit to leave unchanged; send null to clear.
Response
OK
An upstream provider.
Whether the gateway records a per-token cost for this provider's traffic.
per_token, not_metered Whether the provider may serve traffic.
Whether routing waits on the connectivity check. When false the provider serves even while its check fails; health is still recorded.
Upstream reachability from the connectivity check: unverified, healthy, or unhealthy. Separate from enabled. An enabled provider that turns unhealthy stops receiving traffic until a check records it healthy again, unless enforce_health_check is false. Some provider families are not checked and stay unverified.
Whether this provider follows Barndoor's model catalog.
off, additive, full Internal reference to the stored secret. This is not the secret.
Note explaining the last change.
When the last attributed change was made.
Note about the billing arrangement.
How the vendor bills this provider. Descriptive only.
subscription, local, external, other ID of the credential this provider uses.
When the last connectivity check ran; null before the first check.
Reason for the last unhealthy result; null otherwise.
Provider-wide fallback for the non-streaming request timeout, in seconds.
Provider-wide fallback for the streaming idle timeout, in seconds.