Skip to content
Hayonix

API reference · Dedicated endpoints

Requests, errors, tokens, latency and billed replica time, by deployment and over time

GET/v1/endpoints/{dedicated_endpoint_id}/analytics
API keydedicated_endpoint:readProject
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

Headers
HeaderRequiredDescription
AuthorizationyesBearer and your API key. The key implies its project.
X-Project-Idsession onlyThe project to act in, for console sessions. Requests with an API key leave it out.

Path parameters

  • dedicated_endpoint_idstringrequired

    ID of the dedicated endpoint

    ID with prefix ded_

Query parameters

  • startstring (date-time)

    Default: 24 hours before end

  • endstring (date-time)

    Default: now

  • bucketstring

    Default hour

    One ofminutehourday

Response

200 EndpointAnalytics — Analytics

  • objectstringrequired

    Always `endpoint_analytics`: the type of this object

    One ofendpoint_analytics

  • endpoint_idstringrequired

    ID of the endpoint

  • startstring (date-time)required

    Start of the period (inclusive)

  • endstring (date-time)required

    End of the period (exclusive)

  • bucketstringrequired

    Width of each `series` bucket (UTC)

    One ofminutehourday

  • totalsobjectrequired

    The whole endpoint over the whole period

    Show 8 fields of totals
    • requestsintegerrequired

      Requests that finished in the period

    • errorsintegerrequired

      Of those, requests that did not complete successfully (errors and aborts)

    • input_tokensstringrequired

      Decimal string

    • output_tokensstringrequired

      Decimal string

    • latency_msobjectrequired

      Total time per request, from when the platform received it until the response finished

      Show 3 fields of latency_ms
      • avginteger | nullrequired

        Mean request latency in milliseconds; null without requests

      • p50integer | nullrequired

        Median (p50) request latency in milliseconds; null without requests

      • p95integer | nullrequired

        95th percentile (p95) request latency in milliseconds; null without requests

    • first_byte_ms_avginteger | nullrequired

      Mean time to the first byte of the response in milliseconds; null without requests

    • replica_secondsstringrequired

      Billed ready replica-seconds (a 2-GPU replica-second counts 2), decimal string

    • replica_coststringrequired

      What those seconds were charged

      pattern ^-?[0-9]+$

  • deploymentsarray of objectrequired

    The same figures per deployment that had requests or replica time

    Show 9 fields of deployments
    • deployment_idstringrequired

      ID of the deployment

    • requestsintegerrequired

      Requests that finished in the period

    • errorsintegerrequired

      Of those, requests that did not complete successfully (errors and aborts)

    • input_tokensstringrequired

      Decimal string

    • output_tokensstringrequired

      Decimal string

    • latency_msobjectrequired

      Total time per request, from when the platform received it until the response finished

      Show 3 fields of latency_ms
      • avginteger | nullrequired

        Mean request latency in milliseconds; null without requests

      • p50integer | nullrequired

        Median (p50) request latency in milliseconds; null without requests

      • p95integer | nullrequired

        95th percentile (p95) request latency in milliseconds; null without requests

    • first_byte_ms_avginteger | nullrequired

      Mean time to the first byte of the response in milliseconds; null without requests

    • replica_secondsstringrequired

      Billed ready replica-seconds (a 2-GPU replica-second counts 2), decimal string

    • replica_coststringrequired

      What those seconds were charged

      pattern ^-?[0-9]+$

  • seriesarray of objectrequired

    Request figures per bucket and deployment in time order; buckets without requests are left out

    Show 8 fields of series
    • bucket_startstring (date-time)required

      Start of the bucket (UTC)

    • deployment_idstring | nullrequired

      ID of the deployment

    • requestsintegerrequired

      Requests that finished in the period

    • errorsintegerrequired

      Of those, requests that did not complete successfully (errors and aborts)

    • input_tokensstringrequired

      Decimal string

    • output_tokensstringrequired

      Decimal string

    • latency_msobjectrequired

      Total time per request, from when the platform received it until the response finished

      Show 3 fields of latency_ms
      • avginteger | nullrequired

        Mean request latency in milliseconds; null without requests

      • p50integer | nullrequired

        Median (p50) request latency in milliseconds; null without requests

      • p95integer | nullrequired

        95th percentile (p95) request latency in milliseconds; null without requests

    • first_byte_ms_avginteger | nullrequired

      Mean time to the first byte of the response in milliseconds; null without requests

Example response
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:

Errors
StatusTypeWhen
400invalid_request_errorA parameter or body field is missing or not allowed; param names it.
401authentication_errorThe key or session is missing, revoked or expired.
403permission_errorThe credential lacks the permission this needs, or the organization is suspended.
404not_found_errorNo such resource in this project (an ID from another project is answered the same way).
429rate_limit_error rate_limitedToo many requests; retry after retry-after seconds.