> For the complete documentation index, see [llms.txt](https://docs.onelens.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onelens.cloud/observe-visibility-and-insights/ai-cost-and-usage-analyzer.md).

# AI Cost & Usage Analyzer

> Analyze every AI dollar, every token, and every workload from a single place.

The AI Cost & Usage Analyzer provides a unified view of AI spending and usage across all connected providers. Build custom reports, drill into costs across multiple dimensions, compare trends over time, and understand exactly where your AI budget is being spent.

***

### Why use the AI Cost & Usage Analyzer?

AI billing is fragmented across providers, models, API keys, and teams. Finance needs accurate cost reporting, while engineering needs usage insights to optimize applications.

The AI Cost & Usage Analyzer brings both together with a flexible reporting engine that lets you analyze cost and usage from any perspective.

***

### Key Capabilities

#### Unified AI Cost Visibility

View AI costs across all supported providers in a single interface.

Analyze spend across:

* Providers
* Models
* Projects
* API Keys
* Teams
* Cost Centers
* Environments
* Applications
* Regions

<figure><img src="/files/4yGu46xvlxmXMJMlS4rW" alt=""><figcaption></figcaption></figure>

***

#### Cost & Usage Views

Switch between **Cost** and **Usage** depending on the question you're trying to answer.

**Cost View**

* Total spend
* Daily cost trends
* Provider comparison
* Model-wise spend
* Team-wise spend

**Usage View**

* Requests
* Token consumption
* Input vs Output tokens
* Cached tokens
* Reasoning tokens
* Model usage

No need to build separate reports—the same report can be viewed from either perspective.

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

***

#### Powerful Group By

Slice your data using up to **4 levels of grouping** to answer complex business questions.

Supported dimensions include:

* Provider
* Model
* Project
* API Key
* Team
* Cost Center
* Environment
* Application
* Region
* User / Caller
* Pricing Tier

Example:

```
Provider→ Team→ Project→ Model
```

Or

```
Cost Center→ Application→ API Key→ Caller
```

This allows finance and engineering teams to investigate spend without exporting data.

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

***

#### Advanced Filters

Create highly targeted reports using flexible filters.

Filter by:

* Date Range
* Provider
* Model
* Team
* Project
* API Key
* Environment
* Region
* Cost Center
* Token Type
* Pricing Tier
* Custom Tags

Combine multiple filters to answer questions like:

* Which projects used GPT-4 this month?
* How much did production spend on Claude Sonnet?
* Which API keys generated the highest reasoning token costs?

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

***

#### Save & Reuse Reports

Frequently used reports can be saved and shared across teams.

Saved reports help standardize reporting across engineering, finance, and leadership.

Examples:

* Monthly AI Spend
* Team-wise Cost
* Model Utilization
* Production AI Cost
* Customer-wise AI Spend
* AI Cost by Cost Center

***

#### 25+ Pre-built Reports

Get started instantly with built-in reports covering common AI cost and usage scenarios.

Categories include:

* Cost Overview
* Provider Analysis
* Model Intelligence
* Token Health
* Workload Analysis
* Runtime Analysis
* Governance
* Unit Metrics
* AI Cost Allocation

These reports can be customized further using filters and grouping.

***

#### Trend Analysis

Track how AI usage changes over time.

Analyze trends by:

* Hour
* Day
* Week
* Month

Compare different time periods to identify:

* Growth in AI adoption
* New workloads
* Cost spikes
* Seasonal patterns
* Model migration

***

#### Token Breakdown

Understand what contributes to your AI bill.

Depending on the provider, OneLens breaks down costs by:

* Input Tokens
* Output Tokens
* Cached Input Tokens
* Cache Writes
* Cache Reads
* Reasoning Tokens

This helps identify opportunities to improve prompt design, caching, and model efficiency.

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

***

#### Export & Share

Export reports for finance reviews, business reporting, or further analysis.

Supported formats include:

* CSV
* XLSX
* Scheduled Reports

Reports can also be pinned to dashboards for continuous monitoring.

***

### Example Use Cases

#### Engineering

* Which model is generating the highest cost?
* Which API key has the highest token consumption?
* Which application is driving spend growth?

#### Finance

* AI spend by department
* Monthly cost trends
* Provider-wise billing
* Budget forecasting

#### Product Teams

* Cost per feature
* Cost per customer
* Cost by environment
* AI adoption across products

***

### Best Practices

* Build reports using business dimensions like Team or Project instead of only Provider.
* Save commonly used reports to maintain consistency across teams.
* Use multiple Group By levels before exporting data.
* Combine filters with saved reports for recurring analysis.
* Pin high-value reports to dashboards for continuous visibility.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.onelens.cloud/observe-visibility-and-insights/ai-cost-and-usage-analyzer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
