Analytics
API endpoints for AI usage analytics and reporting.
The Analytics API provides aggregated usage statistics derived from audit logs. Use these endpoints to understand AI usage patterns, costs, and performance across your application.
Endpoints
Base URL
/umbraco/ai/management/api/v1Common Query Parameters
All analytics endpoints support these parameters:
from
datetime
Yes
Start of period (inclusive)
to
datetime
Yes
End of period (inclusive)
granularity
string
No
Data granularity: hour, day, week, month
Analytics Concepts
Summary Metrics
totalRequests
Number of AI operations
inputTokens
Total tokens in requests
outputTokens
Total tokens in responses
totalTokens
Combined token count
successCount
Successful operations
failureCount
Failed operations
successRate
Success percentage (0.0-1.0)
averageDurationMs
Mean operation time in milliseconds
Time Series
Time series data shows metrics over time, useful for trend analysis and identifying usage patterns.
Breakdowns
Breakdowns show how usage is distributed across different dimensions:
By Provider - Which AI providers are used most
By Model - Which models consume most tokens
By Profile - Which profiles are most active
By User - Who uses AI features most
Example: Dashboard Query
To populate a usage dashboard, you might call multiple endpoints:
Related
Audit Logs - Raw operation data
Last updated
Was this helpful?