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/how-to/dall-e.md
+26-31Lines changed: 26 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,14 @@ ms.author: pafarley
7
7
ms.service: azure-ai-openai
8
8
ms.custom:
9
9
ms.topic: how-to
10
-
ms.date: 03/04/2024
10
+
ms.date: 10/02/2024
11
11
manager: nitinme
12
12
keywords:
13
13
zone_pivot_groups:
14
14
# Customer intent: as an engineer or hobbyist, I want to know how to use DALL-E image generation models to their full capability.
15
15
---
16
16
17
-
# Learn how to work with the DALL-E models
17
+
# How to work with the DALL-E models
18
18
19
19
OpenAI's DALL-E models generate images based on user-provided text prompts. This guide demonstrates how to use the DALL-E models and configure their options through REST API calls.
20
20
@@ -23,14 +23,14 @@ OpenAI's DALL-E models generate images based on user-provided text prompts. This
23
23
24
24
#### [DALL-E 3](#tab/dalle3)
25
25
26
-
- An Azure subscription. <ahref="https://azure.microsoft.com/free/ai-services"target="_blank">Create one for free</a>.
27
-
- An Azure OpenAI resource created in the `SwedenCentral`region.
28
-
-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).
26
+
- An Azure subscription. You can [create one for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?icid=ai-services).
27
+
- An Azure OpenAI resource created in the *Sweden Central*region. For more information, see [Create and deploy an Azure OpenAI Service resource](../how-to/create-resource.md).
28
+
-Deploy a *dall-e-3* model with your Azure OpenAI resource.
29
29
30
30
#### [DALL-E 2 (preview)](#tab/dalle2)
31
31
32
-
- An Azure subscription. <ahref="https://azure.microsoft.com/free/ai-services"target="_blank">Create one for free</a>.
33
-
- 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).
32
+
- An Azure subscription. You can [create one for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?icid=ai-services).
33
+
- An Azure OpenAI resource created in the *East US* region. For more information, see [Create and deploy an Azure OpenAI Service resource](../how-to/create-resource.md).
34
34
35
35
---
36
36
@@ -41,17 +41,16 @@ The following command shows the most basic way to use DALL-E with code. If this
-`<your_resource_name>` is the name of your Azure OpenAI resource.
87
86
-`<api_version>` is the version of the API you want to use. For example, `2023-06-01-preview`.
88
87
@@ -117,7 +116,7 @@ To retrieve the image generation results, make a GET request to:
117
116
GET https://<your_resource_name>.openai.azure.com/openai/operations/images/<operation_id>?api-version=<api_version>
118
117
```
119
118
120
-
where:
119
+
**Replace the following placeholders**:
121
120
-`<your_resource_name>` is the name of your Azure OpenAI resource.
122
121
-`<operation_id>` is the ID of the operation returned in the previous step.
123
122
-`<api_version>` is the version of the API you want to use. For example, `2023-06-01-preview`.
@@ -135,7 +134,6 @@ The response from this API call contains your generated image.
135
134
136
135
The output from a successful image generation API call looks like the following example. The `url` field contains a URL where you can download the generated image. The URL stays active for 24 hours.
137
136
138
-
139
137
#### [DALL-E 3](#tab/dalle3)
140
138
141
139
```json
@@ -173,12 +171,11 @@ The output from a successful image generation API call looks like the following
173
171
---
174
172
175
173
176
-
177
174
### API call rejection
178
175
179
176
Prompts and images are filtered based on our content policy, returning an error when a prompt or image is flagged.
180
177
181
-
If your prompt is flagged, the `error.code` value in the message is set to `contentFilter`. Here's an example:
178
+
If your prompt is flagged, the `error.code` value in the message is set to *contentFilter*. Here's an example:
182
179
183
180
#### [DALL-E 3](#tab/dalle3)
184
181
@@ -209,7 +206,7 @@ If your prompt is flagged, the `error.code` value in the message is set to `cont
209
206
210
207
---
211
208
212
-
It's also possible that the generated image itself is filtered. In this case, the error message is set to `Generated image was filtered as a result of our safety system.`. Here's an example:
209
+
It's also possible that the generated image itself is filtered. In this case, the error message is set to *Generated image was filtered as a result of our safety system*. Here's an example:
213
210
214
211
#### [DALL-E 3](#tab/dalle3)
215
212
@@ -267,51 +264,49 @@ The following API body parameters are available for DALL-E image generation.
267
264
268
265
### Size
269
266
270
-
Specify the size of the generated images. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for DALL-E 3 models. Square images are faster to generate.
271
-
267
+
Specify the size of the generated images. Must be one of *1024x1024*, *1792x1024*, or *1024x1792* for DALL-E 3 models. Square images are faster to generate.
272
268
273
269
### Style
274
270
275
-
DALL-E 3 introduces two style options: `natural` and `vivid`. The `natural` style is more similar to the DALL-E 2 default style, while the `vivid` style generates more hyper-real and cinematic images.
271
+
DALL-E 3 introduces two style options: *natural* and *vivid*. The *natural* style is more similar to the DALL-E 2 default style, while the *vivid* style generates more hyper-real and cinematic images.
276
272
277
-
The `natural` style is useful in cases where DALL-E 3 over-exaggerates or confuses a subject that's meant to be more simple, subdued, or realistic.
273
+
The *natural* style is useful in cases where DALL-E 3 over-exaggerates or confuses a subject that's meant to be more simple, subdued, or realistic.
278
274
279
-
The default value is `vivid`.
275
+
The default value is *vivid*.
280
276
281
277
### Quality
282
278
283
-
There are two options for image quality: `hd` and `standard`. `hd` creates images with finer details and greater consistency across the image. `standard` images can be generated faster.
279
+
There are two options for image quality: *hd* and *standard*. *hd* creates images with finer details and greater consistency across the image. *standard* images can be generated faster.
284
280
285
-
The default value is `standard`.
281
+
The default value is *standard*.
286
282
287
283
### Number
288
284
289
-
With DALL-E 3, you cannot generate more than one image in a single API call: the _n_ parameter must be set to `1`. If you need to generate multiple images at once, make parallel requests.
285
+
With DALL-E 3, you can't generate more than one image in a single API call: the _n_ parameter must be set to `1`. If you need to generate multiple images at once, make parallel requests.
290
286
291
287
### Response format
292
288
293
-
The format in which the generated images are returned. Must be one of `url` (a URL pointing to the image) or `b64_json` (the base 64-byte code in JSON format). The default is `url`.
289
+
The format in which the generated images are returned. Must be one of *url* (a URL pointing to the image) or *b64_json* (the base 64-byte code in JSON format). The default is *url*.
294
290
295
291
#### [DALL-E 2 (preview)](#tab/dalle2)
296
292
297
293
### Size
298
294
299
-
Specify the size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for DALL-E 2 models.
295
+
Specify the size of the generated images. Must be one of *256x256*, *512x512*, or *1024x1024* for DALL-E 2 models.
300
296
301
297
### Number
302
298
303
-
Set the _n_ parameter to an integer between 1 and 10 to generate multiple images at the same time using DALL-E 2. The images will share an operation ID; you receive them all with the same retrieval API call.
299
+
Set the `n` parameter to an integer between 1 and 10 to generate multiple images at the same time using DALL-E 2. The images share an operation ID; you receive them all with the same retrieval API call.
304
300
305
301
---
306
302
307
-
## Next steps
303
+
## Related content
308
304
309
-
*[Learn more about Azure OpenAI](../overview.md).
310
-
*[DALL-E quickstart](../dall-e-quickstart.md)
305
+
*[What is Azure OpenAI Service?](../overview.md)
306
+
*[Quickstart: Generate images with Azure OpenAI Service](../dall-e-quickstart.md)
311
307
*[Image generation API reference](/azure/ai-services/openai/reference#image-generation)
0 commit comments