Endpoints
Get endpoint analytics
Returns aggregated request, token, latency, throughput, error, and resource-utilization metrics for an endpoint over a time range. Optionally includes time-series buckets and a per-deployment breakdown.
GET
/
v2
/
projects
/
{projectId}
/
endpoints
/
{id}
/
analytics
Together AI SDK (Python)
from together import Together
client = Together()
identity = client.whoami()
if identity.type != "project_api_key":
raise RuntimeError("TOGETHER_API_KEY must be a project API key")
project_id = identity.project.id
analytics = client.endpoints.analytics(
"ep_abc123",
project_id=project_id,
start_time="2026-10-01T00:00:00Z",
end_time="2026-10-02T00:00:00Z",
)
print(analytics)
import Together from "together-ai";
const client = new Together();
const identity = await client.whoami();
if (identity.type !== "project_api_key") {
throw new Error("TOGETHER_API_KEY must be a project API key");
}
const projectId = identity.project.id;
const analytics = await client.endpoints.analytics("ep_abc123", {
projectId,
startTime: "2026-10-01T00:00:00Z",
endTime: "2026-10-02T00:00:00Z",
});
console.log(analytics);
import Together from "together-ai";
const client = new Together();
const identity = await client.whoami();
if (identity.type !== "project_api_key") {
throw new Error("TOGETHER_API_KEY must be a project API key");
}
const projectId = identity.project.id;
const analytics = await client.endpoints.analytics("ep_abc123", {
projectId,
startTime: "2026-10-01T00:00:00Z",
endTime: "2026-10-02T00:00:00Z",
});
console.log(analytics);
curl --request GET \
--url https://api.together.ai/v2/projects/{projectId}/endpoints/{id}/analytics \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.together.ai/v2/projects/{projectId}/endpoints/{id}/analytics",
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/{id}/analytics"
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/{id}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v2/projects/{projectId}/endpoints/{id}/analytics")
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{
"endpointId": "<string>",
"timeRange": {
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
},
"metrics": {
"endpointId": "<string>",
"timeRange": {
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
},
"requestMetrics": {
"totalRequests": "<string>",
"successfulRequests": "<string>",
"failedRequests": "<string>",
"requestsPerSecond": 123,
"requestsByStatusCode": {}
},
"latencyMetrics": {
"ttftP50Ms": 123,
"ttftP90Ms": 123,
"ttftP99Ms": 123,
"latencyP50Ms": 123,
"latencyP90Ms": 123,
"latencyP99Ms": 123,
"itlP50Ms": 123,
"itlP90Ms": 123,
"itlP99Ms": 123
},
"throughputMetrics": {
"tokensPerSecond": 123,
"requestsPerSecond": 123,
"avgBatchSize": 123,
"avgBatchDepth": 123
},
"errorMetrics": {
"errorRate": 123,
"errorsByType": {}
},
"resourceUtilization": {
"cpuUtilization": 123,
"gpuUtilization": 123,
"memoryUtilization": 123,
"gpuMemoryUtilization": 123,
"networkBandwidthMbps": 123
},
"tokenMetrics": {
"totalInputTokens": "<string>",
"totalOutputTokens": "<string>",
"avgInputTokens": 123,
"avgOutputTokens": 123
},
"deploymentMetrics": [
{
"deploymentId": "<string>",
"endpointId": "<string>",
"timeRange": {
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
},
"requestMetrics": {
"totalRequests": "<string>",
"successfulRequests": "<string>",
"failedRequests": "<string>",
"requestsPerSecond": 123,
"requestsByStatusCode": {}
},
"latencyMetrics": {
"ttftP50Ms": 123,
"ttftP90Ms": 123,
"ttftP99Ms": 123,
"latencyP50Ms": 123,
"latencyP90Ms": 123,
"latencyP99Ms": 123,
"itlP50Ms": 123,
"itlP90Ms": 123,
"itlP99Ms": 123
},
"throughputMetrics": {
"tokensPerSecond": 123,
"requestsPerSecond": 123,
"avgBatchSize": 123,
"avgBatchDepth": 123
},
"errorMetrics": {
"errorRate": 123,
"errorsByType": {}
},
"resourceUtilization": {
"cpuUtilization": 123,
"gpuUtilization": 123,
"memoryUtilization": 123,
"gpuMemoryUtilization": 123,
"networkBandwidthMbps": 123
},
"tokenMetrics": {
"totalInputTokens": "<string>",
"totalOutputTokens": "<string>",
"avgInputTokens": 123,
"avgOutputTokens": 123
}
}
]
},
"timeSeries": [
{
"timestamp": "2023-11-07T05:31:56Z",
"values": {}
}
],
"deploymentAnalytics": [
{
"deploymentId": "<string>",
"endpointId": "<string>",
"timeRange": {
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
},
"metrics": {
"deploymentId": "<string>",
"endpointId": "<string>",
"timeRange": {
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
},
"requestMetrics": {
"totalRequests": "<string>",
"successfulRequests": "<string>",
"failedRequests": "<string>",
"requestsPerSecond": 123,
"requestsByStatusCode": {}
},
"latencyMetrics": {
"ttftP50Ms": 123,
"ttftP90Ms": 123,
"ttftP99Ms": 123,
"latencyP50Ms": 123,
"latencyP90Ms": 123,
"latencyP99Ms": 123,
"itlP50Ms": 123,
"itlP90Ms": 123,
"itlP99Ms": 123
},
"throughputMetrics": {
"tokensPerSecond": 123,
"requestsPerSecond": 123,
"avgBatchSize": 123,
"avgBatchDepth": 123
},
"errorMetrics": {
"errorRate": 123,
"errorsByType": {}
},
"resourceUtilization": {
"cpuUtilization": 123,
"gpuUtilization": 123,
"memoryUtilization": 123,
"gpuMemoryUtilization": 123,
"networkBandwidthMbps": 123
},
"tokenMetrics": {
"totalInputTokens": "<string>",
"totalOutputTokens": "<string>",
"avgInputTokens": 123,
"avgOutputTokens": 123
}
},
"timeSeries": [
{
"timestamp": "2023-11-07T05:31:56Z",
"values": {}
}
]
}
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}Authorizations
Query Parameters
Response
OK
Endpoint-wide usage and performance analytics with optional time-series and per-deployment breakdowns.
Was this page helpful?
⌘I
Together AI SDK (Python)
from together import Together
client = Together()
identity = client.whoami()
if identity.type != "project_api_key":
raise RuntimeError("TOGETHER_API_KEY must be a project API key")
project_id = identity.project.id
analytics = client.endpoints.analytics(
"ep_abc123",
project_id=project_id,
start_time="2026-10-01T00:00:00Z",
end_time="2026-10-02T00:00:00Z",
)
print(analytics)
import Together from "together-ai";
const client = new Together();
const identity = await client.whoami();
if (identity.type !== "project_api_key") {
throw new Error("TOGETHER_API_KEY must be a project API key");
}
const projectId = identity.project.id;
const analytics = await client.endpoints.analytics("ep_abc123", {
projectId,
startTime: "2026-10-01T00:00:00Z",
endTime: "2026-10-02T00:00:00Z",
});
console.log(analytics);
import Together from "together-ai";
const client = new Together();
const identity = await client.whoami();
if (identity.type !== "project_api_key") {
throw new Error("TOGETHER_API_KEY must be a project API key");
}
const projectId = identity.project.id;
const analytics = await client.endpoints.analytics("ep_abc123", {
projectId,
startTime: "2026-10-01T00:00:00Z",
endTime: "2026-10-02T00:00:00Z",
});
console.log(analytics);
curl --request GET \
--url https://api.together.ai/v2/projects/{projectId}/endpoints/{id}/analytics \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.together.ai/v2/projects/{projectId}/endpoints/{id}/analytics",
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/{id}/analytics"
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/{id}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v2/projects/{projectId}/endpoints/{id}/analytics")
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{
"endpointId": "<string>",
"timeRange": {
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
},
"metrics": {
"endpointId": "<string>",
"timeRange": {
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
},
"requestMetrics": {
"totalRequests": "<string>",
"successfulRequests": "<string>",
"failedRequests": "<string>",
"requestsPerSecond": 123,
"requestsByStatusCode": {}
},
"latencyMetrics": {
"ttftP50Ms": 123,
"ttftP90Ms": 123,
"ttftP99Ms": 123,
"latencyP50Ms": 123,
"latencyP90Ms": 123,
"latencyP99Ms": 123,
"itlP50Ms": 123,
"itlP90Ms": 123,
"itlP99Ms": 123
},
"throughputMetrics": {
"tokensPerSecond": 123,
"requestsPerSecond": 123,
"avgBatchSize": 123,
"avgBatchDepth": 123
},
"errorMetrics": {
"errorRate": 123,
"errorsByType": {}
},
"resourceUtilization": {
"cpuUtilization": 123,
"gpuUtilization": 123,
"memoryUtilization": 123,
"gpuMemoryUtilization": 123,
"networkBandwidthMbps": 123
},
"tokenMetrics": {
"totalInputTokens": "<string>",
"totalOutputTokens": "<string>",
"avgInputTokens": 123,
"avgOutputTokens": 123
},
"deploymentMetrics": [
{
"deploymentId": "<string>",
"endpointId": "<string>",
"timeRange": {
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
},
"requestMetrics": {
"totalRequests": "<string>",
"successfulRequests": "<string>",
"failedRequests": "<string>",
"requestsPerSecond": 123,
"requestsByStatusCode": {}
},
"latencyMetrics": {
"ttftP50Ms": 123,
"ttftP90Ms": 123,
"ttftP99Ms": 123,
"latencyP50Ms": 123,
"latencyP90Ms": 123,
"latencyP99Ms": 123,
"itlP50Ms": 123,
"itlP90Ms": 123,
"itlP99Ms": 123
},
"throughputMetrics": {
"tokensPerSecond": 123,
"requestsPerSecond": 123,
"avgBatchSize": 123,
"avgBatchDepth": 123
},
"errorMetrics": {
"errorRate": 123,
"errorsByType": {}
},
"resourceUtilization": {
"cpuUtilization": 123,
"gpuUtilization": 123,
"memoryUtilization": 123,
"gpuMemoryUtilization": 123,
"networkBandwidthMbps": 123
},
"tokenMetrics": {
"totalInputTokens": "<string>",
"totalOutputTokens": "<string>",
"avgInputTokens": 123,
"avgOutputTokens": 123
}
}
]
},
"timeSeries": [
{
"timestamp": "2023-11-07T05:31:56Z",
"values": {}
}
],
"deploymentAnalytics": [
{
"deploymentId": "<string>",
"endpointId": "<string>",
"timeRange": {
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
},
"metrics": {
"deploymentId": "<string>",
"endpointId": "<string>",
"timeRange": {
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
},
"requestMetrics": {
"totalRequests": "<string>",
"successfulRequests": "<string>",
"failedRequests": "<string>",
"requestsPerSecond": 123,
"requestsByStatusCode": {}
},
"latencyMetrics": {
"ttftP50Ms": 123,
"ttftP90Ms": 123,
"ttftP99Ms": 123,
"latencyP50Ms": 123,
"latencyP90Ms": 123,
"latencyP99Ms": 123,
"itlP50Ms": 123,
"itlP90Ms": 123,
"itlP99Ms": 123
},
"throughputMetrics": {
"tokensPerSecond": 123,
"requestsPerSecond": 123,
"avgBatchSize": 123,
"avgBatchDepth": 123
},
"errorMetrics": {
"errorRate": 123,
"errorsByType": {}
},
"resourceUtilization": {
"cpuUtilization": 123,
"gpuUtilization": 123,
"memoryUtilization": 123,
"gpuMemoryUtilization": 123,
"networkBandwidthMbps": 123
},
"tokenMetrics": {
"totalInputTokens": "<string>",
"totalOutputTokens": "<string>",
"avgInputTokens": 123,
"avgOutputTokens": 123
}
},
"timeSeries": [
{
"timestamp": "2023-11-07T05:31:56Z",
"values": {}
}
]
}
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}