@@ -1250,7 +1250,7 @@ Generates a batch of images from a text caption on a given DALL-E or GPT-image-1
1250
1250
Creates images given a prompt.
1251
1251
1252
1252
``` 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
1254
1254
1255
1255
{
1256
1256
"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
1264
1264
** Responses** :
1265
1265
Status Code: 200
1266
1266
1267
+ > [ !NOTE]
1268
+ > The GPT-image-1 model doesn't return content filtering annotations.
1269
+
1267
1270
``` json
1268
1271
{
1269
1272
"body" : {
@@ -1387,77 +1390,43 @@ Generates an image based on an input image and text prompt instructions. Require
1387
1390
1388
1391
### Example
1389
1392
1390
- Creates images given a prompt .
1393
+ Creates images given an input image and text instructions .
1391
1394
1392
1395
``` 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
1394
1397
1395
1398
{
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"
1400
1405
}
1401
1406
1402
1407
```
1403
1408
1404
1409
** Responses** :
1405
1410
Status Code: 200
1406
1411
1412
+ > [ !NOTE]
1413
+ > The GPT-image-1 model doesn't return content filtering annotations.
1414
+
1407
1415
``` json
1408
1416
{
1409
1417
"body" : {
1410
1418
"created" : 1698342300 ,
1411
1419
"data" : [
1412
1420
{
1421
+ "b64_json" : " <base64_encoded_image>" ,
1413
1422
"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 ,
1459
1428
}
1460
- ]
1429
+
1461
1430
}
1462
1431
}
1463
1432
```
0 commit comments