# AzureOpenAI

> **Class** in `langchain_openai`

📖 [View in docs](https://reference.langchain.com/python/langchain-openai/llms/azure/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:**

```python
from langchain_openai 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_secrets`
- `lc_attributes`

## Methods

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

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/311675a517f51ec6c77454124293c58df517e952/libs/partners/openai/langchain_openai/llms/azure.py#L20)