# Tracking AI / LLM usage with Zen Firewall

Zen Firewall by Aikido monitors your AI / LLM API usage across major providers including OpenAI, Anthropic, and others. This feature tracks model usage, token consumption, and provides cost estimates to help you understand and optimize your AI infrastructure spending. Track both input and output tokens for each request, along with the specific model used.

{% hint style="warning" %}
Cost estimates are based on standard pricing and do not reflect any custom discounts you may have with your LLM providers.
{% endhint %}

## Use Cases <a href="#use-cases" id="use-cases"></a>

* 📊 Monitor Token Usage: Track input and output tokens across all LLM calls
* 💰 Estimate Costs: Get real-time cost estimates for your API usage
* 🔍 Identify Model Usage: See which models are being used most frequently
* 📈 Optimize Spending: Identify opportunities to reduce LLM costs
* 🎯 Track by Provider: Monitor usage across OpenAI, Anthropic, and other providers
* ⚡ Detect Anomalies: Spot unusual spikes in token consumption

### How to view LLM usage

Select a specific app and continue to the **Firewall** tab. Navigate to "**AI Usage**" to view your usage analytics.

<figure><img src="https://3149773201-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2FLwwGWA7ofu7LoVPyfbPk%2FScreenshot%202025-06-26%20at%2010.36.50.png?alt=media&#x26;token=dae898af-220d-40c8-b581-b9f156f816b0" alt=""><figcaption></figcaption></figure>

### AI Bill of Materials (AIBOM)

Zen Firewall can generate an AI Bill of Materials that inventories all AI and LLM services your applications communicate with.

This feature is available on request, please contact support to enable it.<br>


---

# 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://help.aikido.dev/zen-firewall/zen-features/tracking-ai-llm-usage-with-zen-firewall.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.
