curl --request POST \
--url https://api.example.com/api/v1/instance/taxonomy/models \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_id": "<string>",
"provider_id": "<string>",
"input_modalities": [],
"output_modalities": [],
"upstream_model": "",
"egress_kind": "<string>",
"input_price_per_mtok": "0",
"output_price_per_mtok": "0",
"cache_read_price_per_mtok": "0",
"cache_write_price_per_mtok": "0",
"context_window": 128000,
"max_output_tokens": 50000000,
"capabilities": [],
"parameter_support": {}
}
'import requests
url = "https://api.example.com/api/v1/instance/taxonomy/models"
payload = {
"model_id": "<string>",
"provider_id": "<string>",
"input_modalities": [],
"output_modalities": [],
"upstream_model": "",
"egress_kind": "<string>",
"input_price_per_mtok": "0",
"output_price_per_mtok": "0",
"cache_read_price_per_mtok": "0",
"cache_write_price_per_mtok": "0",
"context_window": 128000,
"max_output_tokens": 50000000,
"capabilities": [],
"parameter_support": {}
}
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({
model_id: '<string>',
provider_id: '<string>',
input_modalities: [],
output_modalities: [],
upstream_model: '',
egress_kind: '<string>',
input_price_per_mtok: '0',
output_price_per_mtok: '0',
cache_read_price_per_mtok: '0',
cache_write_price_per_mtok: '0',
context_window: 128000,
max_output_tokens: 50000000,
capabilities: [],
parameter_support: {}
})
};
fetch('https://api.example.com/api/v1/instance/taxonomy/models', 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/models",
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([
'model_id' => '<string>',
'provider_id' => '<string>',
'input_modalities' => [
],
'output_modalities' => [
],
'upstream_model' => '',
'egress_kind' => '<string>',
'input_price_per_mtok' => '0',
'output_price_per_mtok' => '0',
'cache_read_price_per_mtok' => '0',
'cache_write_price_per_mtok' => '0',
'context_window' => 128000,
'max_output_tokens' => 50000000,
'capabilities' => [
],
'parameter_support' => [
]
]),
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/models"
payload := strings.NewReader("{\n \"model_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"input_modalities\": [],\n \"output_modalities\": [],\n \"upstream_model\": \"\",\n \"egress_kind\": \"<string>\",\n \"input_price_per_mtok\": \"0\",\n \"output_price_per_mtok\": \"0\",\n \"cache_read_price_per_mtok\": \"0\",\n \"cache_write_price_per_mtok\": \"0\",\n \"context_window\": 128000,\n \"max_output_tokens\": 50000000,\n \"capabilities\": [],\n \"parameter_support\": {}\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/models")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"input_modalities\": [],\n \"output_modalities\": [],\n \"upstream_model\": \"\",\n \"egress_kind\": \"<string>\",\n \"input_price_per_mtok\": \"0\",\n \"output_price_per_mtok\": \"0\",\n \"cache_read_price_per_mtok\": \"0\",\n \"cache_write_price_per_mtok\": \"0\",\n \"context_window\": 128000,\n \"max_output_tokens\": 50000000,\n \"capabilities\": [],\n \"parameter_support\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/instance/taxonomy/models")
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 \"model_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"input_modalities\": [],\n \"output_modalities\": [],\n \"upstream_model\": \"\",\n \"egress_kind\": \"<string>\",\n \"input_price_per_mtok\": \"0\",\n \"output_price_per_mtok\": \"0\",\n \"cache_read_price_per_mtok\": \"0\",\n \"cache_write_price_per_mtok\": \"0\",\n \"context_window\": 128000,\n \"max_output_tokens\": 50000000,\n \"capabilities\": [],\n \"parameter_support\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"upstream_model": "<string>",
"egress_kind": "<string>",
"input_price_per_mtok": "<string>",
"output_price_per_mtok": "<string>",
"cache_read_price_per_mtok": "<string>",
"cache_write_price_per_mtok": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"text"
],
"output_modalities": [
"text"
],
"capabilities": [
"streaming"
],
"parameter_support": {},
"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 Model
Create a model 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/models \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_id": "<string>",
"provider_id": "<string>",
"input_modalities": [],
"output_modalities": [],
"upstream_model": "",
"egress_kind": "<string>",
"input_price_per_mtok": "0",
"output_price_per_mtok": "0",
"cache_read_price_per_mtok": "0",
"cache_write_price_per_mtok": "0",
"context_window": 128000,
"max_output_tokens": 50000000,
"capabilities": [],
"parameter_support": {}
}
'import requests
url = "https://api.example.com/api/v1/instance/taxonomy/models"
payload = {
"model_id": "<string>",
"provider_id": "<string>",
"input_modalities": [],
"output_modalities": [],
"upstream_model": "",
"egress_kind": "<string>",
"input_price_per_mtok": "0",
"output_price_per_mtok": "0",
"cache_read_price_per_mtok": "0",
"cache_write_price_per_mtok": "0",
"context_window": 128000,
"max_output_tokens": 50000000,
"capabilities": [],
"parameter_support": {}
}
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({
model_id: '<string>',
provider_id: '<string>',
input_modalities: [],
output_modalities: [],
upstream_model: '',
egress_kind: '<string>',
input_price_per_mtok: '0',
output_price_per_mtok: '0',
cache_read_price_per_mtok: '0',
cache_write_price_per_mtok: '0',
context_window: 128000,
max_output_tokens: 50000000,
capabilities: [],
parameter_support: {}
})
};
fetch('https://api.example.com/api/v1/instance/taxonomy/models', 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/models",
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([
'model_id' => '<string>',
'provider_id' => '<string>',
'input_modalities' => [
],
'output_modalities' => [
],
'upstream_model' => '',
'egress_kind' => '<string>',
'input_price_per_mtok' => '0',
'output_price_per_mtok' => '0',
'cache_read_price_per_mtok' => '0',
'cache_write_price_per_mtok' => '0',
'context_window' => 128000,
'max_output_tokens' => 50000000,
'capabilities' => [
],
'parameter_support' => [
]
]),
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/models"
payload := strings.NewReader("{\n \"model_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"input_modalities\": [],\n \"output_modalities\": [],\n \"upstream_model\": \"\",\n \"egress_kind\": \"<string>\",\n \"input_price_per_mtok\": \"0\",\n \"output_price_per_mtok\": \"0\",\n \"cache_read_price_per_mtok\": \"0\",\n \"cache_write_price_per_mtok\": \"0\",\n \"context_window\": 128000,\n \"max_output_tokens\": 50000000,\n \"capabilities\": [],\n \"parameter_support\": {}\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/models")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"input_modalities\": [],\n \"output_modalities\": [],\n \"upstream_model\": \"\",\n \"egress_kind\": \"<string>\",\n \"input_price_per_mtok\": \"0\",\n \"output_price_per_mtok\": \"0\",\n \"cache_read_price_per_mtok\": \"0\",\n \"cache_write_price_per_mtok\": \"0\",\n \"context_window\": 128000,\n \"max_output_tokens\": 50000000,\n \"capabilities\": [],\n \"parameter_support\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/instance/taxonomy/models")
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 \"model_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"input_modalities\": [],\n \"output_modalities\": [],\n \"upstream_model\": \"\",\n \"egress_kind\": \"<string>\",\n \"input_price_per_mtok\": \"0\",\n \"output_price_per_mtok\": \"0\",\n \"cache_read_price_per_mtok\": \"0\",\n \"cache_write_price_per_mtok\": \"0\",\n \"context_window\": 128000,\n \"max_output_tokens\": 50000000,\n \"capabilities\": [],\n \"parameter_support\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"upstream_model": "<string>",
"egress_kind": "<string>",
"input_price_per_mtok": "<string>",
"output_price_per_mtok": "<string>",
"cache_read_price_per_mtok": "<string>",
"cache_write_price_per_mtok": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"text"
],
"output_modalities": [
"text"
],
"capabilities": [
"streaming"
],
"parameter_support": {},
"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
Caller-facing model name
1 - 255Provider id the model routes to
1 - 63^[a-z0-9][a-z0-9_-]*$Accepted input modalities
1 - 16 elementstext, image, audio, video, pdf Produced output modalities
1 - 16 elementstext, image, audio, video, pdf Model name sent to the provider, lets model_id be an alias; defaults to model_id
255Per-model egress adapter override
1 - 63^[a-z0-9][a-z0-9_]*$USD per million input tokens
^\d+(?:\.\d+)?$USD per million output tokens
^\d+(?:\.\d+)?$USD per million cache-read input tokens
^\d+(?:\.\d+)?$USD per million cache-write input tokens
^\d+(?:\.\d+)?$Context window in tokens
1 <= x <= 100000000Max completion tokens; requests are clamped to it
1 <= x <= 100000000Capabilities supported by the model
4streaming, tools, reasoning, structured_output Known support for canonical request parameters; an absent parameter is unknown
Show child attributes
Show child attributes
Response
Successful Response
Show child attributes
Show child attributes