Skip to navigation

Get LLM metric summary

Returns a single aggregated row of LLM metrics for the entire time range.

Authentication

AuthorizationBearer

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

OR
AuthorizationBearer

Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

Query parameters

summary_typeenumOptionalDefaults to all

Preset time range. Use this or explicit start_time / end_time.

datedateOptional

Base date used with summary_type presets.

start_timedatetimeOptional
Optional explicit ISO start time.
end_timedatetimeOptional
Optional explicit ISO end time.
time_tickenumOptionalDefaults to hour

Bucket granularity for time-series responses.

Allowed values:
timezone_offsetdoubleOptionalDefaults to 0
Timezone offset, in hours, used when resolving preset ranges.
fetch_filtersenumOptionalDefaults to true
Whether to include available filter options in the response.
Allowed values:

Request

This endpoint expects an object.
filtersobjectOptional

Narrows the spans the metrics are computed from.

Each key is a field to filter on, and each value is a condition: {"<field>": {"operator": "<operator>", "value": [...]}}. A span must match every condition. To set two conditions on one field, such as a range, pass a list of conditions.

Operators: "" (equals, the default), not, in, not_in, lt, lte, gt, gte, contains, not_contains, icontains (ignores case), startswith, not_startswith, endswith, not_endswith, empty, not_empty. Put values in a list: "" and in match any of the listed values, and not and not_in match none of them. Other operators take one value; for empty and not_empty, send [""].

Fields: span columns, such as model, provider_id, deployment_name, customer_identifier, custom_identifier, organization_key_id, prompt_id, log_type, status_code, environment, cost, latency, prompt_tokens, completion_tokens and total_request_tokens, plus metadata__<key> (values are strings). Aliases such as total_tokens and total_cost, and scores__<evaluator_id>, don't work here.

Example:

{
  "model": {"operator": "", "value": ["gpt-5.5"]},
  "customer_identifier": {"operator": "", "value": ["alex@acme.dev"]}
}

Response

Successful response.
number_of_requestsintegerOptional
total_costdoubleOptional
total_prompt_tokensintegerOptional
total_completion_tokensintegerOptional
total_tokensintegerOptional
max_tpmintegerOptional
error_countintegerOptional
error_percentagedouble or nullOptional
average_prompt_tokensdouble or nullOptional
average_completion_tokensdouble or nullOptional
average_tokensdouble or nullOptional
average_costdouble or nullOptional
average_latencydouble or nullOptional
average_tpsdouble or nullOptional
average_ttftdouble or nullOptional
prompt_cache_hit_tokensintegerOptional
reasoning_tokensintegerOptional
cache_hit_percentagedouble or nullOptional
requests_per_seconddouble or nullOptional
latencydouble or nullOptional

Legacy empty-bucket field.

time_to_first_tokendouble or nullOptional

Legacy empty-bucket field.

Errors

403
Forbidden Error