Azure OpenAI API Key
Azure OpenAI Service delivers OpenAI models (such as gpt-4o, gpt-4.1, o1, and gpt-4o-mini) through Microsoft's Azure cloud. Unlike the direct OpenAI API, each Azure OpenAI resource has its own endpoint URL, its own set of API keys, and a per-deployment model name.
Prerequisites
Before you begin, ensure that you have the following:
An Azure account with an active subscription ($200 in free credit is available for new Azure accounts).
Permissions in that subscription to create Azure resources and to deploy models.
A region where the models that you want to use are available (model availability differs by region).
Configure Azure OpenAI
Sign in to the Azure portal with your Microsoft account. If you don't have an Azure subscription, click Create a free account and complete the sign-up process.

Click Create a resource, search for Azure OpenAI, and then click Create.


Enter the following:
Subscription
Resource group (new or existing)
Region: Select one where your target models are available, such as
East US,East US 2,West Europe, orSweden Central.A unique Name: This becomes part of your endpoint URL. For example,
mycompany-aibecomeshttps://mycompany-ai.openai.azure.com/.Pricing tier: Set to
Standard S0.
Click Next.

Select the required Type. Click Next, then click Create.

Click the newly created Azure OpenAI resource, then click Go to AI Foundry portal.
Click View deployments.

Go to Deploy > Deploy a base model.
Select a model (such as
gpt-4o,gpt-4o-mini,gpt-4.1,o1,o3, or any newer model listed for your region).Click Custom deploy.
You can use the default deployment name or customize it as needed.
Click Deploy.
In the Azure portal, open the Azure OpenAI resource, then click Manage Keys.
Copy KEY 1 (or KEY 2) and the Endpoint URL.

Use 2024-10-21 for the API version.
For preview features (such as the newest models), use a preview version like 2025-01-01-preview.
On the Azure OpenAI connector page, enter the API key, endpoint, and API version.

Click Save Connection, then click Test Connection.
Warning: Each Azure OpenAI resource has its own keys and endpoint. If you delete the resource, you lose both keys. Regenerating a key in the Azure portal invalidates the previous value of that key slot (KEY 1 or KEY 2) but leaves the other key working.
Last updated