> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure OpenAI

> Configure AzureOpenAI, Agno's model class for Azure-hosted OpenAI models.

The AzureOpenAI model provides access to Azure-hosted OpenAI models.

## Parameters

| Parameter | Type | Default | Description |
| - | - | - | - |
| `id` | `str` | `"not-provided"` | The Azure deployment name passed as the model ID. Set this to your deployment name |
| `name` | `str` | `"AzureOpenAI"` | The name of the model |
| `provider` | `str` | `"Azure"` | The provider of the model |
| `api_key` | `Optional[str]` | `None` | The API key for Azure OpenAI (defaults to AZURE\_OPENAI\_API\_KEY env var) |
| `api_version` | `Optional[str]` | `"2024-10-21"` | The Azure OpenAI API version to use |
| `azure_endpoint` | `Optional[str]` | `None` | The Azure endpoint, e.g. `https://example.openai.azure.com` (defaults to AZURE\_OPENAI\_ENDPOINT env var) |
| `azure_deployment` | `Optional[str]` | `None` | The Azure deployment name (defaults to AZURE\_OPENAI\_DEPLOYMENT env var) |
| `base_url` | `Optional[str]` | `None` | Full base URL for the API, used in place of `azure_endpoint` plus `azure_deployment` |
| `azure_ad_token` | `Optional[str]` | `None` | Azure Active Directory token for authentication, used instead of an API key |
| `azure_ad_token_provider` | `Optional[Any]` | `None` | Callable that returns an Azure AD token, refreshed on each request |

`AzureOpenAI` extends [OpenAILike](https://agno-v2.mintlify.site/reference/models/openai-like.md) and accepts all of its parameters.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.