> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jiekou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GPT Image 2 Light Edit

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

<ParamField header="Content-Type" type="string" required={true}>
  Enum value: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API key}}.
</ParamField>

## Request Body

<ParamField body="mask" type="object">
  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="image_url" type="string">
      Mask image URL or data URL. The mask image must be a PNG and must include an alpha channel, such as RGBA or LA. Transparent areas indicate regions that need to be edited or redrawn, while opaque areas indicate regions that should remain unchanged as much as possible. The mask dimensions usually need to match the input image. file\_id is not supported.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="size" type="string" default="1024x1024">
  Output image resolution.

  Available values: `1024x1024`, `1024x1536`, `1536x1024`, `1152x2048`, `2048x1152`, `2048x2048`, `2160x3840`, `3840x2160`
</ParamField>

<ParamField body="images" type="object[]" required={true}>
  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

  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="image_url" type="string" required={true}>
      Input image URL or data URL. file\_id is not supported.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="prompt" type="string" required={true}>
  Editing instructions describing how you want to modify the input image. If empty, prompt is required will be returned.

  Length limit: 0 - 32000
</ParamField>

<ParamField body="background" type="string">
  Output image background handling method.

  Available values: `auto`, `opaque`
</ParamField>

<ParamField body="moderation" type="string">
  Content moderation strictness.

  Available values: `auto`, `low`
</ParamField>

## Response

<ResponseField name="images" type="string[]" required={false}>
  Array of edited result image URLs stored and converted by the platform.
</ResponseField>
