Analytics
The Analytics feature in Open WebUI provides administrators with comprehensive insights into usage patterns, token consumption, and model performance across their instance. This powerful tool helps you understand how your users are interacting with AI models and make data-driven decisions about resource allocation and model selection.
Analytics is only accessible to users with admin role. Access it via Settings > Admin > Analytics.
If you don't need the Analytics tab, you can hide it entirely by setting the ENABLE_ADMIN_ANALYTICS environment variable to False. This prevents the analytics API router from being mounted and removes the tab from the admin navigation. A restart is required for this change to take effect.
Overview
The Analytics dashboard gives you a bird's-eye view of your Open WebUI instance's activity, including:
- Message volume across different models and time periods
- Token usage tracking for cost estimation and resource planning
- User activity patterns to understand engagement
- Time-series data showing trends over hours, days, or months
All analytics data is derived from the message history stored in your instance's database. When the Analytics feature is enabled, Open WebUI automatically tracks and indexes messages to provide fast, queryable insights.
Accessing Analytics
- Log in with an admin account
- Click your profile icon and open Settings
- Open the Admin section and select Analytics, listed under Quality

The dashboard is no longer a separate page. It opens in the settings window next to your personal settings, and the old /admin/analytics URL redirects there. If ENABLE_ADMIN_ANALYTICS is off, that URL redirects to the Admin Panel user list instead and the Analytics entry is not listed.
Personal Usage
The dashboard described here is the instance-wide admin view. Separately, every user has a personal usage view of their own activity at Settings > Usage. It requires no admin role and no configuration.
It is scoped strictly to the signed-in user's own data:
- Token totals (input and output), both lifetime and for the period covered
- Message and chat counts, and the number of days they were active
- An activity heatmap, viewable by day, by week, or as a cumulative total
- Current and longest activity streaks
- Their most-used models and tools
The period covered is the past two years (the last 730 days), the same window for every account regardless of when it was created, and the data is bucketed in the user's own timezone. Because it only ever reports the requesting user's own activity, it exposes nothing about anyone else's.
Dashboard Features
The Overview / Sessions switch picks the view. Both follow the same period and group filter. Sessions lists single chats.
Time Period Selection
At the top right of the Analytics dashboard, you can filter all data by time period:
- Last 24 hours
- Last 7 days
- Last 30 days
- Last 90 days
- Year to date - From 1 January of the current year until now
- Last 12 months
- All time - Complete historical data
- Custom range - A start and an end date you choose
Choosing Custom range puts two date fields next to the period dropdown. Nothing is queried until both are filled in, so while you are still picking, the dashboard sits idle instead of showing a spinner, and it loads as soon as the second date is set. The end date is inclusive, so it covers the whole of that day.
Your selected time period is automatically saved and persists across browser sessions, the custom dates included. If you leave Analytics on Custom range with the dates incomplete and come back to it later, the dashboard shows empty figures until you fill the range in, rather than loading indefinitely.
Group Filtering
If you have user groups configured, the Analytics dashboard allows filtering by group:
- Use the group dropdown next to the time period selector
- Select a specific group to view analytics only for users in that group
- Choose "All Users" to see instance-wide analytics
This is useful for:
- Department-level reporting - Track usage for specific teams
- Cost allocation - Attribute token consumption to business units
- Pilot programs - Monitor adoption within test groups
All metrics on the page update automatically when you change the time period or group filter, including the usage chart.
Summary Statistics
The dashboard header displays key metrics for the selected time period:
- Tokens - Sum of all input and output tokens processed
- Input and Output - The input and output tokens separately
- Messages - Number of assistant responses generated
- Chats - Number of unique conversations
- Users - Number of users who sent messages
Token figures are shortened, for example 1.2m. Hover any figure to see the exact value.
Analytics counts assistant responses rather than user messages. This provides a more accurate measure of AI model usage and token consumption.
Message Timeline Chart
The usage chart shows activity over time, broken down by model. The Tokens / Messages switch above it picks what is counted, and Tokens is shown first. The same switch sets how the tables below are ranked, see Model Usage Table.
The chart has two views:
- Volume - Stacked bars per time step, one color per model
- Activity - A heatmap with one row per model. Each cell is shaded relative to that model's busiest time step, and a blank cell means no recorded usage
Click a model in the legend under the chart, or a row name in the Activity view, to show only that model. Click it again or click All models to show every model. Hovering a time step shows the value for each model at that point. Times on the chart are server time.
The interval dropdown sets the size of each time step. Its default and its choices follow the time period:
| Time period | Default | Choices |
|---|---|---|
| Last 24 hours | 10 min | 10 min, Hourly, Daily |
| Last 7 days | Hourly | Hourly, Daily |
| Last 30 days | 6 hours | Hourly, 3 hours, 6 hours, Daily |
| Longer periods | Daily | Daily |
Compare shows the previous period next to the current one in the Volume view. The previous period is the window of the same length directly before the selected one. The chart then draws the current period as a solid line and the previous period as a dashed line. Hovering a time step shows both values with their dates and the change in percent. Compare is unavailable for All time, since that period has nothing before it.
This chart helps you:
- Identify busy periods for capacity planning
- Track model adoption after deployment
- Detect unusual activity spikes
- Monitor the impact of changes or announcements
Model Usage Table
Model usage and user activity share one table below the chart. The Models / Users switch above it picks which list it shows, and Models is shown first. Both lists are sorted by Total tokens by default. Picking Messages in the switch above the chart sorts them by message count and turns the share column into Message share.
A detailed breakdown of how each model is being used:
| Column | Description |
|---|---|
| # | Rank in the current sort order |
| Model | Model name with icon |
| Messages | Total assistant responses generated |
| Users | Distinct users |
| Chats | Distinct chats |
| Input | Input tokens |
| Output | Output tokens |
| Total | Input and output tokens together |
| Token share | Percentage share of all tokens. Shows as Message share when the chart counts messages |
Features:
- Sortable columns - Click any column header to sort, each of the three token columns included
- Model icons - Visual identification with profile images
- Token tracking - See which models consume the most resources
- Clickable rows - Click any model to open the Model Details Modal
Use cases:
- Identify your most popular models
- Calculate cost per model (by multiplying tokens by provider rates)
- Decide which models to keep or remove
- Plan infrastructure upgrades based on usage
Model Details Modal
Clicking on any model row opens a detailed modal with two tabs:
Overview Tab
The Overview tab provides:
- Feedback Activity Chart - Visual history of user feedback (thumbs up/down) over time
- Toggle between 30D, 1Y, or All views
- Weekly aggregation for longer time ranges
- Tags - Most common chat tags associated with this model (top 10)
This helps you understand:
- How users perceive model quality over time
- Which topics/use cases the model is handling
- Trends in user satisfaction
Chats Tab
The Chats tab is only visible when ENABLE_ADMIN_CHAT_ACCESS is enabled in your instance settings.
The Chats tab shows conversations that used this model:
- User info - Who started each chat
- Preview - First message of each conversation
- Timestamp - When the chat was last updated
- Click to open - Navigate directly to the shared chat view
This is useful for:
- Understanding how users interact with specific models
- Auditing model usage for quality assurance
- Finding example conversations for training or documentation
User Activity Table
Pick Users in the switch above the table to track user engagement and token consumption per user:
| Column | Description |
|---|---|
| # | Rank in the current sort order |
| User | Username with profile picture |
| Messages | Total messages sent by this user |
| Input | Input tokens of this user |
| Output | Output tokens of this user |
| Total | Input and output tokens together |
| Token share | Percentage share of all tokens. Shows as Message share when the chart counts messages |
Features:
- Sortable columns - Sort by name, messages, share or any of the three token columns. The table shows the 50 users with the most tokens in the period, or with the most messages when the chart counts messages. The API's
limitparameter raises that - User identification - Profile pictures and display names. Hover or click a picture to open that person's profile card
- Token attribution - See resource consumption per user
Use cases:
- Monitor power users and their token consumption
- Identify inactive or low-usage accounts
- Plan user quotas or rate limits
- Calculate per-user costs for billing purposes
Sessions
The Sessions view is only shown when ENABLE_ADMIN_CHAT_ACCESS is enabled. It shows chat titles, tool calls and errors from other users' chats.
Sessions lists one row per chat with messages in the selected period, filtered by group. Sub-agent, timer and note chats are included and labelled. The summary shows totals for sessions, prompts, tokens and response errors. Click a token range below it to filter the list.
| Column | Description |
|---|---|
| Session | Chat title, with its folder or model |
| User | Owner of the chat |
| Last active | Time of the last saved message |
| Responses | Assistant responses in the period |
| Tokens | Recorded input and output tokens. - means none were recorded, * means partial |
| Response errors | Responses that ended in an error |
| Span | Time from the first to the last saved message, idle time included |
Not logged means a timestamp is missing. Search by chat title, user or folder, filter by model, or hide sub-agent chats in the Session options menu.
Session Details
Click a session to see its token and cache totals, a chart per response (Tokens or Timeline) and the execution trace: each response with its tool calls, results and errors, their outcome and duration. All, Tools and Errors filter the trace. Open chat opens the chat in a new tab. Timing is saved for new replies only.
Titles are cut to 10 words. Links, file paths, long identifiers and values that follow words like token or password are removed.
Token Usage Tracking
What Are Tokens?
Tokens are the units that language models use to process text. Both the input (your prompt) and output (the model's response) consume tokens. Most AI providers charge based on token usage, making token tracking essential for cost management.
How Token Tracking Works
Open WebUI automatically captures token usage from model responses and stores it with each message. The Analytics feature aggregates this data to show:
- Input tokens - Tokens in user prompts and context
- Output tokens - Tokens in model responses
- Total tokens - Sum of input and output
Token data is normalized across different model providers (OpenAI, Ollama, llama.cpp, etc.) to provide consistent metrics regardless of which backend you're using.
Each call to the provider counts once, even when the provider resends its usage with every streamed chunk. When a reply makes several calls because the model uses tools, their usage is added up. A reply without usage stays unrecorded, and one where only some calls report usage is marked partial.
The figures are the ones the provider reports, and most OpenAI-compatible providers report nothing on a streamed reply unless they are asked. Asking is what the Usage capability in Workspace > Models > Edit does, so a model without it can show no tokens at all. See Capabilities and bindings.
The request for token counts is added server-side, so a model with Usage enabled reports its tokens in every chat it runs, including the ones Open WebUI starts on a user's behalf through automations, timers, sub-agents and channels. Those runs are part of the same totals as the chats people type in.
Token Usage Metrics
The Token Usage section (accessible via the Tokens endpoint or dashboard) provides:
- Per-model token breakdown - Input, output, and total tokens for each model
- Total token consumption - Instance-wide token usage
- Message count correlation - Tokens per message for efficiency analysis
To estimate costs, multiply the token counts by your provider's pricing:
Cost = (input_tokens × input_price) + (output_tokens × output_price)
Example for GPT-5.6:
- Input: 1,000,000 tokens × $0.03/1K = $30
- Output: 500,000 tokens × $0.06/1K = $30
- Total: $60
Use Cases
1. Resource Planning
Scenario: You're running Open WebUI for a team and need to plan infrastructure capacity.
How Analytics helps:
- View the Message Timeline to identify peak usage hours
- Check Model Usage to see which models need more resources
- Monitor Token Usage to estimate future costs
- Track User Activity to plan for team growth
2. Model Evaluation
Scenario: You've deployed several models and want to know which ones your users prefer.
How Analytics helps:
- Compare message counts across models to see adoption rates
- Check token efficiency (tokens per message) to identify verbose models
- Monitor trends in the timeline chart after introducing new models
- Combine with the Evaluation feature for quality insights
3. Cost Management
Scenario: You're using paid API providers and need to control costs.
How Analytics helps:
- Track total token consumption by model and user
- Identify high-usage users for quota discussions
- Compare token costs across different model providers
- Set up regular reviews using time-period filters
4. User Engagement
Scenario: You want to understand how your team is using AI tools.
How Analytics helps:
- Monitor active users vs. registered accounts
- Identify power users who might need support or training
- Track adoption trends over time
- Correlate usage with team initiatives or training sessions
5. Compliance & Auditing
Scenario: Your organization requires usage reporting for compliance.
How Analytics helps:
- Generate activity reports for specific time periods
- Track user attribution for all AI interactions
- Monitor model usage for approved vs. unapproved models
- Export data via API for external reporting tools
Technical Details
Data Storage
Analytics data is stored in the chat_message table, which contains:
- Message content - User and assistant messages
- Metadata - Model ID, user ID, timestamps
- Token usage - Input, output, and total tokens
- Relationships - Links to parent messages and chats
On upgrade, for every instance whether or not the flag is set, Open WebUI:
- Creates the
chat_messagetable with optimized indexes - Backfills existing messages from your chat history
- Dual-writes new messages to both the chat JSON and the message table
This dual-write approach ensures:
- Backward compatibility - Existing features continue working
- Fast queries - Analytics doesn't impact chat performance
- Data consistency - All messages are captured
Database Indexes
The following indexes optimize analytics queries:
chat_id- Fast lookup of all messages in a chatuser_id- Quick user activity reportsmodel_id- Efficient model usage queriescreated_at- Time-range filtering- Composite indexes for common query patterns
API Endpoints
For advanced users and integrations, Analytics provides REST API endpoints:
Dashboard Endpoints:
GET /api/v1/analytics/summary
GET /api/v1/analytics/models
GET /api/v1/analytics/users
GET /api/v1/analytics/messages
GET /api/v1/analytics/daily
GET /api/v1/analytics/tokens
Model Detail Endpoints:
GET /api/v1/analytics/models/{model_id}/chats # Get chats using this model
GET /api/v1/analytics/models/{model_id}/overview # Get feedback history and tags
Session Endpoints (admin only, 403 when ENABLE_ADMIN_CHAT_ACCESS is off):
GET /api/v1/analytics/sessions # One session per chat
GET /api/v1/analytics/sessions/{chat_id} # Messages of a session with shortened, redacted previews
GET /api/v1/analytics/sessions/{chat_id}/messages/{message_id}/events # Saved steps of one response with redacted snippets
GET /api/v1/analytics/sessions/{chat_id}/trace # Execution trace of a session
All four take the common query parameters below plus skip and limit (at most 50).
Personal Usage Endpoint (any signed-in user, returns only their own data):
GET /api/v1/users/usage
Accepts either days (7-732) or an explicit start_date / end_date range, and buckets results in the requesting user's timezone. Called with none of them, as the Settings > Usage page does, it returns the last 730 days ending now. This one is not admin-gated, because it reports nothing beyond the caller's own activity.
Common Query Parameters:
| Parameter | Type | Description |
|---|---|---|
start_date | int | Unix timestamp (epoch seconds) - start of range |
end_date | int | Unix timestamp (epoch seconds) - end of range |
group_id | string | Filter to a specific user group (optional) |
/api/v1/analytics/daily parameters:
| Parameter | Type | Description |
|---|---|---|
granularity | string | Size of each time bucket: 10m, hourly, 3h, 6h or daily (default). Buckets are in server time |
metric | string | messages (default) counts assistant responses, tokens sums input and output tokens |
compare | bool | true adds a previous object to each bucket with the value for the window of the same length directly before the range, plus the start and end of both. It needs both start_date and end_date, with start_date not after end_date, or the request fails with 400 |
/api/v1/analytics/users parameters:
| Parameter | Type | Description |
|---|---|---|
metric | string | messages (default) ranks users by assistant responses, tokens ranks them by total input and output tokens |
skip | int | How many of the top-ranked users to skip, 0 by default. Use it with limit to page through the ranking |
limit | int | How many of the top-ranked users to return, 50 users by default |
The response carries total, the number of users with activity in the range, next to the users list.
All Analytics endpoints require admin authentication. Include your admin bearer token:
curl -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
"https://your-instance.com/api/v1/analytics/summary?group_id=abc123"Privacy & Data Considerations
What Gets Tracked?
Analytics tracks:
- Message timestamps and counts
- Token usage per message
- Model IDs and user IDs
- Chat IDs and message relationships
- Start and end times of responses and tool calls
Analytics does not track:
- Message content in the dashboard. Sessions shows shortened chat titles and tool names
- External sharing or exports
- Individual message content outside the database
Data Retention
Analytics data follows your instance's chat retention policy. When you delete:
- A chat - All associated messages are removed from analytics
- A user - Their chats and every message in them are deleted, so their history vanishes from analytics rather than being kept anonymously
- Message history - Analytics data is also cleared
Frequently Asked Questions
Why are message counts different from what I expected?
Analytics counts assistant responses, not user messages. If a chat has 10 user messages and 10 assistant responses, the count is 10. This provides a more accurate measure of AI usage and token consumption.
How accurate is token tracking?
Token accuracy depends on your model provider:
- OpenAI/Anthropic - Exact counts from API responses
- Ollama - Accurate for models with token reporting
- llama.cpp - Reports tokens when available
- Custom providers - Depends on implementation
A response without token data adds nothing to the totals.
Can I export analytics data?
Yes, via the API endpoints. Use tools like curl, Python scripts, or BI tools to fetch and export data:
curl -H "Authorization: Bearer TOKEN" \
"https://instance.com/api/v1/analytics/summary?start_date=1704067200&end_date=1706745600" \
> analytics_export.jsonSummary
Open WebUI's Analytics feature transforms your instance into a data-driven platform by providing:
- Real-time insights into model and user activity
- Token tracking for cost management and optimization
- Trend analysis to understand usage patterns over time
- User engagement metrics for community building
- Privacy-focused design keeping all data on your instance
Whether you're managing a personal instance or a large organizational deployment, Analytics gives you the visibility needed to optimize performance, control costs, and better serve your users.
Related Features
- Evaluation - Measure model quality through user feedback
- RBAC - Control access to models and features per user
- Data Controls - Manage chat history and exports