# Choose an embeddings provider

Embeddings are what Faustine uses to index the documents you upload and to search them from chat. They are part of the workspace's [model provider](https://docs.faustine.ai/workspace/model-providers/) configuration. While embeddings are **Not configured**, documents cannot be uploaded and agents cannot search them.

## Before you begin

- A model provider is saved for the workspace, or you are in its setup wizard at the **Embeddings** step.
- You have a key for one of the options your provider offers.

## Embeddings options

The options depend on the workspace's model provider.

| Model provider | Options |
| --- | --- |
| Anthropic | **OpenAI API key** |
| Amazon Bedrock | **OpenAI API key**, **Azure OpenAI (or OpenAI-compatible)** |
| Azure AI Foundry | **Azure OpenAI**, **OpenAI API key** |
| LiteLLM | **Use my LiteLLM gateway**, **Use a separate OpenAI key** |
| Vercel AI Gateway | **Use my Vercel AI Gateway**, **Use a separate OpenAI key** |

Every provider also has **Not configured**.

The LiteLLM and Vercel AI Gateway options reuse the credentials of the model provider, so there is no second key. They are selected by default on those providers.

## Set the embeddings provider

To set or change embeddings on a saved provider:

1. In the portal, go to **Settings** > [**Model Provider**](https://auth.faustine.ai/go?to=%2Fsettings%3Ftab%3Dprovider).
2. In the **Embeddings** row, select **Edit**.
3. Select an option.
4. Fill in the fields for that option:

    | Field | Shown for | Value |
    | --- | --- | --- |
    | **Base URL** | Azure OpenAI | Your Azure OpenAI endpoint, such as `https://<RESOURCE>.openai.azure.com/openai/v1/`. On Azure AI Foundry this is a different resource from the Foundry one. |
    | **Model** | OpenAI, LiteLLM, Vercel AI Gateway | The embeddings model ID. The default is `text-embedding-3-small`, written `openai/text-embedding-3-small` on Vercel AI Gateway. |
    | **Deployment name** | Azure OpenAI | The name of your embeddings deployment. |
    | **API key** | OpenAI, Azure OpenAI | A key used only for embeddings. |

5. Select **Continue**.
6. In **Review & save**, select **Test connection**. The result includes **Embeddings working** with the model name.
7. Select **Save changes**.

The **Embeddings** row now shows the provider and the model, with a **Key configured** badge when the option has its own key.

Faustine stores vectors at 1536 dimensions. Use a model that produces vectors of that size. **Base URL** has to be an `https` URL on a public hostname.

When you edit embeddings later, an empty **API key** keeps the stored key. If you change the option or the **Base URL**, enter the key again.

## Turn embeddings off

Select **Not configured** in the **Embeddings** step and save. This removes the embeddings configuration and its key, and knowledge stops working for every agent in the workspace.

## Troubleshooting

| Symptom | Cause | Fix |
| --- | --- | --- |
| `Embeddings failed — The embeddings provider rejected the credentials.` | The key is wrong or revoked. | Enter a valid key for the option you selected. |
| `The embeddings endpoint does not serve "<model>".` | The model or deployment name does not exist on that endpoint. | Enter the exact model ID or deployment name. |
| `embeddings.baseUrl must be a public hostname` when you save | The URL points to `localhost`, an IP address or an internal name. | Use the public `https` address of the endpoint. |
| The **Embeddings** row shows **Key missing** | The embeddings option was saved without a key. | Select **Edit** and enter the key. |

## Next steps

- [Model providers](https://docs.faustine.ai/workspace/model-providers/): the rest of the provider configuration.
- [Add knowledge from files](https://docs.faustine.ai/web-agents/knowledge-files/): upload documents once embeddings work.
- [Switch model provider](https://docs.faustine.ai/workspace/switch-provider/): the embeddings options change with the provider.
