> 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 uses your AI capacity, not ours. Connect Azure AI Foundry (recommended) or any other LLM provider via API key.

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.
