Skip to main content
AI

Edit Images

Public model name gpt-image-2-auto, billed by returned image resolution, quality, and count, API reference to the call examples below, size options auto Billing mode: billed by the actual generated image size; async tasks reserve cost first and reconcile when results return

gpt-image-2-origin supported sizes

Billing mode: billed exactly by size

1K

RatioLandscapePortraitOrientation
4:3 / 3:41024x768, 1344x1024768x1024, 1024x1344Landscape / Portrait
5:4 / 4:51280x10241024x1280Landscape / Portrait
16:9 / 9:161360x768, 1536x864768x1360, 864x1536Landscape / Portrait
1:11024x1024-Square
3:2 / 2:31536x10241024x1536Landscape / Portrait
2:1 / 1:22048x10241024x2048Landscape / Portrait
21:9 / 9:212016x864864x2016Landscape / Portrait

2K

RatioLandscapePortraitOrientation
16:9 / 9:161920x1080, 2048x1152, 2560x14401080x1920, 1152x2048, 1440x2560Landscape / Portrait
1:11536x1536-Square
3:2 / 2:32048x1360, 2160x14401360x2048, 1440x2160Landscape / Portrait
4:3 / 3:42048x15361536x2048Landscape / Portrait
2:1 / 1:22688x13441344x2688Landscape / Portrait
21:9 / 9:212688x11521152x2688Landscape / Portrait
5:4 / 4:52560x20482048x2560Landscape / Portrait

4K

RatioLandscapePortraitOrientation
1:12048x2048, 2880x2880-Square
4:3 / 3:43264x24482448x3264Landscape / Portrait
3:2 / 2:33504x23362336x3504Landscape / Portrait
2:1 / 1:23840x19201920x3840Landscape / Portrait
21:9 / 9:213840x16481648x3840Landscape / Portrait
16:9 / 9:163840x21602160x3840Landscape / Portrait

API Parameters and Examples

Endpoint

POST /v1/images/edits/

Request Body Parameters

FieldTypeRequiredTitleDescription

Response Fields

FieldTypeRequiredTitleDescription

Response Examples

Example 1

{
"created": 1777107492,
"data": [
{
"url": "https://xxxxx.com/xxxx.png"
}
]
}