Usage Analysis
The Usage Analysis page in the PinionAI Studio provides comprehensive tracking, visualization, and export capabilities for LLM token usage across all your AI Agents. It allows administrators and operations teams to monitor costs, analyze model efficiency, and understand token distribution across different sessions, agents, and LLM models.
Permissions & Prerequisites
To access and view the Usage Analysis dashboard, the following criteria must be met:
- Authentication: You must be logged into PinionAI Studio.
- Account Selection: An Account must be selected from the sidebar.
- User Permissions: Your user role must have at least one of the following permissions:
owneradminobservability
Filter Options
The page features filtering controls at the top to refine the dataset displayed in the reports:
- Start Date & End Date: Date input selectors that define the timeframe for the analysis. The default start date is 30 days prior to the current date, and the default end date is today.
- Select Agent: A dropdown selector to filter usage for a specific agent or view aggregated usage for "All Agents" under the selected account.
Summary Metrics
The top of the usage report displays token totals and an estimated-spend card:
- Sessions with Usage: The total count of unique customer sessions within the date range that generated model token usage.
- Total Input Tokens: The sum of prompt/input tokens sent to the LLM models.
- Total Output Tokens: The sum of response/output tokens generated by the LLM models.
- Total Tokens Used: The aggregate sum of input, output, and separately reported cache tokens without double-counting cache tokens included in provider input totals.
- Estimated Spend (priced USD): Estimated cost for records with complete model pricing. Usage without a matching, complete price is excluded from this total and identified in a caption.
Model configurations store input/output/cache-creation/cache-read prices in USD per 1 million tokens. Audio and translation configurations can store input/output token prices in the same unit. Usage estimates multiply reported token counts by the configured price and divide by 1,000,000. The legacy database and Agent JSON field names ending in CostPerToken are retained, but carry per-million-token prices. Newly recorded complete costs retain the per-million rates available when the call occurred. Older records are estimated using current configuration prices where the model/audio/translation configuration and agent can be matched unambiguously. This is an estimate, not a provider invoice or billing reconciliation.
Audio token usage is included only when a provider returns token counts. Providers that bill by duration or characters do not have token costs inferred from audio length or transcript text. The models price columns to per-million prices with four decimals. A blank price means "not priced": that usage is reported as unpriced instead of as $0. Enter 0 on the Models page for a model that really is free, such as a local one. For Gemini models, thought tokens are counted as output tokens and tool-use prompt tokens as input tokens, as Google bills them.
Translation token usage is included only when the provider returns token counts (currently Gemini, OpenAI, and Anthropic). No token usage or cost is inferred for character-billed or other non-token-based translation services.
Data Export
A Download CSV Report button is available in the summary section. Clicking this compiles the session-by-session detailed token usage data into a downloadable CSV file named usage_report_<start_date>_to_<end_date>.csv.
The exported CSV contains the following columns for granular off-platform analysis:
Session UIDDateAgent NameAgent UIDModel(e.g.,gemini-3.5-pro,gpt-4o)Input TokensBillable Input TokensOutput TokensCache Creation TokensCache Read TokensTotal TokensEstimated Cost (USD)Cost Basis
Detailed Reporting & Tabs
The dashboard organizes deeper insights into three distinct, interactive tabs:
1. Usage Graphs
This tab provides visual, interactive Plotly charts:
- Daily Token Usage by Model: A stacked bar chart showing the daily distribution of total tokens consumed, color-coded by the LLM model. This is critical for spotting spikes in traffic or shifts in model usage over time.
- Input vs. Output Tokens by Model: A grouped bar chart comparing the total input (prompt) tokens and output (response) tokens for each model. This helps evaluate prompt-to-completion ratios and optimize system instructions.
- Daily Estimated Spend by Model: A stacked bar chart of priced usage only; records without complete pricing are omitted.
2. Model Breakdown
This tab presents a tabular breakdown grouped by Model. It includes:
- Model: Name of the LLM model.
- Input Tokens: Formatted count of input tokens.
- Billable Input Tokens: Input tokens priced at the standard input rate, excluding cached input where the provider reports it separately.
- Output Tokens: Formatted count of output tokens.
- Cache Creation Tokens and Cache Read Tokens: Cached tokens reported separately by supported providers.
- Total Tokens: Formatted count of total tokens.
- Estimated Cost (USD): Estimated model spend for usage with complete pricing.
- Sessions: Number of unique sessions using this model.
- % of Total: The percentage of overall token consumption attributed to this model.
This breakdown is invaluable for auditing model-specific costs and tracking which models are utilized most frequently.
3. Agent Breakdown
This tab displays token usage statistics grouped by AI Agent:
- Total Tokens Consumed by Agent Chart: An interactive bar chart showing total tokens color-coded by agent name, facilitating quick visual comparisons.
- Agent Usage Table: A tabular view containing sessions, input and billable input, output and cache tokens, estimated cost, total tokens, and % of Total.
Use this view to identify which virtual assistants or custom agents are driving the majority of your token usage and operational costs.