> For the complete documentation index, see [llms.txt](https://docs.aidi.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aidi.ai/mosaic/get-started/llm-configuration.md).

# LLM Configuration

Mosaic does not include AI inference in your subscription price. You bring your own LLM capacity, the same way you bring your own [Power BI capacity](/mosaic/get-started/powerbi-configuration.md). This is a deliberate design choice with three benefits:

* **You control cost.** Token spend is on your invoice, with your provider, with your usage caps. No surprises hidden in Mosaic's pricing.
* **You control data.** Chat content, page context, and DAX results are sent to the LLM endpoint **you** configure — staying in your Microsoft 365 / Azure environment if you choose Azure AI Foundry.
* **You control models.** Pick the model that matches your compliance, latency, and quality requirements. Switch providers without changing Mosaic.

## Two supported paths

{% stepper %}
{% step %}
**Azure AI Foundry&#x20;*****(recommended)***

The cleanest path for Microsoft-native customers. Mosaic calls a Foundry-hosted model in **your** Azure subscription. Data never leaves your tenant. Aligns with your existing Azure governance, billing, and compliance posture.

[Configure Azure AI Foundry →](/mosaic/get-started/llm-configuration/azure-ai-foundry.md)
{% endstep %}

{% step %}
**Bring your own API key**

If you already use Anthropic, OpenAI, or another supported provider directly, paste an API key into Mosaic and you're done. Useful for teams that don't yet have an Azure AI Foundry deployment.

[Bring your own API key →](/mosaic/get-started/llm-configuration/byo-api-key.md)
{% endstep %}
{% endstepper %}

## Who runs these steps

A user with **Mosaic Tenant Admin** access. The same person who configures Power BI typically does this in the same session — both are tenant-level setup.

## How long it takes

* **Azure AI Foundry**: \~20 minutes the first time, including deploying a model in Foundry and pasting the endpoint into Mosaic
* **BYO API key**: \~2 minutes if you already have an active Anthropic / OpenAI account

## What gets stored where

<table><thead><tr><th width="220">Item</th><th>Where it lives</th></tr></thead><tbody><tr><td>API key / Foundry endpoint</td><td>Encrypted in your Mosaic tenant configuration. Visible only to Tenant Admins.</td></tr><tr><td>Chat content sent to the LLM</td><td>Routed through Mosaic's backend to your configured endpoint. Mosaic retains the request/response in your audit log; the inference itself happens at your provider.</td></tr><tr><td>AI session history</td><td>Mosaic's PostgreSQL database (in your Mosaic tenant scope), as today.</td></tr></tbody></table>

## What's next

Pick one path:

* [Azure AI Foundry](/mosaic/get-started/llm-configuration/azure-ai-foundry.md) — recommended
* [Bring your own API key](/mosaic/get-started/llm-configuration/byo-api-key.md)

Once your LLM is connected, return to [Mosaic App Configurations](/mosaic/get-started/powerbi-configuration/mosaic-app-configurations.md) to curate the Power BI resource catalog and finish onboarding.


---

# 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:

```
GET https://docs.aidi.ai/mosaic/get-started/llm-configuration.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.
