API reference · Dedicated endpoints
Requests, errors, tokens, latency and billed replica time, by deployment and over time
/v1/endpoints/{dedicated_endpoint_id}/analytics- TypeScript
client.dedicatedEndpoints.getAnalytics()- Python
client.dedicated_endpoints.get_analytics()- CLI
hayonix endpoints analytics
Covers the last 24 hours in hourly buckets by default (the last hour for minute, the last 30 days for day), ending at the next bucket boundary. At most 2000 buckets per call. replica_cost is exactly what was charged for replica time in the period.
Project API key (Authorization: Bearer sk_…), or a console session. Requires the dedicated_endpoint:read permission (a key's scope, or a role that includes it).
Examples
The samples read API_KEY and API_BASE_URL from the environment (see Setup). Values are examples.
curl -sS "$API_BASE_URL/endpoints/ded_01jc5zq4m8k3v6x9t2w7r0b1e4/analytics" \
-H "Authorization: Bearer $API_KEY"Request
| Header | Required | Description |
|---|---|---|
Authorization | yes | Bearer and your API key. The key implies its project. |
X-Project-Id | session only | The project to act in, for console sessions. Requests with an API key leave it out. |
Path parameters
dedicated_endpoint_idstringrequiredID of the dedicated endpoint
ID with prefix ded_
Query parameters
startstring (date-time)Default: 24 hours before end
endstring (date-time)Default: now
bucketstringDefault hour
One of
minutehourday
Response
200 EndpointAnalytics — Analytics
objectstringrequiredAlways `endpoint_analytics`: the type of this object
One of
endpoint_analyticsendpoint_idstringrequiredID of the endpoint
startstring (date-time)requiredStart of the period (inclusive)
endstring (date-time)requiredEnd of the period (exclusive)
bucketstringrequiredWidth of each `series` bucket (UTC)
One of
minutehourdaytotalsobjectrequiredThe whole endpoint over the whole period
ShowHide 8 fields of
totalsrequestsintegerrequiredRequests that finished in the period
errorsintegerrequiredOf those, requests that did not complete successfully (errors and aborts)
input_tokensstringrequiredDecimal string
output_tokensstringrequiredDecimal string
latency_msobjectrequiredTotal time per request, from when the platform received it until the response finished
ShowHide 3 fields of
latency_msavginteger | nullrequiredMean request latency in milliseconds; null without requests
p50integer | nullrequiredMedian (p50) request latency in milliseconds; null without requests
p95integer | nullrequired95th percentile (p95) request latency in milliseconds; null without requests
first_byte_ms_avginteger | nullrequiredMean time to the first byte of the response in milliseconds; null without requests
replica_secondsstringrequiredBilled ready replica-seconds (a 2-GPU replica-second counts 2), decimal string
replica_coststringrequiredWhat those seconds were charged
pattern ^-?[0-9]+$
deploymentsarray of objectrequiredThe same figures per deployment that had requests or replica time
ShowHide 9 fields of
deploymentsdeployment_idstringrequiredID of the deployment
requestsintegerrequiredRequests that finished in the period
errorsintegerrequiredOf those, requests that did not complete successfully (errors and aborts)
input_tokensstringrequiredDecimal string
output_tokensstringrequiredDecimal string
latency_msobjectrequiredTotal time per request, from when the platform received it until the response finished
ShowHide 3 fields of
latency_msavginteger | nullrequiredMean request latency in milliseconds; null without requests
p50integer | nullrequiredMedian (p50) request latency in milliseconds; null without requests
p95integer | nullrequired95th percentile (p95) request latency in milliseconds; null without requests
first_byte_ms_avginteger | nullrequiredMean time to the first byte of the response in milliseconds; null without requests
replica_secondsstringrequiredBilled ready replica-seconds (a 2-GPU replica-second counts 2), decimal string
replica_coststringrequiredWhat those seconds were charged
pattern ^-?[0-9]+$
seriesarray of objectrequiredRequest figures per bucket and deployment in time order; buckets without requests are left out
ShowHide 8 fields of
seriesbucket_startstring (date-time)requiredStart of the bucket (UTC)
deployment_idstring | nullrequiredID of the deployment
requestsintegerrequiredRequests that finished in the period
errorsintegerrequiredOf those, requests that did not complete successfully (errors and aborts)
input_tokensstringrequiredDecimal string
output_tokensstringrequiredDecimal string
latency_msobjectrequiredTotal time per request, from when the platform received it until the response finished
ShowHide 3 fields of
latency_msavginteger | nullrequiredMean request latency in milliseconds; null without requests
p50integer | nullrequiredMedian (p50) request latency in milliseconds; null without requests
p95integer | nullrequired95th percentile (p95) request latency in milliseconds; null without requests
first_byte_ms_avginteger | nullrequiredMean time to the first byte of the response in milliseconds; null without requests
Example response
{
"object": "endpoint_analytics",
"endpoint_id": "string",
"start": "2026-01-01T00:00:00.000Z",
"end": "2026-01-01T00:00:00.000Z",
"bucket": "minute",
"totals": {
"requests": 1,
"errors": 1,
"input_tokens": "string",
"output_tokens": "string",
"latency_ms": {
"avg": 1,
"p50": 1,
"p95": 1
},
"first_byte_ms_avg": 1,
"replica_seconds": "string",
"replica_cost": "1500000000"
},
"deployments": [
{
"deployment_id": "string",
"requests": 1,
"errors": 1,
"input_tokens": "string",
"output_tokens": "string",
"latency_ms": {
"avg": 1,
"p50": 1,
"p95": 1
},
"first_byte_ms_avg": 1,
"replica_seconds": "string",
"replica_cost": "1500000000"
}
],
"series": [
{
"bucket_start": "2026-01-01T00:00:00.000Z",
"deployment_id": "string",
"requests": 1,
"errors": 1,
"input_tokens": "string",
"output_tokens": "string",
"latency_ms": {
"avg": 1,
"p50": 1,
"p95": 1
},
"first_byte_ms_avg": 1
}
]
}Errors
Errors use the standard envelope. What this operation can answer:
| Status | Type | When |
|---|---|---|
400 | invalid_request_error | A parameter or body field is missing or not allowed; param names it. |
401 | authentication_error | The key or session is missing, revoked or expired. |
403 | permission_error | The credential lacks the permission this needs, or the organization is suspended. |
404 | not_found_error | No such resource in this project (an ID from another project is answered the same way). |
429 | rate_limit_error rate_limited | Too many requests; retry after retry-after seconds. |