Skip to content

Commit 29ee1a2

Browse files
committed
update edits api ref
1 parent 0c44ae4 commit 29ee1a2

File tree

1 file changed

+22
-53
lines changed

1 file changed

+22
-53
lines changed

articles/ai-services/openai/includes/api-versions/latest-inference-preview.md

Lines changed: 22 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ Generates a batch of images from a text caption on a given DALL-E or GPT-image-1
12501250
Creates images given a prompt.
12511251

12521252
```HTTP
1253-
POST https://{endpoint}/openai/deployments/{deployment-id}/images/generations?api-version=2025-03-01-preview
1253+
POST https://{endpoint}/openai/deployments/{deployment-id}/images/generations?api-version=2025-04-01-preview
12541254
12551255
{
12561256
"prompt": "In the style of WordArt, Microsoft Clippy wearing a cowboy hat.",
@@ -1264,6 +1264,9 @@ POST https://{endpoint}/openai/deployments/{deployment-id}/images/generations?ap
12641264
**Responses**:
12651265
Status Code: 200
12661266

1267+
> [!NOTE]
1268+
> The GPT-image-1 model doesn't return content filtering annotations.
1269+
12671270
```json
12681271
{
12691272
"body": {
@@ -1387,77 +1390,43 @@ Generates an image based on an input image and text prompt instructions. Require
13871390

13881391
### Example
13891392

1390-
Creates images given a prompt.
1393+
Creates images given an input image and text instructions.
13911394

13921395
```HTTP
1393-
POST https://{endpoint}/openai/deployments/{deployment-id}/images/generations?api-version=2025-03-01-preview
1396+
POST https://{endpoint}/openai/deployments/{deployment-id}/images/edits?api-version=2025-04-01-preview
13941397
13951398
{
1396-
"prompt": "In the style of WordArt, Microsoft Clippy wearing a cowboy hat.",
1397-
"n": 1,
1398-
"style": "natural",
1399-
"quality": "standard"
1399+
"image": "<base64_encoded_image>",
1400+
"prompt": "Add a beach ball in the center.",
1401+
"model": "gpt-image-1",
1402+
"size": "1024x1024",
1403+
"n": 1,
1404+
"quality": "high"
14001405
}
14011406
14021407
```
14031408

14041409
**Responses**:
14051410
Status Code: 200
14061411

1412+
> [!NOTE]
1413+
> The GPT-image-1 model doesn't return content filtering annotations.
1414+
14071415
```json
14081416
{
14091417
"body": {
14101418
"created": 1698342300,
14111419
"data": [
14121420
{
1421+
"b64_json": "<base64_encoded_image>",
14131422
"revised_prompt": "A vivid, natural representation of Microsoft Clippy wearing a cowboy hat.",
1414-
"prompt_filter_results": {
1415-
"sexual": {
1416-
"severity": "safe",
1417-
"filtered": false
1418-
},
1419-
"violence": {
1420-
"severity": "safe",
1421-
"filtered": false
1422-
},
1423-
"hate": {
1424-
"severity": "safe",
1425-
"filtered": false
1426-
},
1427-
"self_harm": {
1428-
"severity": "safe",
1429-
"filtered": false
1430-
},
1431-
"profanity": {
1432-
"detected": false,
1433-
"filtered": false
1434-
},
1435-
"custom_blocklists": {
1436-
"filtered": false,
1437-
"details": []
1438-
}
1439-
},
1440-
"url": "https://dalletipusw2.blob.core.windows.net/private/images/e5451cc6-b1ad-4747-bd46-b89a3a3b8bc3/generated_00.png?se=2023-10-27T17%3A45%3A09Z&...",
1441-
"content_filter_results": {
1442-
"sexual": {
1443-
"severity": "safe",
1444-
"filtered": false
1445-
},
1446-
"violence": {
1447-
"severity": "safe",
1448-
"filtered": false
1449-
},
1450-
"hate": {
1451-
"severity": "safe",
1452-
"filtered": false
1453-
},
1454-
"self_harm": {
1455-
"severity": "safe",
1456-
"filtered": false
1457-
}
1458-
}
1423+
}],
1424+
"usage":
1425+
{
1426+
"input_tokens": 557,
1427+
"output_tokens": 1000,
14591428
}
1460-
]
1429+
14611430
}
14621431
}
14631432
```

0 commit comments

Comments
 (0)