← Back to all generators
openai/gpt-image-2
OfficialView on Replicate →
OpenAI's image generation and editing model. Create and edit images from text with close instruction following, sharp text rendering, and detailed edits.
Capabilities
Reference Images
Cost
$0.128 / image
Input Parameters
| Name | Type | Description | Default | Constraints |
|---|---|---|---|---|
prompt* | string | A text description of the desired image | — | — |
aspect_ratio | string | The size of the generated image. Use 'auto' to let the model pick. Sizes above 2560x1440 are experimental and may give more variable results. | "1:1" | 1:13:22:34:33:416:99:16auto1024x10241536x10241024x15361536x11521152x15362048x20482048x11521152x20483840x21602160x3840 |
background | string | Set whether the background is opaque or choose automatically. GPT Image 2 does not support transparent backgrounds. | "auto" | autoopaque |
input_images | array | A list of images to use as input for the generation | — | — |
moderation | string | Content moderation level | "auto" | autolow |
number_of_images | integer | Number of images to generate (1-10) | 1 | min: 1, max: 10 |
openai_api_key | string(password) | Your OpenAI API key (optional - uses proxy if not provided) | — | — |
output_compression | integer | Compression level (0-100%) | 90 | min: 0, max: 100 |
output_format | string | Output format | "webp" | pngjpegwebp |
quality | string | The quality of the generated image | "auto" | lowmediumhighauto |
promptrequiredstringA text description of the desired image
aspect_ratiostringThe size of the generated image. Use 'auto' to let the model pick. Sizes above 2560x1440 are experimental and may give more variable results.
Default:
"1:1"1:13:22:34:33:416:99:16auto1024x10241536x10241024x15361536x11521152x15362048x20482048x11521152x20483840x21602160x3840
backgroundstringSet whether the background is opaque or choose automatically. GPT Image 2 does not support transparent backgrounds.
Default:
"auto"autoopaque
input_imagesarrayA list of images to use as input for the generation
moderationstringContent moderation level
Default:
"auto"autolow
number_of_imagesintegerNumber of images to generate (1-10)
Default:
1min: 1, max: 10openai_api_keystringYour OpenAI API key (optional - uses proxy if not provided)
output_compressionintegerCompression level (0-100%)
Default:
90min: 0, max: 100output_formatstringOutput format
Default:
"webp"pngjpegwebp
qualitystringThe quality of the generated image
Default:
"auto"lowmediumhighauto
Version:
e7ad01f81515Updated: 11/7/202634.6M runs
cinemasetfree