Skip to main content

Overview

Generate images using OpenAI’s gpt-image-1 model.
  • Output Type: image
  • Estimated Cost: quality == “high” ? 16 : 8 credits
  • Handler: local

Parameters

Required Parameters

string
required
A visual description of your desired image.
Max length 32000 characters.
  • Label: Prompt
string
default:"auto"
required
The size of the generated images. Must be one of ‘1024x1024’, ‘1536x1024’ (landscape), ‘1024x1536’ (portrait), or ‘auto’. Defaults to auto.
  • Options: 1024x1024, 1536x1024, 1024x1536, auto

Optional Parameters

integer
default:1
Number of samples to generate
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.
  • Label: Number of samples
  • Minimum: 1
  • Maximum: 4
string
default:"medium"
The quality of the image (high, medium, low, auto). ‘auto’ selects the best quality. Defaults to auto.
Set this to high if you want to get the highest level of details, fidelity, and coherence, especially for complex scenes, infographics, or text-heavy images.
  • Options: high, medium, low, auto
string
default:"auto"
Set background transparency (transparent, opaque, auto). ‘transparent’ requires output_format=‘png’ or ‘webp’. Defaults to auto.
  • Options: transparent, opaque, auto
integer
default:100
Compression level (0-100) for webp/jpeg formats. Defaults to 100.
string
default:"png"
Output format for the generated image (png, jpeg, webp). Defaults to png. gpt-image-1 always returns images as base64-encoded data.
  • Options: png, jpeg, webp
string
A unique identifier representing your end-user for enabling per-user content monitoring.