curl --request GET \
--url https://api.together.ai/v2/projects/{projectId}/endpoints/{endpointId}/deployments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.together.ai/v2/projects/{projectId}/endpoints/{endpointId}/deployments"
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/{endpointId}/deployments', 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/{endpointId}/deployments",
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/{endpointId}/deployments"
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/{endpointId}/deployments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v2/projects/{projectId}/endpoints/{endpointId}/deployments")
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>",
"endpointId": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"modelId": "<string>",
"modelRevisionId": "<string>",
"model": "<string>",
"autoscaling": {
"minReplicas": 123,
"maxReplicas": 123,
"scaleDownWindow": "<string>",
"scaleUpWindow": "<string>",
"scaleToZeroWindow": "<string>",
"scalingMetrics": [
{
"name": "active_sessions",
"type": "METRIC_TARGET_TYPE_VALUE",
"target": 123,
"percentile": "<string>"
}
],
"scaleUp": {
"policies": [
{
"type": "SCALING_POLICY_TYPE_PERCENT",
"value": 25,
"periodSeconds": 60
},
{
"type": "SCALING_POLICY_TYPE_PODS",
"value": 10,
"periodSeconds": 60
}
],
"selectPolicy": "SCALING_POLICY_SELECT_MIN"
},
"scaleDown": {
"policies": [
{
"type": "SCALING_POLICY_TYPE_PERCENT",
"value": 25,
"periodSeconds": 60
},
{
"type": "SCALING_POLICY_TYPE_PODS",
"value": 10,
"periodSeconds": 60
}
],
"selectPolicy": "SCALING_POLICY_SELECT_MIN"
}
},
"configId": "<string>",
"config": "<string>",
"etag": "<string>",
"hardware": "<string>",
"trafficMode": "TRAFFIC_MODE_LIVE",
"status": {
"state": "DEPLOYMENT_STATE_PROVISIONING",
"message": "<string>",
"readyReplicas": 123,
"scheduledReplicas": 123,
"details": {
"region": [
{
"region": "<string>",
"scheduledReplicas": 123,
"readyReplicas": 123
}
]
}
},
"speculatorId": "<string>",
"speculatorRevisionId": "<string>",
"speculator": "<string>",
"estimatedEffectiveTrafficShare": 123,
"maxConcurrentRequestsPerReplica": "<string>",
"inactiveTimeout": 123,
"runtimeInfo": {
"engineType": "<string>",
"engineVersion": "<string>",
"functionCallingSupported": true,
"structuredOutputSupported": true
},
"desiredReplicas": 123,
"placement": {
"inline": {
"regions": [
"<string>"
],
"constraint": "ENFORCEMENT_REQUIRED",
"compliancePolicy": {
"hipaa": true
}
}
}
}
],
"object": "list",
"next_cursor": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}List deployments
Lists the deployments attached to an endpoint, including their model, configuration, scaling settings, placement, and current status.
curl --request GET \
--url https://api.together.ai/v2/projects/{projectId}/endpoints/{endpointId}/deployments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.together.ai/v2/projects/{projectId}/endpoints/{endpointId}/deployments"
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/{endpointId}/deployments', 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/{endpointId}/deployments",
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/{endpointId}/deployments"
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/{endpointId}/deployments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v2/projects/{projectId}/endpoints/{endpointId}/deployments")
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>",
"endpointId": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"modelId": "<string>",
"modelRevisionId": "<string>",
"model": "<string>",
"autoscaling": {
"minReplicas": 123,
"maxReplicas": 123,
"scaleDownWindow": "<string>",
"scaleUpWindow": "<string>",
"scaleToZeroWindow": "<string>",
"scalingMetrics": [
{
"name": "active_sessions",
"type": "METRIC_TARGET_TYPE_VALUE",
"target": 123,
"percentile": "<string>"
}
],
"scaleUp": {
"policies": [
{
"type": "SCALING_POLICY_TYPE_PERCENT",
"value": 25,
"periodSeconds": 60
},
{
"type": "SCALING_POLICY_TYPE_PODS",
"value": 10,
"periodSeconds": 60
}
],
"selectPolicy": "SCALING_POLICY_SELECT_MIN"
},
"scaleDown": {
"policies": [
{
"type": "SCALING_POLICY_TYPE_PERCENT",
"value": 25,
"periodSeconds": 60
},
{
"type": "SCALING_POLICY_TYPE_PODS",
"value": 10,
"periodSeconds": 60
}
],
"selectPolicy": "SCALING_POLICY_SELECT_MIN"
}
},
"configId": "<string>",
"config": "<string>",
"etag": "<string>",
"hardware": "<string>",
"trafficMode": "TRAFFIC_MODE_LIVE",
"status": {
"state": "DEPLOYMENT_STATE_PROVISIONING",
"message": "<string>",
"readyReplicas": 123,
"scheduledReplicas": 123,
"details": {
"region": [
{
"region": "<string>",
"scheduledReplicas": 123,
"readyReplicas": 123
}
]
}
},
"speculatorId": "<string>",
"speculatorRevisionId": "<string>",
"speculator": "<string>",
"estimatedEffectiveTrafficShare": 123,
"maxConcurrentRequestsPerReplica": "<string>",
"inactiveTimeout": 123,
"runtimeInfo": {
"engineType": "<string>",
"engineVersion": "<string>",
"functionCallingSupported": true,
"structuredOutputSupported": true
},
"desiredReplicas": 123,
"placement": {
"inline": {
"regions": [
"<string>"
],
"constraint": "ENFORCEMENT_REQUIRED",
"compliancePolicy": {
"hipaa": true
}
}
}
}
],
"object": "list",
"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
ID of the project that owns the endpoint.
ID of the endpoint whose deployments are listed.
Query Parameters
Maximum number of deployments to return. Max 500, defaults to 50.
Cursor from a previous deployment list response.
Sort field for the results. Supports created_at or updated_at, optionally followed by asc or desc.
Filter expression using name, state, model, created_at, or updated_at with comparison operators and AND/OR/NOT; state takes a DeploymentState enum name and model takes a model resource name. name supports substring matching with : and prefix/suffix wildcards with *, and accepts a bare deployment name or <project_slug>/<endpoint_name>/<deployment_name>.
Was this page helpful?