queries
get_query_metrics
Get query metrics for specified parameters.
Arguments:
start_time
- Timestamp of the earliest query to aggregate. Format isYYYY-MM-DD hh:mm:ss
.end_time
- Timestamp of the latest query to aggregate. Format isYYYY-MM-DD hh:mm:ss
.models
- Models to fetch metrics from. Comma-separated string of model names.providers
- Providers to fetch metrics from. Comma-separated string of provider names.interval
- Number of seconds in the aggregation interval. Default is 300.secondary_user_id
- Secondary user id to match theuser
attribute from/chat/completions
.api_key
- If specified, unify API key to be used. Defaults to the value in theUNIFY_KEY
environment variable.
Returns:
A dictionary containing the query metrics.