⌘K

GPT Image 1.5 Edit

gpt_image_1_5_edit

GPT Image 1.5 Edit by OpenAI for high-quality image generation. Supports multiple image sizes (1024x1024, 1024x1536, 1536x1024), batch generation (up to 4 images), and quality level control (low/medium/high) for various creative needs.

Authentication

authorization string required

All APIs require authentication via Bearer Token.

Get API Key:

Visit API Key Management Page to get your API Key.

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Parameters

model string required

Model ID to use for the request

Options: gpt_image_1_5_edit


prompt string required

Text description of the desired image(s), maximum length 32000 characters


image string | array required

Input image references to edit, up to 16 input images


size string

Size of the generated image

Options: 1024x1024, 1024x1536, 1536x1024, auto

Default: auto


n integer

Number of images to generate

Range: 1 - 4

Default: 1


quality string

Image quality level

Options: low, medium, high, auto

Default: auto


Polling

Since result generation takes time, you need to poll the task status after creating the task.

The initial response only returns information such as the task ID and initial status. The final result must be obtained by polling the task status endpoint using the task ID.

See the examples on the right for polling requests and responses.

Response Format

error object

Error information, only present when status is failed

code string

Error code

message string

Detailed error message


output array

Generation results, only present when status is completed

content array

List of generated resource content

type string

Resource type

Value: image|video

url string

Processed resource URL

jobId string

Remote task ID


usage object

Usage statistics, only present when status is completed

cost string

Total cost in USD

discount number

Discount amount


metadata object

Metadata information