Skip to main content
GET
Error

Authorizations

Authorization
string
header
required

Management API authentication for /api/* endpoints. Use the Authorization header with Bearer <API key>. Virtual keys, dashboard/user/session tokens, and x-api-key headers are not supported on management APIs.

Query Parameters

providers
string

Comma-separated list of providers to filter by

models
string

Comma-separated list of models to filter by

status
string

Comma-separated list of statuses to filter by

objects
string

Comma-separated list of object types to filter by

selected_key_ids
string

Comma-separated list of selected key IDs to filter by

virtual_key_ids
string

Comma-separated list of virtual key IDs to filter by

routing_rule_ids
string

Comma-separated list of routing rule IDs to filter by

routing_engine_used
string

Comma-separated list of routing engines to filter by (routing-rule, governance, or loadbalancing)

start_time
string<date-time>

Start time filter (RFC3339 format)

end_time
string<date-time>

End time filter (RFC3339 format)

min_latency
number

Minimum latency filter

max_latency
number

Maximum latency filter

min_tokens
integer

Minimum tokens filter

max_tokens
integer

Maximum tokens filter

min_cost
number

Minimum cost filter

max_cost
number

Maximum cost filter

missing_cost_only
boolean

Only show logs with missing cost

Search in request/response content

request_id
string

Exact lookup on a log ID (which is the request ID). Takes precedence over the time range — start_time/end_time/period are ignored when it is set. roots_only is ignored too, so an ID naming a fallback child returns that child rather than collapsing it into its root.

compare_to_previous
boolean
default:false

When true, also return the same statistics for the immediately preceding window of equal length, so callers can render change-vs-previous-period. Requires a bounded window of positive length (start_time and end_time, or period) and no request_id, since an id lookup matches one row regardless of the window. Where there is no preceding window to compare against, the response omits previous with has_previous_period false. A failure to compute the previous period degrades to has_previous_period false rather than failing the request.

Response

Successful response

Log statistics for the requested window. The current period's fields are at the top level, so a request without compare_to_previous returns the LogStats fields unchanged, plus has_previous_period false. has_previous_period is always present; previous appears only when a comparison was requested and computed.

total_requests
integer<int64>
required
total_tokens
integer<int64>
required
total_cost
number
required
average_latency
number
required
success_rate
number
required

Percentage of completed provider attempts that succeeded

user_facing_success_rate
number
required

Percentage of user requests that ultimately succeeded, counting fallback chains as one request

user_facing_total_requests
integer<int64>
required

Count of root requests used as the denominator for user_facing_success_rate

has_previous_period
boolean
required

Always present. True when previous is populated. False when the comparison was not requested, the window is unbounded, or the previous-period query failed.

cache_hit_rate_total_requests
integer<int64>

Completed requests used as the local-cache hit-rate denominator

direct_cache_hits
integer<int64>

Number of direct local-cache hits

semantic_cache_hits
integer<int64>

Number of semantic local-cache hits

previous
object

The same statistics for the preceding window of equal length, ending immediately before the requested window starts. Present only when compare_to_previous is true and has_previous_period is true.