For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

1

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.

2

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

  1. 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, or Sweden Central.

    • A unique Name: This becomes part of your endpoint URL. For example, mycompany-ai becomes https://mycompany-ai.openai.azure.com/.

    • Pricing tier: Set to Standard S0.

  2. Click Next.

3

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

4

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

  1. Click View deployments.

  2. Go to Deploy > Deploy a base model.

  3. Select a model (such as gpt-4o, gpt-4o-mini, gpt-4.1, o1, o3, or any newer model listed for your region).

  4. Click Custom deploy.

  5. You can use the default deployment name or customize it as needed.

Note: Record this deployment name. You must use it in the DBSync model field. Only deployed models are callable through the endpoint.

  1. Click Deploy.

5

In the Azure portal, open the Azure OpenAI resource, then click Manage Keys.

Copy KEY 1 (or KEY 2) and the Endpoint URL.

6

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.

7

On the Azure OpenAI connector page, enter the API key, endpoint, and API version.

Click Save Connection, then click Test Connection.

Tip: Azure provides two keys per resource so you can rotate them without downtime. To rotate keys, point your application at KEY 2, regenerate KEY 1 in the portal, update your application to use KEY 1, and then regenerate KEY 2.

Last updated