# AI Analytics

## AI Analytics

Revenium's AI Analytics module gives teams complete visibility into the cost, performance, and behavior of every AI transaction—down to the token level—across all providers, models, agents, and use cases.

Our platform automatically captures standard fields returned by AI providers (e.g., OpenAI, Anthropic, etc.), and customers can optionally enrich transactions with custom metadata (e.g., product, customer, task type, agent) to enable fine-grained grouping and reporting.

This system is purpose-built to help developers, analysts, and budget owners understand how AI workloads are behaving and what they’re costing—in real time and over time.

***

<h3 align="center">KEY CAPABILITIES</h3>

### Transaction-Level Visibility

Every AI call is captured with full fidelity, including cost, latency, token breakdowns, throughput, mediation latency, and more.

* Input/output token counts and pricing
* Completion timing and time-to-first-token
* Custom identifiers: task type, model source, subscription, agent, credential, user ID
* Response quality scores (optional)
* Performance indicators: tokens/sec, streaming, retry behavior

<figure><img src="/files/SvhJLelpZeGUZ6Kc4aMa" alt=""><figcaption><p>Example of metadata available on every AI transaction in Revenium</p></figcaption></figure>

***

### AI Analytics Overview

Main features:

1. [Custom Chart Manager & Builder](/ai-analytics/building-and-managing-charts.md)
2. Pre-Built Charts & Views (this page)

You can group, filter, and compare costs and performance across:

* Providers
* Models
* Agents
* Products
* Customers
* Subscriptions
* Task types
* Credentials\\

The Chart Builder makes it easy to create custom visualizations that answer questions like:

* “Which product is costing us the most per request?”
* “How does GPT-4 latency compare to Claude for summarization?”
* “Which API keys or agents are responsible for recent cost spikes?”
* “How is token usage trending across months or quarters?”

***

### Summary Dashboard

Provides a top-level view across providers and models, including:

* Total cost by provider
* Average cost per request
* Token throughput trends
* Cost by model
* Cost by API key

<figure><img src="/files/OeV0LvGZOlFlmSOHuoar" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/UFcdiZG4L50bDomdqEwa" alt=""><figcaption></figcaption></figure>

***

### :exclamation: Want to Be Notified When Trends Spike?

Charts help visualize trends—but alerts help you act on them in real time. Revenium supports configurable cost and performance alerts so you can detect anomalies before they turn into surprises.

Set alerts on metrics like total cost, cost per transaction, token throughput, and error rates—scoped to specific agents, models, customers, or products.

📘 [Learn how to configure alerts →](/cost-and-performance-alerts.md)

### Customer View

Analyze usage and cost breakdowns by customer, organization, or subscription. This is especially useful in multi-tenant environments or B2B SaaS integrations.

<figure><img src="/files/3i3KgeOQ0IIweQwOxLGJ" alt=""><figcaption></figcaption></figure>

***

### Product View

Breaks down average cost per transaction and overall profitability by product, helping teams track margin impacts from changes in model selection or user behavior.

* Cost vs revenue per product
* Average cost per transaction by product

<figure><img src="/files/V8hLmxTY3O1q5yRL4WQQ" alt=""><figcaption></figcaption></figure>

***

### Agent View

Ideal for organizations using agents or microservices powered by LLMs. Tracks:

* Total and per-agent cost over time
* Specific agent cost trends that help you see if your agents are getting more or less efficient over time
* Task performance: time per task, number completed

<figure><img src="/files/zfmbvRwGZxzp5mW3KgfZ" alt=""><figcaption></figcaption></figure>

***

### Task-Level Insights

Compare AI vendor performance and cost across different task types (e.g., summarization, classification, extraction).

* Average time to complete per task
* Cost per task by model or vendor allows you to see how costs & performance for specific tasks vary by provider and model

<figure><img src="/files/zTnDH0L0SxknyZCsRZx8" alt=""><figcaption></figcaption></figure>

***

### Custom Charts

Beyond the pre-built dashboards above, you can create fully custom visualizations tailored to your specific needs using **Chart Builder** and **Custom Charts Viewer**.

#### **Custom Charts View**

Organize and monitor your saved charts in a dedicated dashboard. Add, view, and manage charts created in Chart Builder.

**Features:**

* **Dashboard View** - All your custom charts in one place with live data
* **Quick Add** - Search and add saved charts to your dashboard
* **Easy Management** - Click chart titles to edit, remove charts from view as needed
* **Persistent Layout** - Dashboard layout saves automatically across sessions

#### **Chart Builder**

Create and manage custom charts with complete control over metrics, grouping, filters, and time ranges. Build Line, Bar, Column, and Pie charts that answer your unique questions.

<figure><img src="/files/PAlU5tjihplhSgvkrUES" alt=""><figcaption></figcaption></figure>

**Chart Creation:**

* **Flexible Metrics** - Track costs, tokens, requests, or latency with multiple calculation types (Total, Average, Per-Request, Per-Token, Per-Entity)
* **Dynamic Grouping** - Split data by Provider, Model, Customer, Agent, Product, Task, or any custom metadata field
* **Advanced Filtering** - Apply conditions with 12 operators (equals, contains, in, between, etc.) to focus on specific data
* **Time Series & Aggregates** - View trends over time or compare aggregated values across categories
* **Chart Focus** - Show Top N items or apply value thresholds to highlight key data points

**Chart Management:**

* **View, Edit, Clone, Delete** - Full control over your saved charts from a searchable table
* **Search & Filter** - Find charts quickly by name or description
* Organized with pagination for easy navigation

📘 [Learn how to build and manage charts in Chart Builder →](https://docs.revenium.io/~/revisions/Jz7yBiKUPrN714abos2L/ai-analytics/building-and-managing-charts)

### Custom Metadata = Custom Reporting

To unlock full value, customers can pass additional metadata fields on each transaction.

:blue\_book: [Read the full usage metadata reference guide](/integration-options-for-ai-metering.md#usage-metadata-reference) →

***

### Example Use Cases

* Flag high-cost models in specific agents (`avg cost > $0.30/request`)
* Track token consumption trends by customer, agent, or team
* Benchmark throughput and latency across AI providers
* Identify low-margin or unprofitable tasks
* Immediately identify regressions in cost per transaction or cost per task after new code deployments updates

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.revenium.io/ai-analytics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
