For the complete documentation index, see llms.txt. This page is also available as Markdown.

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/v1

Common Query Parameters

All analytics endpoints support these parameters:

Parameter
Type
Required
Description

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

Metric
Description

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:

Last updated

Was this helpful?