Skip to content

Commit e2d39f0

Browse files
committed
Refresh one article
1 parent ac60ccf commit e2d39f0

File tree

1 file changed

+26
-31
lines changed

1 file changed

+26
-31
lines changed

articles/ai-services/openai/how-to/dall-e.md

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ ms.author: pafarley
77
ms.service: azure-ai-openai
88
ms.custom:
99
ms.topic: how-to
10-
ms.date: 03/04/2024
10+
ms.date: 10/02/2024
1111
manager: nitinme
1212
keywords:
1313
zone_pivot_groups:
1414
# Customer intent: as an engineer or hobbyist, I want to know how to use DALL-E image generation models to their full capability.
1515
---
1616

17-
# Learn how to work with the DALL-E models
17+
# How to work with the DALL-E models
1818

1919
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.
2020

@@ -23,14 +23,14 @@ OpenAI's DALL-E models generate images based on user-provided text prompts. This
2323

2424
#### [DALL-E 3](#tab/dalle3)
2525

26-
- An Azure subscription. <a href="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.
2929

3030
#### [DALL-E 2 (preview)](#tab/dalle2)
3131

32-
- An Azure subscription. <a href="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).
3434

3535
---
3636

@@ -41,17 +41,16 @@ The following command shows the most basic way to use DALL-E with code. If this
4141

4242
#### [DALL-E 3](#tab/dalle3)
4343

44-
4544
Send a POST request to:
4645

4746
```
4847
https://<your_resource_name>.openai.azure.com/openai/deployments/<your_deployment_name>/images/generations?api-version=<api_version>
4948
```
5049

51-
where:
50+
**Replace the following placeholders**:
5251
- `<your_resource_name>` is the name of your Azure OpenAI resource.
5352
- `<your_deployment_name>` is the name of your DALL-E 3 model deployment.
54-
- `<api_version>` is the version of the API you want to use. For example, `2024-02-01`.
53+
- `<api_version>` is the version of the API you want to use. For example, *2024-02-01*.
5554

5655
**Required headers**:
5756
- `Content-Type`: `application/json`
@@ -82,7 +81,7 @@ First, send a POST request to:
8281
https://<your_resource_name>.openai.azure.com/openai/images/generations:submit?api-version=<api_version>
8382
```
8483

85-
where:
84+
**Replace the following placeholders**:
8685
- `<your_resource_name>` is the name of your Azure OpenAI resource.
8786
- `<api_version>` is the version of the API you want to use. For example, `2023-06-01-preview`.
8887

@@ -117,7 +116,7 @@ To retrieve the image generation results, make a GET request to:
117116
GET https://<your_resource_name>.openai.azure.com/openai/operations/images/<operation_id>?api-version=<api_version>
118117
```
119118

120-
where:
119+
**Replace the following placeholders**:
121120
- `<your_resource_name>` is the name of your Azure OpenAI resource.
122121
- `<operation_id>` is the ID of the operation returned in the previous step.
123122
- `<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.
135134

136135
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.
137136

138-
139137
#### [DALL-E 3](#tab/dalle3)
140138

141139
```json
@@ -173,12 +171,11 @@ The output from a successful image generation API call looks like the following
173171
---
174172

175173

176-
177174
### API call rejection
178175

179176
Prompts and images are filtered based on our content policy, returning an error when a prompt or image is flagged.
180177

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:
182179

183180
#### [DALL-E 3](#tab/dalle3)
184181

@@ -209,7 +206,7 @@ If your prompt is flagged, the `error.code` value in the message is set to `cont
209206

210207
---
211208

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:
213210

214211
#### [DALL-E 3](#tab/dalle3)
215212

@@ -267,51 +264,49 @@ The following API body parameters are available for DALL-E image generation.
267264

268265
### Size
269266

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.
272268

273269
### Style
274270

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.
276272

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.
278274

279-
The default value is `vivid`.
275+
The default value is *vivid*.
280276

281277
### Quality
282278

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.
284280

285-
The default value is `standard`.
281+
The default value is *standard*.
286282

287283
### Number
288284

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.
290286

291287
### Response format
292288

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*.
294290

295291
#### [DALL-E 2 (preview)](#tab/dalle2)
296292

297293
### Size
298294

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.
300296

301297
### Number
302298

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.
304300

305301
---
306302

307-
## Next steps
303+
## Related content
308304

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)
311307
* [Image generation API reference](/azure/ai-services/openai/reference#image-generation)
312308

313309

314310
<!-- OAI HT guide https://platform.openai.com/docs/guides/images/usage
315311
dall-e 3 features here: https://cookbook.openai.com/articles/what_is_new_with_dalle_3 -->
316312

317-

0 commit comments

Comments
 (0)