Skip to main content
POST
/
v3
/
gpt-image-2-light-edit
GPT Image 2 Light Edit
curl --request POST \
  --url https://api.highwayapi.ai/v3/gpt-image-2-light-edit \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "mask": {
    "image_url": "<string>"
  },
  "size": "<string>",
  "images": [
    {
      "image_url": "<string>"
    }
  ],
  "prompt": "<string>",
  "background": "<string>",
  "moderation": "<string>"
}
'
{
  "images": [
    {}
  ]
}
GPT Image 2 Light image editing API. It accepts image URLs via the images array, edits the input images according to the prompt, and returns the edited image URLs.

Request Headers

Content-Type
string
required
Enum value: application/json
Authorization
string
required
Bearer authentication format: Bearer {{API key}}.

Request Body

mask
object
size
string
default:"1024x1024"
Output image resolution.Available values: 1024x1024, 1024x1536, 1536x1024, 1152x2048, 2048x1152, 2048x2048, 2160x3840, 3840x2160
images
array
required
List of source images to edit in JSON URL mode. At least one image_url is required. Supports URLs or data URLs.Array length: 1 - 16
prompt
string
required
Editing instructions describing how you want to modify the input image. If empty, prompt is required will be returned.Length limit: 0 - 32000
background
string
Output image background handling method.Available values: auto, opaque
moderation
string
Content moderation strictness.Available values: auto, low

Response

images
array
Array of edited result image URLs stored and converted by the platform.