get_llm_usage
Aggregate LLM token usage metrics over a time period, with breakdowns by model and service, to track and analyze consumption.
Instructions
Get aggregated LLM usage metrics (token counts) for a time period.
Provides breakdowns by model and service.
Args: start_time: Start time in ISO 8601 format end_time: End time in ISO 8601 format service_name: Filter by service name gen_ai_system: Filter by LLM provider gen_ai_request_model: Filter by requested model name gen_ai_response_model: Filter by actual model used limit: Maximum traces to analyze (default: 1000)
Returns: JSON string with usage metrics
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| end_time | No | ||
| start_time | No | ||
| service_name | No | ||
| gen_ai_system | No | ||
| gen_ai_request_model | No | ||
| gen_ai_response_model | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |