List endpoints
curl --request GET \
--url https://api.together.ai/v2/projects/{projectId}/endpoints \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.together.ai/v2/projects/{projectId}/endpoints"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.together.ai/v2/projects/{projectId}/endpoints', 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.together.ai/v2/projects/{projectId}/endpoints",
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.together.ai/v2/projects/{projectId}/endpoints"
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.together.ai/v2/projects/{projectId}/endpoints")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v2/projects/{projectId}/endpoints")
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{
"data": [
{
"id": "<string>",
"projectId": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"etag": "<string>",
"trafficSplit": [
{
"deploymentId": "<string>",
"weight": 123
}
],
"visibility": "VISIBILITY_PRIVATE",
"deployments": [
{
"id": "<string>",
"modelId": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"autoscaling": {
"minReplicas": 123,
"maxReplicas": 123,
"scaleDownWindow": "<string>",
"scaleUpWindow": "<string>",
"scaleToZeroWindow": "<string>",
"scalingMetrics": [
{
"name": "<string>",
"target": 123,
"percentile": "<string>"
}
]
},
"model": "<string>",
"estimatedEffectiveTrafficShare": 123,
"hardware": "<string>",
"desiredReplicas": 123,
"readyReplicas": 123
}
],
"activeRolloutId": "<string>"
}
],
"object": "<unknown>",
"next_cursor": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}Endpoints
List endpoints
Lists the dedicated inference endpoints owned by the specified project.
GET
/
projects
/
{projectId}
/
endpoints
List endpoints
curl --request GET \
--url https://api.together.ai/v2/projects/{projectId}/endpoints \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.together.ai/v2/projects/{projectId}/endpoints"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.together.ai/v2/projects/{projectId}/endpoints', 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.together.ai/v2/projects/{projectId}/endpoints",
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.together.ai/v2/projects/{projectId}/endpoints"
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.together.ai/v2/projects/{projectId}/endpoints")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v2/projects/{projectId}/endpoints")
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{
"data": [
{
"id": "<string>",
"projectId": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"etag": "<string>",
"trafficSplit": [
{
"deploymentId": "<string>",
"weight": 123
}
],
"visibility": "VISIBILITY_PRIVATE",
"deployments": [
{
"id": "<string>",
"modelId": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"autoscaling": {
"minReplicas": 123,
"maxReplicas": 123,
"scaleDownWindow": "<string>",
"scaleUpWindow": "<string>",
"scaleToZeroWindow": "<string>",
"scalingMetrics": [
{
"name": "<string>",
"target": 123,
"percentile": "<string>"
}
]
},
"model": "<string>",
"estimatedEffectiveTrafficShare": 123,
"hardware": "<string>",
"desiredReplicas": 123,
"readyReplicas": 123
}
],
"activeRolloutId": "<string>"
}
],
"object": "<unknown>",
"next_cursor": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Project identifier.
Query Parameters
Maximum number of endpoints to return.
Cursor from a previous response.
Sort field for the results. Supports created_at or updated_at, optionally followed by asc or desc.
Filter expression using name, created_at, or updated_at with comparison operators and AND/OR/NOT; timestamps must be RFC 3339 strings. name supports substring matching with : and prefix/suffix wildcards with *, and accepts a bare endpoint name or <project_slug>/<endpoint_name>.
Was this page helpful?
⌘I