Versions
Get a listing version
Returns a specific version of a library listing.
GET
/
v1
/
library_listings
/
{user_defined_listing_id}
/
versions
/
{version_tag}
cURL
curl --request GET \
--url https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag} \
--header "Authorization: Bearer $BASETEN_API_KEY"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(
"GET",
url,
headers=headers
)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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 => "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://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}"
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://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}")
.header("Authorization", "Bearer <token>")
.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::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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>",
"hardware": "<string>",
"measured_at": "2023-12-25",
"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,
"replicas": 2,
"profile": "512x256"
}
}Authorizations
Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.
Response
200 - application/json
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?
⌘I
cURL
curl --request GET \
--url https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag} \
--header "Authorization: Bearer $BASETEN_API_KEY"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(
"GET",
url,
headers=headers
)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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 => "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://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}"
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://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}")
.header("Authorization", "Bearer <token>")
.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::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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>",
"hardware": "<string>",
"measured_at": "2023-12-25",
"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,
"replicas": 2,
"profile": "512x256"
}
}