Update a listing version
Updates a library listing version. Setting is_live to true will demote the current live version. When a benchmark is provided, it replaces the stored benchmark.
curl --request PATCH \
--url https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag} \
--header "Authorization: Bearer $BASETEN_API_KEY" \
--data '{
"is_live": null,
"allow_truss_download": null,
"benchmark": null
}'import requests
import os
API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")
url = "https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}"
headers = {"Authorization": f"Bearer {API_KEY}"}
response = requests.request(
"PATCH",
url,
headers=headers,
json={'is_live': None, 'allow_truss_download': None, 'benchmark': None}
)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
is_live: true,
allow_truss_download: true,
benchmark: {
run_id: '<string>',
measured_at: '2023-12-25',
llm: {
ttft_ms_p50: 123,
output_tokens_per_sec_per_user_p50: 123,
max_concurrent_users_at_50ms_tpot: 123,
requests_per_sec_p50: 123,
cost_per_1m_tokens_usd: 123
},
tts: {
ttft_ms_p50: 123,
max_concurrent_streams_at_rtf1: 123,
ttft_ms_p50_at_max_concurrency: 123,
cost_per_audio_minute_usd: 123
},
embedding: {
e2e_latency_ms_p50: 123,
e2e_latency_ms_p99: 123,
input_tokens_per_sec: 123,
requests_per_sec: 123
},
replicas: 2,
profile: '512x256'
}
})
};
fetch('https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}', 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.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'is_live' => true,
'allow_truss_download' => true,
'benchmark' => [
'run_id' => '<string>',
'measured_at' => '2023-12-25',
'llm' => [
'ttft_ms_p50' => 123,
'output_tokens_per_sec_per_user_p50' => 123,
'max_concurrent_users_at_50ms_tpot' => 123,
'requests_per_sec_p50' => 123,
'cost_per_1m_tokens_usd' => 123
],
'tts' => [
'ttft_ms_p50' => 123,
'max_concurrent_streams_at_rtf1' => 123,
'ttft_ms_p50_at_max_concurrency' => 123,
'cost_per_audio_minute_usd' => 123
],
'embedding' => [
'e2e_latency_ms_p50' => 123,
'e2e_latency_ms_p99' => 123,
'input_tokens_per_sec' => 123,
'requests_per_sec' => 123
],
'replicas' => 2,
'profile' => '512x256'
]
]),
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.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}"
payload := strings.NewReader("{\n \"is_live\": true,\n \"allow_truss_download\": true,\n \"benchmark\": {\n \"run_id\": \"<string>\",\n \"measured_at\": \"2023-12-25\",\n \"llm\": {\n \"ttft_ms_p50\": 123,\n \"output_tokens_per_sec_per_user_p50\": 123,\n \"max_concurrent_users_at_50ms_tpot\": 123,\n \"requests_per_sec_p50\": 123,\n \"cost_per_1m_tokens_usd\": 123\n },\n \"tts\": {\n \"ttft_ms_p50\": 123,\n \"max_concurrent_streams_at_rtf1\": 123,\n \"ttft_ms_p50_at_max_concurrency\": 123,\n \"cost_per_audio_minute_usd\": 123\n },\n \"embedding\": {\n \"e2e_latency_ms_p50\": 123,\n \"e2e_latency_ms_p99\": 123,\n \"input_tokens_per_sec\": 123,\n \"requests_per_sec\": 123\n },\n \"replicas\": 2,\n \"profile\": \"512x256\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_live\": true,\n \"allow_truss_download\": true,\n \"benchmark\": {\n \"run_id\": \"<string>\",\n \"measured_at\": \"2023-12-25\",\n \"llm\": {\n \"ttft_ms_p50\": 123,\n \"output_tokens_per_sec_per_user_p50\": 123,\n \"max_concurrent_users_at_50ms_tpot\": 123,\n \"requests_per_sec_p50\": 123,\n \"cost_per_1m_tokens_usd\": 123\n },\n \"tts\": {\n \"ttft_ms_p50\": 123,\n \"max_concurrent_streams_at_rtf1\": 123,\n \"ttft_ms_p50_at_max_concurrency\": 123,\n \"cost_per_audio_minute_usd\": 123\n },\n \"embedding\": {\n \"e2e_latency_ms_p50\": 123,\n \"e2e_latency_ms_p99\": 123,\n \"input_tokens_per_sec\": 123,\n \"requests_per_sec\": 123\n },\n \"replicas\": 2,\n \"profile\": \"512x256\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_live\": true,\n \"allow_truss_download\": true,\n \"benchmark\": {\n \"run_id\": \"<string>\",\n \"measured_at\": \"2023-12-25\",\n \"llm\": {\n \"ttft_ms_p50\": 123,\n \"output_tokens_per_sec_per_user_p50\": 123,\n \"max_concurrent_users_at_50ms_tpot\": 123,\n \"requests_per_sec_p50\": 123,\n \"cost_per_1m_tokens_usd\": 123\n },\n \"tts\": {\n \"ttft_ms_p50\": 123,\n \"max_concurrent_streams_at_rtf1\": 123,\n \"ttft_ms_p50_at_max_concurrency\": 123,\n \"cost_per_audio_minute_usd\": 123\n },\n \"embedding\": {\n \"e2e_latency_ms_p50\": 123,\n \"e2e_latency_ms_p99\": 123,\n \"input_tokens_per_sec\": 123,\n \"requests_per_sec\": 123\n },\n \"replicas\": 2,\n \"profile\": \"512x256\"\n }\n}"
response = http.request(request)
puts response.read_body{
"version_tag": "<string>",
"is_live": true,
"allow_truss_download": true,
"oracle_version_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"benchmark": {
"run_id": "<string>",
"measured_at": "2023-12-25",
"llm": {
"ttft_ms_p50": 123,
"output_tokens_per_sec_per_user_p50": 123,
"max_concurrent_users_at_50ms_tpot": 123,
"requests_per_sec_p50": 123,
"cost_per_1m_tokens_usd": 123
},
"tts": {
"ttft_ms_p50": 123,
"max_concurrent_streams_at_rtf1": 123,
"ttft_ms_p50_at_max_concurrency": 123,
"cost_per_audio_minute_usd": 123
},
"embedding": {
"e2e_latency_ms_p50": 123,
"e2e_latency_ms_p99": 123,
"input_tokens_per_sec": 123,
"requests_per_sec": 123
},
"replicas": 2,
"profile": "512x256"
}
}Authorizations
Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.
Body
Request to update a library listing version.
Whether this version should be the live version. Setting to true demotes the current live version.
Whether users deploying this model can download the Truss
Benchmark snapshot for this version. When provided, replaces the stored benchmark.
Show child attributes
Show child attributes
Response
A library listing version.
Human-readable tag for this version
Whether this version is the live version
Whether users deploying this model can download the Truss
Id of the source model version
Time the version was created in ISO 8601 format
Time the version was last modified
Benchmark snapshot for this version, if one has been uploaded.
Show child attributes
Show child attributes
Was this page helpful?
curl --request PATCH \
--url https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag} \
--header "Authorization: Bearer $BASETEN_API_KEY" \
--data '{
"is_live": null,
"allow_truss_download": null,
"benchmark": null
}'import requests
import os
API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")
url = "https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}"
headers = {"Authorization": f"Bearer {API_KEY}"}
response = requests.request(
"PATCH",
url,
headers=headers,
json={'is_live': None, 'allow_truss_download': None, 'benchmark': None}
)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
is_live: true,
allow_truss_download: true,
benchmark: {
run_id: '<string>',
measured_at: '2023-12-25',
llm: {
ttft_ms_p50: 123,
output_tokens_per_sec_per_user_p50: 123,
max_concurrent_users_at_50ms_tpot: 123,
requests_per_sec_p50: 123,
cost_per_1m_tokens_usd: 123
},
tts: {
ttft_ms_p50: 123,
max_concurrent_streams_at_rtf1: 123,
ttft_ms_p50_at_max_concurrency: 123,
cost_per_audio_minute_usd: 123
},
embedding: {
e2e_latency_ms_p50: 123,
e2e_latency_ms_p99: 123,
input_tokens_per_sec: 123,
requests_per_sec: 123
},
replicas: 2,
profile: '512x256'
}
})
};
fetch('https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}', 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.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'is_live' => true,
'allow_truss_download' => true,
'benchmark' => [
'run_id' => '<string>',
'measured_at' => '2023-12-25',
'llm' => [
'ttft_ms_p50' => 123,
'output_tokens_per_sec_per_user_p50' => 123,
'max_concurrent_users_at_50ms_tpot' => 123,
'requests_per_sec_p50' => 123,
'cost_per_1m_tokens_usd' => 123
],
'tts' => [
'ttft_ms_p50' => 123,
'max_concurrent_streams_at_rtf1' => 123,
'ttft_ms_p50_at_max_concurrency' => 123,
'cost_per_audio_minute_usd' => 123
],
'embedding' => [
'e2e_latency_ms_p50' => 123,
'e2e_latency_ms_p99' => 123,
'input_tokens_per_sec' => 123,
'requests_per_sec' => 123
],
'replicas' => 2,
'profile' => '512x256'
]
]),
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.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}"
payload := strings.NewReader("{\n \"is_live\": true,\n \"allow_truss_download\": true,\n \"benchmark\": {\n \"run_id\": \"<string>\",\n \"measured_at\": \"2023-12-25\",\n \"llm\": {\n \"ttft_ms_p50\": 123,\n \"output_tokens_per_sec_per_user_p50\": 123,\n \"max_concurrent_users_at_50ms_tpot\": 123,\n \"requests_per_sec_p50\": 123,\n \"cost_per_1m_tokens_usd\": 123\n },\n \"tts\": {\n \"ttft_ms_p50\": 123,\n \"max_concurrent_streams_at_rtf1\": 123,\n \"ttft_ms_p50_at_max_concurrency\": 123,\n \"cost_per_audio_minute_usd\": 123\n },\n \"embedding\": {\n \"e2e_latency_ms_p50\": 123,\n \"e2e_latency_ms_p99\": 123,\n \"input_tokens_per_sec\": 123,\n \"requests_per_sec\": 123\n },\n \"replicas\": 2,\n \"profile\": \"512x256\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_live\": true,\n \"allow_truss_download\": true,\n \"benchmark\": {\n \"run_id\": \"<string>\",\n \"measured_at\": \"2023-12-25\",\n \"llm\": {\n \"ttft_ms_p50\": 123,\n \"output_tokens_per_sec_per_user_p50\": 123,\n \"max_concurrent_users_at_50ms_tpot\": 123,\n \"requests_per_sec_p50\": 123,\n \"cost_per_1m_tokens_usd\": 123\n },\n \"tts\": {\n \"ttft_ms_p50\": 123,\n \"max_concurrent_streams_at_rtf1\": 123,\n \"ttft_ms_p50_at_max_concurrency\": 123,\n \"cost_per_audio_minute_usd\": 123\n },\n \"embedding\": {\n \"e2e_latency_ms_p50\": 123,\n \"e2e_latency_ms_p99\": 123,\n \"input_tokens_per_sec\": 123,\n \"requests_per_sec\": 123\n },\n \"replicas\": 2,\n \"profile\": \"512x256\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_live\": true,\n \"allow_truss_download\": true,\n \"benchmark\": {\n \"run_id\": \"<string>\",\n \"measured_at\": \"2023-12-25\",\n \"llm\": {\n \"ttft_ms_p50\": 123,\n \"output_tokens_per_sec_per_user_p50\": 123,\n \"max_concurrent_users_at_50ms_tpot\": 123,\n \"requests_per_sec_p50\": 123,\n \"cost_per_1m_tokens_usd\": 123\n },\n \"tts\": {\n \"ttft_ms_p50\": 123,\n \"max_concurrent_streams_at_rtf1\": 123,\n \"ttft_ms_p50_at_max_concurrency\": 123,\n \"cost_per_audio_minute_usd\": 123\n },\n \"embedding\": {\n \"e2e_latency_ms_p50\": 123,\n \"e2e_latency_ms_p99\": 123,\n \"input_tokens_per_sec\": 123,\n \"requests_per_sec\": 123\n },\n \"replicas\": 2,\n \"profile\": \"512x256\"\n }\n}"
response = http.request(request)
puts response.read_body{
"version_tag": "<string>",
"is_live": true,
"allow_truss_download": true,
"oracle_version_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"benchmark": {
"run_id": "<string>",
"measured_at": "2023-12-25",
"llm": {
"ttft_ms_p50": 123,
"output_tokens_per_sec_per_user_p50": 123,
"max_concurrent_users_at_50ms_tpot": 123,
"requests_per_sec_p50": 123,
"cost_per_1m_tokens_usd": 123
},
"tts": {
"ttft_ms_p50": 123,
"max_concurrent_streams_at_rtf1": 123,
"ttft_ms_p50_at_max_concurrency": 123,
"cost_per_audio_minute_usd": 123
},
"embedding": {
"e2e_latency_ms_p50": 123,
"e2e_latency_ms_p99": 123,
"input_tokens_per_sec": 123,
"requests_per_sec": 123
},
"replicas": 2,
"profile": "512x256"
}
}