# Discourse AI - AI usage

**URL:** https://meta.discourse.org/t/discourse-ai-ai-usage/348677
**Category:** Site Management
**Tags:** how-to, ai
**Created:** [January 23, 2025, 7:56pm UTC](https://meta.discourse.org/t/discourse-ai-ai-usage/348677 "2025-01-23T19:56:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Saif](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saif/32/318253_2.png) [@Saif](https://meta.discourse.org/u/Saif)
#### Post date: [January 23, 2025, 7:56pm UTC](https://meta.discourse.org/t/discourse-ai-ai-usage/348677/1 "2025-01-23T19:56:58Z")

</div>

> 🔖 This guide covers the AI usage page which is part of the [Discourse AI](https://meta.discourse.org/t/discourse-ai/259214) plugin.
> 
> 🙋 Required user level: Administrator

The AI usage page is designed for admins to understand how the community is using Discourse AI features over time. This can be helpful in [Estimating costs of using LLMs for Discourse AI](https://meta.discourse.org/t/estimating-costs-of-using-llms-for-discourse-ai/307243).

 ![The image displays a graph and summary statistics for token usage, including total requests, total available tokens, request tokens, response tokens, and cached tokens over time. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/9/2/7/927b143f9e8ad528a03b0ef5d9caeebee82463a1.png)

## Features

- Time horizon: last 24 hours, last week, last month and custom date range
- Selectable by Discourse AI feature
- Selectable by enabled LLMs
- Summary preview
  - Total requests: _All requests made to LLMs through Discourse_
  - Total tokens: _All the tokens used when prompting an LLM_
  - Request tokens: _Tokens used when the LLM tries to understand what you are saying_
  - Response tokens: _Tokens used when the LLM responds to your prompt_
  - Cache read tokens: _Previously processed request tokens that the LLM reuses from cache to optimize performance and cost_
  - Cache write tokens: _Request tokens that were written to cache for potential future reuse_
  - Estimated cost: _Cumulative cost of all tokens used by the LLMs based on specified cost metrics added to LLM configurations_

- Interactable bar graph showcasing token usage
- Token, usage count and estimated cost per Discourse AI feature
- Token, usage count and estimated cost per LLM
- Token, usage count and estimated cost per user

## Enabling AI usage

### Prerequisites

> ℹ For data to be populated you must configure at least _one_ Large Language Model (LLM) from a provider and have members using the Discourse AI features.

To get started you can configure LLMs through the [Discourse AI - Large Language Model (LLM) settings page](https://meta.discourse.org/t/discourse-ai-large-language-model-llm-settings-page/319903).

- [OpenAI](https://meta.discourse.org/t/discourse-ai-openai-configure-api-keys/280783)
- [Anthropic](https://meta.discourse.org/t/discourse-ai-anthropic-configure-api-key/280936)
- [Azure OpenAI](https://meta.discourse.org/t/discourse-ai-azure-openai-configure-api-keys/282442)
- AWS Bedrock
- [Google Gemini](https://meta.discourse.org/t/configure-api-keys-for-google-gemini/289556)
- Mistral
- Groq
- SambaNova
- Open Router
- Cohere
- HuggingFace
- [vLLM / Self-Hosting an OpenSource LLM](https://meta.discourse.org/t/self-hosting-an-opensource-llm-for-discourseai/290923)

### Configuration

1. Go to `Admin` settings-\> `Plugins` → `AI` → `Settings` tab and make sure its enabled (`discourse ai enabled`)
2. Within the AI plugin navigate to the `Usage` tab

## Technical FAQ

**What are tokens and how do they work?**

- Tokens are the basic units that LLMs use to understand and generate text, usage data may affect costs. Check out [Estimating costs of using LLMs for Discourse AI](https://meta.discourse.org/t/estimating-costs-of-using-llms-for-discourse-ai/307243) to learn more.
