Routes
List routes
Lists routes you can invoke, newest first, optionally filtered by team and exact name.
GET
/
v1
/
routes
cURL
curl --request GET \
--url https://api.baseten.co/v1/routes \
--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/routes"
headers = {"Authorization": f"Bearer {API_KEY}"}
response = requests.request(
"GET",
url,
headers=headers,
params={'cursor': None, 'team_id': None, 'name': None}
)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.baseten.co/v1/routes', 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/routes",
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/routes"
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/routes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baseten.co/v1/routes")
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{
"items": [
{
"id": "<string>",
"name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"target": {
"type": "BASETEN_MODEL_API",
"model": "<string>"
},
"metadata": {
"slug": "<string>",
"display_name": "<string>",
"release_date": "2023-12-25",
"provider": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"<string>"
],
"tools": true,
"reasoning_effort_levels": [
"<string>"
],
"parallel_tool_calls": true,
"supported_api_formats": {
"messages": false,
"responses": false,
"chat_completions": false
},
"cost": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123,
"long_context": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123
}
}
},
"invoke_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"has_more": true,
"cursor": "<string>"
}
}Authorizations
Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.
Query Parameters
Opaque cursor returned by a previous page. Omit to fetch the first page.
Maximum number of items to return.
Required range:
1 <= x <= 1000Identifier of the team whose routes to list.
Filter by exact route name. Preserved by the cursor; if repeated, must match the original filter.
Was this page helpful?
⌘I
cURL
curl --request GET \
--url https://api.baseten.co/v1/routes \
--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/routes"
headers = {"Authorization": f"Bearer {API_KEY}"}
response = requests.request(
"GET",
url,
headers=headers,
params={'cursor': None, 'team_id': None, 'name': None}
)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.baseten.co/v1/routes', 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/routes",
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/routes"
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/routes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baseten.co/v1/routes")
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{
"items": [
{
"id": "<string>",
"name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"target": {
"type": "BASETEN_MODEL_API",
"model": "<string>"
},
"metadata": {
"slug": "<string>",
"display_name": "<string>",
"release_date": "2023-12-25",
"provider": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"<string>"
],
"tools": true,
"reasoning_effort_levels": [
"<string>"
],
"parallel_tool_calls": true,
"supported_api_formats": {
"messages": false,
"responses": false,
"chat_completions": false
},
"cost": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123,
"long_context": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123
}
}
},
"invoke_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"has_more": true,
"cursor": "<string>"
}
}