# Connect Azure AI Foundry

With Azure AI Foundry as the [model provider](https://docs.faustine.ai/workspace/model-providers/), Faustine calls the Claude models deployed in your Foundry resource. Analysis, updates, the Advanced editor and chat all run there, and Azure bills the usage.

## Before you begin

- An Azure AI Foundry resource with a deployment for each Claude model Faustine requires. See [Use Claude models in Microsoft Foundry](https://learn.microsoft.com/en-us/azure/ai-foundry/foundry-models/how-to/use-foundry-models-claude) in the Microsoft documentation.
- The resource's name and one of its API keys.
- The name of each deployment. A deployment name is one you chose in Azure, and it is often not the model's ID.
- For knowledge, an embeddings deployment on an Azure OpenAI resource, or an OpenAI API key.

## Enter the credentials

1. In the portal, go to **Settings** > [**Model Provider**](https://auth.faustine.ai/go?to=%2Fsettings%3Ftab%3Dprovider) and select **Configure a provider**.
2. In **Provider**, select **Azure AI Foundry**.
3. In **Foundry resource**, enter the resource name. It is the first part of the resource's endpoint, `<RESOURCE>.services.ai.azure.com`. Enter the name only, with letters, digits and hyphens.
4. In **API key**, enter the resource's key.
5. Select **Continue**.

## Map the models

In **Model names on your provider**:

1. For each model under **Required for analysis & code generation**, enter the name of its deployment in Azure.
2. To offer more models for chat, select **Add a chat model…** and enter its deployment name.
3. Select **Test connection**. Each row shows whether the deployment answered.
4. Select **Continue** when every required model is reachable.

Faustine cannot derive deployment names, so every required row needs a value.

## Set embeddings and save

1. In **Embeddings**, select one:
    - **Azure OpenAI**. Enter the **Base URL** of your Azure OpenAI endpoint, the **Deployment name** and the **API key**. This endpoint is a different resource from the Foundry one.
    - **OpenAI API key**. Enter the **Model** and the **API key**.
    - **Not configured**.
2. Select **Continue**.
3. In **Review & save**, select **Test connection**, then **Save & activate**.

The tab shows the **Azure AI Foundry** card with an **Active** badge and a **Foundry resource** row.

## What the validation checks

| Check | How |
| --- | --- |
| Credentials | A request of one token to the resource's Anthropic endpoint. A 401 or 403 means the key was rejected, and the configuration is not saved. |
| Each model | One real request of one token to the deployment in its row. |
| Embeddings | One embeddings request, when embeddings are configured. |

## Troubleshooting

| Symptom | Cause | Fix |
| --- | --- | --- |
| `foundry.resource must be a resource name (letters, digits and hyphens only)` | **Foundry resource** holds a URL or a domain. | Enter the resource name only. |
| `Azure Foundry rejected the API key` | The key does not belong to that resource. | Copy the key of the resource named in **Foundry resource**. |
| A model shows **Not found** with `No deployment with this name on the Foundry resource` | The value is the model's ID, not the deployment's name. | Enter the deployment name as it appears in Azure. |

## Next steps

- [Model providers](https://docs.faustine.ai/workspace/model-providers/): status, test and the other providers.
- [Choose an embeddings provider](https://docs.faustine.ai/workspace/embeddings/): the embeddings options on Azure.
- [Choose the chat model](https://docs.faustine.ai/web-agents/chat-model/): pick among the models you mapped.
