POST
/
v0
/
endpoint-metrics
curl --request POST \
  --url 'https://api.unify.ai/v0/endpoint-metrics?endpoint_name=my_endpoint&metric_name=tokens-per-second&value=10&measured_at=2024-08-12T04:20:32.808410' \
  --header "Authorization: Bearer $UNIFY_KEY"
{
    "info": "Custom endpoint benchmark uploaded successfully!"
}

Append speed or cost data to the standardized time-series benchmarks for a custom endpoint (only custom endpoints are publishable by end users).

Authorizations

Authorization
string
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

endpoint_name
string
required

Name of the custom endpoint to append benchmark data for.

metric_name
string
required

Name of the metric to submit. Allowed metrics are: “input_cost”, “output_cost”, “ttft”, “itl”.

value
number
required

Value of the metric to submit.

measured_at
string

The timestamp to associate with the submission. Defaults to current time if unspecified.

curl --request POST \
  --url 'https://api.unify.ai/v0/endpoint-metrics?endpoint_name=my_endpoint&metric_name=tokens-per-second&value=10&measured_at=2024-08-12T04:20:32.808410' \
  --header "Authorization: Bearer $UNIFY_KEY"
{
    "info": "Custom endpoint benchmark uploaded successfully!"
}