You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/dall-e-dotnet.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.service: azure-ai-openai
8
8
ms.topic: include
9
9
author: PatrickFarley
10
10
ms.author: pafarley
11
-
ms.date: 08/16/2023
11
+
ms.date: 06/26/2024
12
12
---
13
13
14
14
Use this guide to get started generating images with the Azure OpenAI SDK for C#.
@@ -24,9 +24,9 @@ Use this guide to get started generating images with the Azure OpenAI SDK for C#
24
24
- An Azure OpenAI resource created in the East US region. For more information, see [Create a resource and deploy a model with Azure OpenAI](../how-to/create-resource.md).
25
25
26
26
> [!NOTE]
27
-
> Currently, you must submit an application to access Azure OpenAI Service. To apply for access, complete [this form](https://aka.ms/oai/access). If you need assistance, open an issue on this repo to contact Microsoft.
27
+
> Currently, you must submit an application to access Azure OpenAI Service. To apply for access, complete the form at [https://aka.ms/oai/access](https://aka.ms/oai/access?azure-portal=true). If you need assistance, open an issue on this repo to contact Microsoft.
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/dall-e-go.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,9 +22,9 @@ Use this guide to get started generating images with the Azure OpenAI SDK for Go
22
22
- An Azure OpenAI resource created in the East US region. For more information, see [Create a resource and deploy a model with Azure OpenAI](../how-to/create-resource.md).
23
23
24
24
> [!NOTE]
25
-
> Currently, you must submit an application to access Azure OpenAI Service. To apply for access, complete [this form](https://aka.ms/oai/access). If you need assistance, open an issue on this repo to contact Microsoft.
25
+
> Currently, you must submit an application to access Azure OpenAI Service. To apply for access, complete the form at <ahref="https://aka.ms/oai/access"target="_blank">https://aka.ms/oai/access</a>. If you need assistance, open an issue on this repo to contact Microsoft.
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/dall-e-java.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,9 @@ Use this guide to get started generating images with the Azure OpenAI SDK for Ja
25
25
- An Azure OpenAI resource created in the East US region. For more information, see [Create a resource and deploy a model with Azure OpenAI](../how-to/create-resource.md).
26
26
27
27
> [!NOTE]
28
-
> Currently, you must submit an application to access Azure OpenAI Service. To apply for access, complete [this form](https://aka.ms/oai/access). If you need assistance, open an issue on this repo to contact Microsoft.
28
+
> Currently, you must submit an application to access Azure OpenAI Service. To apply for access, complete the form at [https://aka.ms/oai/access](https://aka.ms/oai/access?azure-portal=true). If you need assistance, open an issue on this repo to contact Microsoft.
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/dall-e-javascript.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Use this guide to get started generating images with the Azure OpenAI SDK for Ja
26
26
> [!NOTE]
27
27
> Currently, you must submit an application to access Azure OpenAI Service. To apply for access, complete [this form](https://aka.ms/oai/access). If you need assistance, open an issue on this repo to contact Microsoft.
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/dall-e-powershell.md
+3-46Lines changed: 3 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,54 +24,11 @@ Use this guide to get started calling the Azure OpenAI Service image generation
24
24
> [!NOTE]
25
25
> Currently, you must submit an application to access Azure OpenAI Service. To apply for access, complete [this form](https://aka.ms/oai/access). If you need assistance, open an issue on this repo to contact Microsoft.
26
26
27
-
## Retrieve key and endpoint
27
+
## Setup
28
28
29
-
To successfully call the Azure OpenAI APIs, you need the following information about your Azure OpenAI resource:
|**Endpoint**|`api_base`| The endpoint value is located under **Keys and Endpoint** for your resource in the Azure portal. Alternatively, you can find the value in **Azure OpenAI Studio** > **Playground** > **Code View**. An example endpoint is: `https://docs-test-001.openai.azure.com/`. |
34
-
|**Key**|`api_key`| The key value is also located under **Keys and Endpoint** for your resource in the Azure portal. Azure generates two keys for your resource. You can use either value. |
35
-
36
-
Go to your resource in the Azure portal. On the navigation pane, select **Keys and Endpoint** under **Resource Management**. Copy the **Endpoint** value and an access key value. You can use either the **KEY 1** or **KEY 2** value. Always having two keys allows you to securely rotate and regenerate keys without causing a service disruption.
37
-
38
-
:::image type="content" source="../media/quickstarts/endpoint.png" alt-text="Screenshot that shows the Keys and Endpoint page for an Azure OpenAI resource in the Azure portal." lightbox="../media/quickstarts/endpoint.png":::
39
-
40
-
Create and assign persistent environment variables for your key and endpoint.
> [I ran into an issue with the setup.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=POWERSHELL&Pillar=AOAI&Product=Chatgpt&Page=quickstart&Section=Set-up)
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/dall-e-python.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,24 +20,24 @@ Use this guide to get started generating images with the Azure OpenAI SDK for Py
20
20
#### [DALL-E 3](#tab/dalle3)
21
21
22
22
- An Azure subscription. <ahref="https://azure.microsoft.com/free/ai-services"target="_blank">Create one for free</a>.
23
-
- Access granted to DALL-E in the desired Azure subscription.
23
+
- Access granted to DALL-E in the desired Azure subscription. You can apply for access to Azure OpenAI Service by completing the form at [https://aka.ms/oai/access](https://aka.ms/oai/access?azure-portal=true).
24
24
- <ahref="https://www.python.org/"target="_blank">Python 3.8 or later version</a>.
25
25
- An Azure OpenAI resource created in the `EastUS`, `AustraliaEast`, or `SwedenCentral` region.
26
26
- Then, you need to deploy a `dalle3` model with your Azure resource. For more information, see [Create a resource and deploy a model with Azure OpenAI](../how-to/create-resource.md).
27
27
28
28
#### [DALL-E 2 (preview)](#tab/dalle2)
29
29
30
30
- An Azure subscription. <ahref="https://azure.microsoft.com/free/ai-services"target="_blank">Create one for free</a>.
31
-
- Access granted to DALL-E in the desired Azure subscription.
31
+
- Access granted to DALL-E in the desired Azure subscription. You can apply for access to Azure OpenAI Service by completing the form at [https://aka.ms/oai/access](https://aka.ms/oai/access?azure-portal=true).
32
32
- <ahref="https://www.python.org/"target="_blank">Python 3.8 or later version</a>.
33
33
- An Azure OpenAI resource created in the `EastUS` region. For more information, see [Create a resource and deploy a model with Azure OpenAI](../how-to/create-resource.md).
34
34
35
35
---
36
36
37
37
> [!NOTE]
38
-
> Currently, you must submit an application to access Azure OpenAI Service. To apply for access, complete [this form](https://aka.ms/oai/access). If you need assistance, open an issue on this repo to contact Microsoft.
38
+
> Currently, you must submit an application to access Azure OpenAI Service. To apply for access, complete the form at [https://aka.ms/oai/access](https://aka.ms/oai/access?azure-portal=true). If you need assistance, open an issue on this repo to contact Microsoft.
39
39
40
-
## Set up
40
+
## Setup
41
41
42
42
### Retrieve key and endpoint
43
43
@@ -57,14 +57,11 @@ Create and assign persistent environment variables for your key and endpoint.
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/dall-e-rest.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ Use this guide to get started calling the Azure OpenAI Service image generation
19
19
20
20
- An Azure subscription. <ahref="https://azure.microsoft.com/free/ai-services"target="_blank">Create one for free</a>.
21
21
- Access granted to DALL-E in the desired Azure subscription.
22
+
Currently, access to this service is granted only by application. You can apply for access to Azure OpenAI by completing the form at <ahref="https://aka.ms/oai/access"target="_blank">https://aka.ms/oai/access</a>. Existing Azure OpenAI customers need to re-enter the form to get access to DALL-E. Open an issue on this repo to contact us if you have an issue.
22
23
- <ahref="https://www.python.org/"target="_blank">Python 3.8 or later version</a>.
23
24
- The following Python libraries installed: `os`, `requests`, `json`.
24
25
- An Azure OpenAI resource created in the `EastUS`, `AustraliaEast`, or `SwedenCentral` region.
@@ -28,16 +29,18 @@ Use this guide to get started calling the Azure OpenAI Service image generation
28
29
29
30
- An Azure subscription. <ahref="https://azure.microsoft.com/free/ai-services"target="_blank">Create one for free</a>.
30
31
- Access granted to DALL-E in the desired Azure subscription.
32
+
Currently, access to this service is granted only by application. You can apply for access to Azure OpenAI by completing the form at <ahref="https://aka.ms/oai/access"target="_blank">https://aka.ms/oai/access</a>. Existing Azure OpenAI customers need to re-enter the form to get access to DALL-E. Open an issue on this repo to contact us if you have an issue.
31
33
- <ahref="https://www.python.org/"target="_blank">Python 3.8 or later version</a>.
32
34
- The following Python libraries installed: `os`, `requests`, `json`.
33
35
- An Azure OpenAI resource created in the East US region. For more information, see [Create a resource and deploy a model with Azure OpenAI](../how-to/create-resource.md).
34
36
35
37
---
36
38
37
39
> [!NOTE]
38
-
> Currently, you must submit an application to access Azure OpenAI Service. To apply for access, complete [this form](https://aka.ms/oai/access). If you need assistance, open an issue on this repo to contact Microsoft.
40
+
> Currently, you must submit an application to access Azure OpenAI Service. To apply for access, complete the form at <ahref="https://aka.ms/oai/access"target="_blank">https://aka.ms/oai/access</a>. If you need assistance, open an issue on this repo to contact Microsoft.
39
41
40
-
## Retrieve key and endpoint
42
+
## Setup
43
+
### Retrieve key and endpoint
41
44
42
45
To successfully call the Azure OpenAI APIs, you need the following information about your Azure OpenAI resource:
43
46
@@ -50,14 +53,13 @@ Go to your resource in the Azure portal. On the navigation pane, select **Keys a
50
53
51
54
:::image type="content" source="../media/quickstarts/endpoint.png" alt-text="Screenshot that shows the Keys and Endpoint page for an Azure OpenAI resource in the Azure portal." lightbox="../media/quickstarts/endpoint.png":::
Create a new Python file named _quickstart.py_. Open the new file in your preferred editor or IDE.
57
61
58
-
1. Replace the contents of _quickstart.py_ with the following code. Enter your endpoint URL and key in the appropriate fields. Change the value of `prompt` to your preferred text.
59
-
60
-
62
+
1. Replace the contents of _quickstart.py_ with the following code. Change the value of `prompt` to your preferred text.
61
63
62
64
#### [DALL-E 3](#tab/dalle3)
63
65
@@ -67,8 +69,8 @@ Create a new Python file named _quickstart.py_. Open the new file in your prefer
67
69
import requests
68
70
import time
69
71
import os
70
-
api_base ='<your_endpoint>'# Enter your endpoint here
71
-
api_key ='<your_key>'# Enter your API key here
72
+
api_base =os.environ['AZURE_OPENAI_ENDPOINT']# Enter your endpoint here
73
+
api_key =os.environ['AZURE_OPENAI_API_KEY'] # Enter your API key here
0 commit comments