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

# OpenAI Image Edit

> Creates an edited or extended image given one or more source images and a prompt, using OpenAI's gpt-image-1 model.

## Overview

Creates an edited or extended image given one or more source images and a prompt, using OpenAI's gpt-image-1 model.

* **Output Type**: image
* **Estimated Cost**: quality == "high" ? 16 : 8 credits
* **Handler**: local

## Parameters

### Required Parameters

<ParamField body="image" type="array<image>" required>
  The image(s) to edit. Must be png, webp, or jpg files less than 25MB each.

  * Label: Input Image(s)
</ParamField>

<ParamField body="prompt" type="string" required>
  A description of what you want the model to do with your images.

  <Tip>
    Max length 32000 characters.
  </Tip>

  * Label: Prompt
</ParamField>

<ParamField body="size" type="string" required default="auto">
  The size of the generated images. Must be one of '1024x1024', '1536x1024' (landscape), '1024x1536' (portrait), or 'auto'. Defaults to auto.

  * Label: Size
  * Options: `1024x1024`, `1536x1024`, `1024x1536`, `auto`
</ParamField>

### Optional Parameters

<ParamField body="mask" type="image">
  An optional image mask. White areas indicate where the image should be edited. Must be a PNG file, less than 4MB, and have the same dimensions as the first input image.

  * Label: Mask (optional)
</ParamField>

<ParamField body="n_samples" type="integer" default={1}>
  Number of samples to generate

  <Tip>
    This is the number of tries to generate for the prompt.
    If you get a request for n\_samples > 1, you are still using a *single* prompt for the whole set.
  </Tip>

  * Label: Number of samples
  * Minimum: 1
  * Maximum: 4
</ParamField>

<ParamField body="input_fidelity" type="string" default="high">
  How strongly to preserve the input image's content (high, medium, low, auto). Defaults to auto.

  <Tip>
    This is useful for preserving the original details like text, faces, logos, etc.
  </Tip>

  * Label: Input Fidelity
  * Options: `high`, `low`
</ParamField>

<ParamField body="user" type="string">
  A unique identifier representing your end-user for enabling per-user content monitoring.

  * Label: User ID
</ParamField>
