# AzureOpenAI

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/llms/openai/AzureOpenAI)

Azure-specific OpenAI large language models.

To use, you should have the ``openai`` python package installed, and the
environment variable ``OPENAI_API_KEY`` set with your API key.

Any parameters that are valid to be passed to the openai.create call can be passed
in, even if not explicitly saved on this class.

## Signature

```python
AzureOpenAI()
```

## Description

**Example:**

.. code-block:: python

from langchain_community.llms import AzureOpenAI

openai = AzureOpenAI(model_name="gpt-3.5-turbo-instruct")

## Extends

- `BaseOpenAI`

## Properties

- `azure_endpoint`
- `deployment_name`
- `openai_api_version`
- `openai_api_key`
- `azure_ad_token`
- `azure_ad_token_provider`
- `azure_ad_async_token_provider`
- `openai_api_type`
- `validate_base_url`
- `lc_attributes`

## Methods

- [`get_lc_namespace()`](https://reference.langchain.com/python/langchain-community/llms/openai/AzureOpenAI/get_lc_namespace)
- [`validate_environment()`](https://reference.langchain.com/python/langchain-community/llms/openai/AzureOpenAI/validate_environment)

## ⚠️ Deprecated

Deprecated since version 0.0.10.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/llms/openai.py#L760)