openai/gpt-image-2 📝❓🖼️🔢 → 🖼️

⭐ Official ▶️ 408.3K runs 📅 Apr 2026 ⚙️ Cog 0.18.0
image-editing image-style-transfer text-to-image

About

OpenAI's state-of-the-art image generation model. Create and edit images from text with strong instruction following, sharp text rendering, and detailed editing.

Example Output

Prompt:

"A photo of a computer screen displaying a Spotify playlist in golden hour evening in a living room with lots of green plants in the background. The playlist says GPT-image-2. caption is "this new image model from OpenAI is dope." and the artists are Replicate. the songs are themes about open source AI and Machine learning. the account name is Replicate. use the logo for replicate as the profile picture and artist image."

Output

Example output

Performance Metrics

40.64s Prediction Time
40.66s Total Time
All Input Parameters
{
  "prompt": "A photo of a computer screen displaying a Spotify playlist in golden hour evening in a living room with lots of green plants in the background. The playlist says GPT-image-2. caption is \"this new image model from OpenAI is dope.\" and the artists are Replicate. the songs are themes about open source AI and Machine learning. the account name is Replicate. use the logo for replicate as the profile picture and artist image.",
  "quality": "auto",
  "background": "auto",
  "moderation": "auto",
  "aspect_ratio": "3:2",
  "input_images": [
    "https://replicate.delivery/pbxt/Oy2U6Sw4k3ZYEZ5cXeuVJMq8k45GQ17J2iKvt1HcHVUtVj5O/download.jpg"
  ],
  "output_format": "webp",
  "number_of_images": 1,
  "output_compression": 90
}
Input Parameters
prompt (required) Type: string
A text description of the desired image
quality Default: auto
The quality of the generated image
user_id Type: string
An optional unique identifier representing your end-user. This helps OpenAI monitor and detect abuse.
background Default: auto
Set whether the background is transparent or opaque or choose automatically
moderation Default: auto
Content moderation level
aspect_ratio Default: 1:1
The aspect ratio of the generated image
input_images Type: arrayDefault:
A list of images to use as input for the generation
output_format Default: webp
Output format
openai_api_key Type: string
Your OpenAI API key (optional - uses proxy if not provided)
number_of_images Type: integerDefault: 1Range: 1 - 10
Number of images to generate (1-10)
output_compression Type: integerDefault: 90Range: 0 - 100
Compression level (0-100%)
Output Schema

Output

Type: arrayItems Type: stringItems Format: uri

Example Execution Logs
Model check completed.
Model: gpt-image-2
Generating image...
Sid drk132mwx5rmt0cxp878wad6gc
Generated image in 38.8sec
Generated 1 images
Input text token count: 456
Input image token count: 361
Output token count: 1372
Version Details
Version ID
9ea921ca3eea597fe8773474545f54601fe1d30bc62517fb30fd86f42e4bb3cf
Version Created
April 23, 2026
Run on Replicate →