# AzureAIEmbeddingsModel

> **Class** in `langchain_azure_ai`

📖 [View in docs](https://reference.langchain.com/python/langchain-azure-ai/embeddings/inference/AzureAIEmbeddingsModel)

Azure AI model inference for embeddings.

This class has been deprecated in favor of `AzureAIOpenAIApiEmbeddingsModel`.

**Examples:**

```python
from langchain_azure_ai.embeddings import AzureAIEmbeddingsModel

embed_model = AzureAIEmbeddingsModel(
    endpoint="https://[your-endpoint].inference.ai.azure.com",
    credential="your-api-key",
)
```

If your endpoint supports multiple models, indicate the parameter `model_name`:

```python
from langchain_azure_ai.embeddings import AzureAIEmbeddingsModel

embed_model = AzureAIEmbeddingsModel(
    endpoint="https://[your-service].services.ai.azure.com/models",
    credential="your-api-key",
    model="cohere-embed-v3-multilingual"
)
```

**Troubleshooting:**

To diagnostic issues with the model, you can enable debug logging:

```python
import sys
import logging
from langchain_azure_ai.embeddings import AzureAIEmbeddingsModel

logger = logging.getLogger("azure")

# Set the desired logging level.
logger.setLevel(logging.DEBUG)

handler = logging.StreamHandler(stream=sys.stdout)
logger.addHandler(handler)

model = AzureAIEmbeddingsModel(
    endpoint="https://[your-service].services.ai.azure.com/models",
    credential="your-api-key",
    model="cohere-embed-v3-multilingual",
    client_kwargs={ "logging_enable": True }
)
```

## Signature

```python
AzureAIEmbeddingsModel()
```

## Extends

- `ModelInferenceService`
- `Embeddings`

## Properties

- `model_name`
- `embed_batch_size`
- `dimensions`
- `model_kwargs`

## Methods

- [`initialize_client()`](https://reference.langchain.com/python/langchain-azure-ai/embeddings/inference/AzureAIEmbeddingsModel/initialize_client)
- [`embed_documents()`](https://reference.langchain.com/python/langchain-azure-ai/embeddings/inference/AzureAIEmbeddingsModel/embed_documents)
- [`embed_query()`](https://reference.langchain.com/python/langchain-azure-ai/embeddings/inference/AzureAIEmbeddingsModel/embed_query)
- [`aembed_documents()`](https://reference.langchain.com/python/langchain-azure-ai/embeddings/inference/AzureAIEmbeddingsModel/aembed_documents)
- [`aembed_query()`](https://reference.langchain.com/python/langchain-azure-ai/embeddings/inference/AzureAIEmbeddingsModel/aembed_query)

## ⚠️ Deprecated

Deprecated since version 1.1.0. Use langchain_azure_ai.embeddings.AzureAIOpenAIApiEmbeddingsModel instead. AzureAIEmbeddingsModel requires Azure AI Inference beta SDK which is deprecated and will be retired on May 30, 2026. Please migrate to AzureAIOpenAIApiEmbeddingsModel which uses OpenAI-compatible API with a stable OpenAI SDK.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-azure/blob/7a6a664d617264df8dcb12fcfb1bacc09f21d504/libs/azure-ai/langchain_azure_ai/embeddings/inference.py#L31)