curl --request POST \
--url https://api.example.com/api/v1/instance/taxonomy/providers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider_id": "<string>",
"base_url": "<string>",
"kind": "openai_compatible",
"icon": "",
"param_aliases": {},
"accepted_params": [
"<string>"
],
"params_closed": false
}
'import requests
url = "https://api.example.com/api/v1/instance/taxonomy/providers"
payload = {
"provider_id": "<string>",
"base_url": "<string>",
"kind": "openai_compatible",
"icon": "",
"param_aliases": {},
"accepted_params": ["<string>"],
"params_closed": False
}
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({
provider_id: '<string>',
base_url: '<string>',
kind: 'openai_compatible',
icon: '',
param_aliases: {},
accepted_params: ['<string>'],
params_closed: false
})
};
fetch('https://api.example.com/api/v1/instance/taxonomy/providers', 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.example.com/api/v1/instance/taxonomy/providers",
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([
'provider_id' => '<string>',
'base_url' => '<string>',
'kind' => 'openai_compatible',
'icon' => '',
'param_aliases' => [
],
'accepted_params' => [
'<string>'
],
'params_closed' => false
]),
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.example.com/api/v1/instance/taxonomy/providers"
payload := strings.NewReader("{\n \"provider_id\": \"<string>\",\n \"base_url\": \"<string>\",\n \"kind\": \"openai_compatible\",\n \"icon\": \"\",\n \"param_aliases\": {},\n \"accepted_params\": [\n \"<string>\"\n ],\n \"params_closed\": false\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.example.com/api/v1/instance/taxonomy/providers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"provider_id\": \"<string>\",\n \"base_url\": \"<string>\",\n \"kind\": \"openai_compatible\",\n \"icon\": \"\",\n \"param_aliases\": {},\n \"accepted_params\": [\n \"<string>\"\n ],\n \"params_closed\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/instance/taxonomy/providers")
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 \"provider_id\": \"<string>\",\n \"base_url\": \"<string>\",\n \"kind\": \"openai_compatible\",\n \"icon\": \"\",\n \"param_aliases\": {},\n \"accepted_params\": [\n \"<string>\"\n ],\n \"params_closed\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"kind": "<string>",
"base_url": "<string>",
"icon": "<string>",
"param_aliases": {},
"accepted_params": [
"<string>"
],
"params_closed": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create or Update Provider
Create a provider or replace the catalog entry with the same name.
Required permission: catalog.manage.
curl --request POST \
--url https://api.example.com/api/v1/instance/taxonomy/providers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider_id": "<string>",
"base_url": "<string>",
"kind": "openai_compatible",
"icon": "",
"param_aliases": {},
"accepted_params": [
"<string>"
],
"params_closed": false
}
'import requests
url = "https://api.example.com/api/v1/instance/taxonomy/providers"
payload = {
"provider_id": "<string>",
"base_url": "<string>",
"kind": "openai_compatible",
"icon": "",
"param_aliases": {},
"accepted_params": ["<string>"],
"params_closed": False
}
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({
provider_id: '<string>',
base_url: '<string>',
kind: 'openai_compatible',
icon: '',
param_aliases: {},
accepted_params: ['<string>'],
params_closed: false
})
};
fetch('https://api.example.com/api/v1/instance/taxonomy/providers', 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.example.com/api/v1/instance/taxonomy/providers",
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([
'provider_id' => '<string>',
'base_url' => '<string>',
'kind' => 'openai_compatible',
'icon' => '',
'param_aliases' => [
],
'accepted_params' => [
'<string>'
],
'params_closed' => false
]),
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.example.com/api/v1/instance/taxonomy/providers"
payload := strings.NewReader("{\n \"provider_id\": \"<string>\",\n \"base_url\": \"<string>\",\n \"kind\": \"openai_compatible\",\n \"icon\": \"\",\n \"param_aliases\": {},\n \"accepted_params\": [\n \"<string>\"\n ],\n \"params_closed\": false\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.example.com/api/v1/instance/taxonomy/providers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"provider_id\": \"<string>\",\n \"base_url\": \"<string>\",\n \"kind\": \"openai_compatible\",\n \"icon\": \"\",\n \"param_aliases\": {},\n \"accepted_params\": [\n \"<string>\"\n ],\n \"params_closed\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/instance/taxonomy/providers")
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 \"provider_id\": \"<string>\",\n \"base_url\": \"<string>\",\n \"kind\": \"openai_compatible\",\n \"icon\": \"\",\n \"param_aliases\": {},\n \"accepted_params\": [\n \"<string>\"\n ],\n \"params_closed\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"kind": "<string>",
"base_url": "<string>",
"icon": "<string>",
"param_aliases": {},
"accepted_params": [
"<string>"
],
"params_closed": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
A control-plane management key using the sk-cp- prefix. Inference keys are not accepted by control-plane endpoints.
Body
An upstream provider endpoint and its request-profile settings.
Provider name, e.g. openai
1 - 63^[a-z0-9][a-z0-9_-]*$OpenAI-compatible endpoint, e.g. https://api.groq.com/openai/v1
1 - 2083Adapter kind
1 - 63^[a-z0-9][a-z0-9_]*$Provider mark as a standalone 24x24 SVG document, or an empty string when no icon is available. Clients must sanitize this untrusted markup before rendering it
65536Canonical param name to this provider's spelling
Show child attributes
Show child attributes
Params known accepted beyond the core; consulted when params_closed
256True when the provider's request schema rejects unknown params
Response
Successful Response
Show child attributes
Show child attributes